Showing posts with label landscape generation. Show all posts
Showing posts with label landscape generation. Show all posts

Monday, January 13, 2014

Tiled map generation now working

Working on my RTS game, and I now have a working tile based map.  It has working random generation, and a working A* pathfinder. Also has a working minimap.


The previous images show the minimap and map view zoomed at two different sizes.

The following image shows the visualization of the A* algorithm in action. for debug purposes each iteration of the algorithm is slowed down and the open set and closed set visualized as red and cyan tiles. The current node is depicted as the white tile.  The red tile not attached to the blob is the goal node. The start node was the highest point inside the gray rock formation.


 The following is the final path from the above visualized run.

 
 The following is several paths generated on the same map.  The two in the middle around the center rock position are so different because the path-finder was set to require 3 tile clearance for the top path, and therefore could not go through the gap the other path did. 


Tuesday, April 9, 2013

Map Generation

Working on a RTS-like/City Sim-like game and working on getting a large map for it. My plan is that the game be tile based and completely procedurally generated. Working with some Simplex Noise, I've generated what I hope will be a the starting point of my levels, but I need to work on the scale. The generated images here have no scale, but they appear as though they would be in the scale of several (possibly hundred) square miles or km, which is impractical.  The goal is to have a tile equal about half a meter or 1.6 feet, about the width of a person.  That makes path finding and collision avoidance/detection easier.  My plan is also to make one pixel in the map correspond to one tile, this poses the problem that the below images would be 200 meters for most, the tiled ones were generated as 400x400 px, and the largest image would still only be half a km, at 1000x1000 px.  At the moment my noise is normalized to always contain [0,1] so it always looks similar, scale changes do make it look better, but even I try to get it to generated square at a much more detailed scale it still has large patches of 'desert' near water because of the way the noise is mapped to land, still thinking of a way to deal with this. I am thinking generating the noise for a larger area and using that to normalize a smaller actually used area.

This one is to show the way the tiles will hopefully look.



UPDATE: I've been tinkering and I got the following image for different levels of zoom, the left-most image is the landscape I'm thinking will be a mile or km width/height.  each set of images is scaled by two.

Tuesday, March 26, 2013

Noise Test update

In this post I mentioned that I was using simplex noise, this is an issue if you intend to use anything generated by it, as for a while it was patented, and I am having difficulty finding out if it still is.

Monday, April 23, 2012

Some noise tests

Not quite halfway done with that paper I mentioned earlier but decided a distraction was in order.

This is a project I've been toying with on and of for a long time.  I started toying with Perlin Noise because I hope to create a fully procedural game.  The noise would be useful for textures mainly but also landscapes and other various things.  So I made this program to play with how the noise behaves with different inputs. While doing so I found out  Simplex Noise is less expensive to compute so that is what this currently uses.

Feel free to play around with it, ask questions, I don't care if you use it to make textures for yourself but I'd like recognition if you do. I'm going to open this to public comments so questions and comments can be asked and posted.

The in program help should be useful, but it doesn't cover the gradient editor (far right in first screenshot). This is mainly because I got tired of writing help. If I get enough requests I'll fix it.

My planned next evolution is to figure out how to make it generate tile-able noise as well as continuous noise.


This is a screenshot of all the pieces
This is a screenshot that has a more useful image, picture it as a height map of an environment where the blue would be water and white is top of mountains
These are other images produced by the program
This could be a heat map of some kind, or a region map possibly red being desert green could be forest, blue water, and yellow deserted islands
This is another like the above, but shows a more complicated landscape
You can download the stand alone .jar file here: NoiseTest.jar

Perhaps in a few days I'll post some details on how this works, but it's likely to take a while.