DIV ARENA FORUMS

Pathfinding fun

Vortigano - 12-6-2019 at 08:45 PM

I guess this shouldn't go on wips or anything. I was studying a bit about pathfinding algorithms and had a lot of fun using DIV language for practice and I think that implementing it in C language could increase the speed a lot.
P/d: div path_find() is much better than this XD so it is unnecessary to create a library for div.

Attachment: PATH_FIND_05.zip (1.1MB)
This file has been downloaded 833 times

dom cook - 13-6-2019 at 04:22 PM

Well it works. Good job. By the way, was the maze generated?

Vortigano - 13-6-2019 at 04:35 PM

No :(, i made all of them in pcx format. But i wish some day make some maze generator using (first in depth/ primero en profundidad) for it. Something like this one https://www.algosome.com/articles/maze-generation-depth-firs...

[Edited on 13-6-2019 by Vortigano]

Vortigano - 13-6-2019 at 08:25 PM

Maybe a pruning process would speed up the program, i don't know.

MikeDX - 14-6-2019 at 10:25 AM

I created a maze generator in DIV for my PENGO remake

http://js.mikedx.co.uk/divpengo.html

hit space / other keys to show the maze generation

The code is here

https://github.com/MikeDX/div-pengo

dom cook - 14-6-2019 at 11:30 AM

That looks just the job Mike. I might be borrowing it at some point.

MikeDX - 14-6-2019 at 11:52 AM

The code is a direct port of the z80 code from the original arcade game, it even has an option to use the original bug!

Vortigano - 6-7-2019 at 09:46 PM

When I was ill, I improved the visual aspect of the pathfinding.
The algorithm is a kind of A*, the green pixels are the candidates of the open list, the red pixels are the members of the closed list. I think this would improve the "dynamic debugging" of the algorithm.
That's all for now, and let there be rock.

Attachment: PATH_FIND_06.zip (1.1MB)
This file has been downloaded 795 times