New games every week!
Y7 - D247 - Paths Blog
4th September 2015

Developments


I spent most of yesterday working with the pathfinding AI.
The basic idea is that, once the basic level has been generated, an AI player runs through the level, trying to reach the other side.
To ensure at least one of these players survives, a fleet of 32 AI players are sent over the level, and each tries to find the "best" way through.
NPA2_009

Here you can roughly see what's going on. The green and red blocks are floors and walls, and then the blue dots are the various AI players, and their varied paths through the level.

Once that's achieved, the final process is to pick one of the AI Paths and use it to generate the level's collectables and checkpoints.

All in all, this entire process takes 3 frames. 1 to build the map, 1 to run all 32 AI players through it, and then 1 more to add the extra stuff once the "Best Path" has been picked.

In the following video you'll see the game mode selected, and the mini-map show up almost instantly. This is how fast the game is at both building the map and finding the paths.

A very simple and extremely speedy process, although I've only so far tested it with short levels. The next step is ensuring it's still silky smooth once you start getting really epically lengthy levels, too!

I'll be spending most of today finding shortcuts to help smooth things out, as well as making the path generator run a little better and then adding some deadly objects using some of the alternative paths.
Should be fun!

-=-=-

Daily Doodle : The Herd



Platdude helps guide a herd of Giraffes towards their lunch.

Mailbag : Empty

If you'd like to stuff my mailbag, (please do!) you can do so right here, at https://bit.ly/AGAW_Mail. Send comments, questions, game ideas, thoughts and more, and they'll probably turn up here, eventually.
Views 7, Upvotes 3  
Daily Blog
New games every week!
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Y7 - D247 - Paths - AGameAWeek