Posted March 07, 2020 by Balmonec
#7drl
Well, it is finally done! For those of you wondering how I got 8 days in a 7-day challenge, days 1 and 8 are half-days each, since I didn't start coding at midnight. :-)
It took me ages to try and figure out how to fix the AI. I eventually made it brute-force its way through all possible combinations of its available instructions to find the best one, but that still didn't fix it. Eventually I figured out that it was related to the code that I was using to forecast where the robot would go, so I went ahead and added in a player visual of the current instructions, using the same forecasting logic. I wish that I had done that to start with, because that made it really obvious where the problem was - it wasn't handling turns correctly! As soon as I fixed that, the AI got rather dangerously smart.
Once I finished that, I moved on to adding some code to let you pick which level you wanted to enter, then added a bunch of extra levels. Each level is in a data file, so anyone downloading the game can add their own levels without having to touch the source code. I also added the ability to configure a message at the start of each level, which I used to create a series of tutorial levels to introduce people to the game.
At the very end, with less than half an hour left, my wife convinced me to add in pits for the robots to push each other into. I didn't have time to add in a full level with the pits in it, just a tutorial level, but that's something people can configure for themselves if they like. I was able to leverage some of the old code from when this was a more traditional roguelike to handling killing off of robots, so it was surprisingly easy.
I'm really pleased that I got in all the features that I had identified for the core game, as well as a couple of the stretch goals. I still have a number of ideas for the future, which I may or may not get to reasonably soon: