a little docs on astar debugging

This commit is contained in:
Tim Felgentreff 2023-01-10 17:01:52 +01:00
parent e5ca6aa17f
commit 33a8211a69

View file

@ -28,6 +28,19 @@
// 02111-1307, USA.
//
// timfel: How to debug the pathfinder.
// In debug builds, there is a lua function "DumpNextAStar". The way I use this
// is to enter a game with stdout redirected to a file (that's the default on
// Windows), make sure nothing is moving, then hit "Return/Enter" to write a
// cheat code, and then type "eval DumpNextAStar()". Then send a unit somewhere.
// Next, open the stdout file using "less -R -z64 stdout.txt". Replace the "64"
// with the height of your map. The entire map will have been dumped using RGB colors
// to stdout. I use the arrow keys to position the first line of the first A*
// iteration at the top of my terminal, and then hit "Space" repeatedly. If the
// "-z64" argument used the correct map height and the terminal is wide enough,
// each time I hit space, it will scroll exactly far enough to have the next A*
// iteration first line at the top of my terminal, giving a sort of poor animation.
//@{
/*----------------------------------------------------------------------------