Meander Algorithm

Meander Algorithm

The meander algorithm is a combination of using mazes to allow a meandering with bresenhams line. Below you can see the actual algorithm in simplicity. Obviously you could use noise maps to created heighted terrain based on the river to make it look pretty.

Meander Algorithm:

  1. Choose a starting map edge and ending map edge, acquire
    the terminal points based on those edges. Usually this would be a random point on those edges. Maybe you'd want to weight it so it's predominately in the center, or you could restrict it to a certain part.

  2. Create Bresenhams line between the terminal

Read More

When A* Mobile Pathing Fails

When A* Mobile Pathing Fails

Recently implementing a super easy JS library for A* pathfinding called easystar, I discovered an interesting issue: All the mobiles would collide in certain locations or "hotspots" on the maps.

There are two main reasons I can see for this:
1. The map itself is most easily traversed through certain spots.
2. The map is ONLY traversable from one side to another through certain locations.

What's likely exacerbating the issue is I'm allowing a mobile to pick a random spot on the map (apparently they know all things,) and then A* pathfind to that location (yep, they're super smart like

Read More