Arrays

For questions about using Classic.

Post » Sat Jul 03, 2010 9:51 pm

That looks pretty cool, Minor :)

Anyway, if you determine that you need to implement such an idea, it wouldn't be too bad to implement in Python for one of us who program with it. I know of a nice flood fill algorithm in python that could be trivially adapted to this, but a few very specific details would be needed in order to make it correctly. A lot easier to insert python code than Construct events, too.

However, some extra overhead would be introduced, since Python cannot read Construct arrays, currently. You'd have to construct a Python list copy of the Construct array from Construct events, and call the python code, which will operate on the list, then copy the result back to the Construct array. This would likely be done in a Construct function, each time a flood fill was needed.

Just something to think about. As I mentioned, I think it's quite possible with only construct events, too, but it would be more difficult to copy between projects.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Sat Jul 03, 2010 11:19 pm

You reeealy should check out the Perlin plug. With it you wouldn't have to check nearest neighbor, since the random data generated ensures that cells at a certain height will be surrounded.
All you would need to check is if it is at sea level or not.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Sat Jul 03, 2010 11:41 pm

[quote="newt":3i03fd2h]You reeealy should check out the Perlin plug. With it you wouldn't have to check nearest neighbor, since the random data generated ensures that cells at a certain height will be surrounded.
All you would need to check is if it is at sea level or not.[/quote:3i03fd2h]

Will do newt.

I think I've come to the end of my capabilites with this little excerise anyway, the things I would like too add seem way out of my capabilities at the moment.

Still I've learned some programmy stuff - loops and arrays.

Thanks guys.

:)
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests