Algorithm debug improvement
-
Could you implment debug type gameobject like a flag. For example I need mark some places on the map for every tick like a creep path or some zones of map (avoid or ignore) and this can visualize my algorithms. Something like this:
Game.debug([<RoomPosition>])
Every tick this will be redrawed (deleted last objects and placed new objects)
-
try
JSON.stringify(<some value>)
-
How
JSON.stringify
can visualize my algorithms?
debug type gameobject like a flag
Every tick this will be redrawed
I mean DRAWING on the map. Draw debug objects like crosses or circles but this is temporary objects that exist for one tick and for next tick you shoud put this objects again. May be it can be:
Room.drawCircle()
Room.drawLine()
Room.drawPoint()
-
For paths: feel free to borrow code from https://github.com/avdg/screeps/commit/51216fea216b66322418ae338c0683a275df13b1
-
Uh, that's this file https://github.com/avdg/screeps/blob/51216fea216b66322418ae338c0683a275df13b1/extensions/tools/commands/showPath.js
-
I just ask about feature. If this impossible and you can't todo this, it's ok. I needn't flags with their not disabled name I need just circles, points and lines for debug visualizing.
-
1) Greasemonkey userscript
2) overlay canvas on top of the game
3) draw on canvas
4) Profit!
-
But how I can get game data from Greasemonkey?