Development Day 2: Dijkstra Map Woes


First off, I just realized that if I count yesterday as Day 1, since I started work at 5:00 PM, I'll be up to Day 8 by the time the end of the week rolls around, since I'll be working in 8 different calendar days.  As long as I finish by 5:00 PM on Saturday, I'll have finished by the end of the 7 Day Roguelike Challenge!

Finishing up the Dijkstra Maps (and accompanying unit tests) took the rest of my afternoon.  The unit tests took a large chunk of that, and I'm a little worried that I spent a little too much time there.  On the other hand, I did find a few different bugs in my logic while I was writing the unit tests, so overall I think it worked out OK.

Unfortunately, when I actually implemented a Dijkstra map to let the creatures track down and attack the player, it proved to be so performance intensive that the game practically stuttered to a halt.  Visual Studio decided that it didn't want me to be able to use the profiling tools, either, so I had to do the best that I could and use some common sense to try and optimize it.   I managed to improve things somewhat, but it still isn't great.  It will have to do for now, though, as I'm getting behind.  I had hoped to get a basic dungeon generation algorithm put together by now, and start working on the heart of the game - spells.

As you can see by the screenshot, I've switched to a new test dungeon, which seems to have helped with the Dijkstra map lag, at least a little.  It seems to be related to the number of passable cells it is iterating through, which may reduce the size of my maps a bit.  I also managed to handle creature death (both NPC and player character), at least in a basic fashion.

I'm starting to feel a little behind, as I'm not nearly as far along as I was hoping to be.  Well, that's why I hadn't planned any features for later in the week - I'll just have a less polished game that actually works.  I wasn't prepared enough to take off any days of work for the challenge, so my time for the rest of the week will be limited to the evenings (and most of the day on Saturday).  Tomorrow I'll be tacking maps!

Get Spellforger 1: Entry Exam

Leave a comment

Log in with itch.io to leave a comment.