Hey txesmi!

Originally Posted By: txesmi
I saw your function stats leap some ms on the video. Too bad.
Could this be caused by calling 'draw_text' for each tile? I use it for debugging purpose... Without it f.e. fnc ms goes down to 0.3 from ~8 grin

I'm using something like this - array[tile_size * i + j]. Not sure if it's called an array coordinates (I don't know about offset either unfortunately, you code above is over of my dumb head :< ), or not, but this is the way I access the tiles that I need. I don't use any lists at all right now. To find the shortest path (just found out that it's called Lee algorithm), I simple check all surrounding nodes (tiles) starting from B to A (from finish to start) and increasing each node's (tile's) price by 1 (no G, H, F costs, only one price/cost per tile). So finish node has price of 0, then all surrounding nodes have price 1, then all surrounding nodes around those surrounding nodes have price of 2 etc, till start node is found. Walls and already checked nodes (with price != -1) are ignored. At the point when start node was found, I stop all flood_fill functions and trace back the path, by going from the highest price number to lowest (got this algorithm idea from one of those maze solving mouse robotic videos on youtube). This works pretty well, but it seems to be too slow... Also I got an advice from MasterQ32 to avoid using recursive functions and to take a look into dijkstra algorithm.. It's better to use lists for such stuff, but I will need to implement list usage by myself in Acknex, and that sucks. :<


Edit: for those who are interested, here is something very interesting to play with
https://qiao.github.io/PathFinding.js/visual/

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung