Island Generation Question

Get help using Construct 2

Post » Mon Jun 13, 2016 11:12 pm

Hello everyone,

I've been working for the last couple of days on a random island generator that I want to maybe use for a project in the future. I used the Zelda 2 overworld sprites and tiles modified them to work with a BitWise algorithm (thanks to R0J0hound), and I'm more or less using the method described here for my island generation: http://dxprog.com/files/randmaps.html (also similar to what @Ethan described in a post somewhere, probably this one turn-based-strategy-like-advance-wars-devlog_t87666?&start=10&hilit=random+island).

You can view the build here:
Image
http://threesevenhosting.com/builds/rover/
controls: arrow keys, press SPACE to regenerate the islands, zoom in and out with your mouse wheel

Originally I wanted sandy beaches on the edge of my islands, but when I generate my heightmap and run it through a few times, I get some ok island shapes but I wasn't totally sure how to make just the edges of my islands sand. SO, I ended up making everything at my 1st height sand. It just looks really sparse now, with so much sand.

I guess my questions would be:

1. How would I just outline the edges of my islands with sand, using an array? Is there a way to do that? I feel like it would almost be like a bitwise method, but just finding my tiles that are next to the ocean/water
2. Or, when I'm averaging out my array values, I really only end up with values of 0-5 - is there any way to increase that range?

These are some more complex array scenarios for me, and it's been great learning how to do some of this stuff! I appreciate any help!
B
72
S
18
G
9
Posts: 376
Reputation: 9,106

Post » Tue Jun 14, 2016 12:06 am

Oh yeah, one more question (sorry about the double post) - how would I select and expand or contract a selection within an array, based on a range of numbers??
B
72
S
18
G
9
Posts: 376
Reputation: 9,106

Post » Tue Jun 14, 2016 5:58 pm

Just a quick update... changed some graphics. Still wanting to figure out how to get some more natural landscapes, but for now I think I can still build on this engine. Any help would be great! I noticed that when I was trying to average out each cell based on the surrounding cells, if I didn't use int() I was getting some insane values.

I abandoned the sandy edges to my islands (for now) until I can figure out how to fix my algorithm. In terms of graphics, I put in an optional animated tiles option for things like water and coasts.

Here's the latest build:
Image
http://threesevenhosting.com/builds/rover/6-14-2016

arrow keys, press space to regenerate the island, you can zoom in and out with the mouse wheel, and you can raise and lower terrain using the left and right mouse clicks.
B
72
S
18
G
9
Posts: 376
Reputation: 9,106


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens and 11 guests