Advertisement

I'm looking for articles, just don't know what to call them.

Started by October 14, 2011 06:27 PM
3 comments, last by irreversible 13 years ago
I'm trying to gather some resources on a little side project of mine, but I can't seem to come up with "The thing to type into google" if that makes sense. I know the gist of what I'm searching for just not what to call it so google with actually give me something relevant.

The project I'm working on, is a 2d terrain/ecosystem simulator. The topics and resources I'm looking for is basically anything that talks about processing an entire grid per frame quickly and the techniques that can be used. Anything that talks about spreading a value from one tile out to all it's neighboring tiles, but doing it evenly and quickly.

Anything on Cellularautomation... easy to search for but there doesn't seem to be much about the topic, maybe there's another name for the same idea?
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.

Anything that talks about spreading a value from one tile out to all it's neighboring tiles, but doing it evenly and quickly.


From your description, this could be anything from simple propagation to flood filling to pathfinding. Can you say what it is that you want to achieve?
Advertisement
The first thing that came to mind is finite element analysis / finite element method, since you seem to be looking for a specific "word"?

[quote name='freeworld' timestamp='1318616844' post='4872623']
Anything that talks about spreading a value from one tile out to all it's neighboring tiles, but doing it evenly and quickly.


From your description, this could be anything from simple propagation to flood filling to pathfinding. Can you say what it is that you want to achieve?
[/quote]

The first thing I'm trying to get to work correctly is the flow of water across a height map.
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.

[quote name='irreversible' timestamp='1318693477' post='4872876']
[quote name='freeworld' timestamp='1318616844' post='4872623']
Anything that talks about spreading a value from one tile out to all it's neighboring tiles, but doing it evenly and quickly.


From your description, this could be anything from simple propagation to flood filling to pathfinding. Can you say what it is that you want to achieve?
[/quote]

The first thing I'm trying to get to work correctly is the flow of water across a height map.
[/quote]

This is where weighted pathfinding will help you out. What you want is an omnidirectional search (without a target) based on traversal costs. Essentially, you want the Dijikstra's algorithm. For further information, read up on an expansion on this algorithm called A* (A star) - by doing an omnidirectional search (where the directional bias is zero) within a finite terrain, you'll end up with all possible traversal paths that are sorted by cost (determined by terrain type, slope, etc). You can terminate the algorithm when you reach the edge of the map. Once done, you can then follow the cheapest route along this graph to create your river system.

The algorithm may look a bit intimidating to implement at first if you've never written anything like this - especially since making it as fast as possible will involve a number of slightly less trivial optimization techniques, however it doesn't look like you'll need to run this every frame and it's definitely a good place to start.

This topic is closed to new replies.

Advertisement