So, while working on yet another engine (actually, a pretty much complete game-hold) and fighting some problems with Move acting different from DROD:TCB I came up with idea of doing Pathfinding.
Generally it was pretty easy and straightforward, I have to give credit to BlitzMax for generating majority of the code for me (not without getting proper instructions first though
).
So anyway, I might be mixing some definitions, but for me Pathfinding constist of Pathmapping (mapping the path with numbers) and then following this path. So Yes, I managed to complete the first step, Pathmapping and it works well and fine... but devilishly slow. It is as if comparing Warp 9 to drowned snail in mud with whatever he uses to walk tied with rope and glued to a mountain. Not that I expected any other results, but if you only want to compute a path once and this path leads through a maze, you are fine.
Before you download and test this miracle of science I have to warn you -
DO NOT TRY TO USE THIS WITH OPEN SPACE OF SIZE BIGGER THAN 5x5!
Really, I have to stress this, because it will just crash DROD and throw an error. So, remember, Mazes Yes,
Open Space NO.
I am not really going to describe how it works. Perhaps you can optimize it, but I am afraid I don't really care - I don't think it can be optimized enough to make it usable for anything (especially that actual finding the path in Map would be almost as slow).
Now that you read this lil' rant, you can go to downloading. The room I created shouldn't crash DROD, it takes only around 1/3-1/2 of second on my lousy notebook, but if you are afraid that it might damage your data (10 crashes did not damage mine) feel free to backup it first or ignore this post whatsoever.
____________________________
My website |
Facebook |
Twitter