Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Pathfinding fun
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 869 times
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Well it works. Good job. By the way, was the maze generated?
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
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
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Maybe a pruning process would speed up the program, i don't know.
|
|
MikeDX
|
|
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
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
That looks just the job Mike. I might be borrowing it at some point.
|
|
MikeDX
|
|
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
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
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 829 times
|
|