SRG Update #25

Work continues on BAWD 1.0.2, roughly on schedule. I may have to slightly stretch the definition of “mid-month”, though.

One part of that is my estimate of one piece of under-the-hood functionality being off.

Prior to BAWD’s rewrite, I had implemented much of the galaxy traveling code as direct point-to-point travel. Even though you would travel along a hyperlane route, it wasn’t animated as such. It did know the route distance, however, thanks to an implementation of Dijkstra’s algorithm.

For the rewrite, I decided I’d rather animate the player’s ship traveling along the path, to continue with the “more intuitive, more skeumorphic” approach the rewrite exists for.

The estimate was off because in my memory, I had implemented Dijkstra’s algorithm with the pathfinding part accessible but ignored. However, I did not do that. I implemented a slightly simpler form that didn’t memo-ize the return path (i.e., the “parent node”) part of the algorithm.

Moreover, the way I wrote it was “clever” in that bad way that programmers sometimes let themselves get away with, and was actually quite difficult to modify to return the path.

There’s a lesson to be learned there, but who doesn’t love re-implementing Dijkstra from scratch? (… most people?) Feels like being back in school, in a fun way.



That’s it for now!