Island Generation Question

0 favourites
  • 3 posts
From the Asset Store
Template for dungeon/maze generation, using wave function collapse
  • 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 ).

    You can view the build here:

    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!

  • 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??

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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:

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)