To test my experiment with a tower defense in an AI sandbox I started by implementing some basics.
In this first step I generated a random “world” with boxes on which I implemented the famous A* algorithm. As a start the user can move around in the sandbox by clicking on the destination.
For simplicity reasons I decided to use a regular grid as a graph – this will suffice for a this experiment. Not at all fancy or anything but but here is the result of this first little step:
If I get more time, I will post on some more technical details in my implementation, for example how I used DDA for path smoothing. But I’ll have to save that for a future post.
Next step is probably to get some rudimentary bots in there, moving around. Then add physics as well. This should introduce some interesting problems with locality in the pathfinding, entities get pushed of the grid etc. Luckily I already have written a physics engine, and I do have code for bots, if not on the computer at least in my head.. somewhere.