It’s Sunday, March 18th and exactly 7 days ago I started my 7DRL Challenge. Sadly, I wasn’t able to finish my roguelike in time but it was fun nevertheless. If I had to put a number on the completeness of the game, I would say it’s about 33% finished, but not really playable since I spent (wasted?) too much on time on the implementation of the Mech class and the UI instead of adding content/combat. In retrospect, I see a lot of room for improvements and I will write them down here such that I won’t do the same mistakes twice in next years 7DRL !
#1 - Have a plan
The biggest mistake I did was not having a plan ready for the challenge. I had a very rough idea about what I wanted to do but my ‘design document’ was basically non-existent and I followed a ‘design-as-you-code’ philosophy. This led to a lot of wasted time because for each design iteration I scrapped parts of the code and rewrote them. The fact that I also wrote specs which I had to fix after scrapping code made it even worse. The specs were in general quite useful though because I didn’t encounter any weird bugs and was quite confident in my code base over the course of the challenge
#2 - Stick to your plan
When you have a plan, you should really stick to your plan because there is probably not enough time for implementing that cool idea that just came to your mind. So instead of immediately implementing it, you should write it down and maybe implement at the end if there is some time left. I basically spent all of day 5 on implementing a mech ascii art in the UI and coloring it based on the amount of damage it has taken. Although its looks cool, a simple bar or numeric value would have done the same job and would have cost me only a fraction of the time.
#3 - Go offline
Whenever I opened my browser to have a look at the Ruby/Gosu docs or searching for a specific problem on Stackoverflow I just couldn’t resist to have a quick glance at my mails, or Facebook, or 7drl.org, or …, you know the story. This was a huge time sink. My most productive three hours were at starbucks where I had no working internet and did just focus on Programming, Motherfucker ! This also leads me to lesson #4
#4 - Lock your room
I don’t know how often I explained my girlfriend that whenever she interrupts my flow by asking me ‘where I put here whatever’ or wanting me to ‘just open that tin’ I totally lose my train of thought and need at least 15-30 minutes to get back to the state I was in. This usually also leads to nasty bugs because you just forgot something that you wanted (needed) to do. I really think non-programmers just can’t understand that stuff
#5 - Know your frameworks
I lost about half a day by getting familiar with Gosu and would have lost even more if I would have used Chingu or the Ruby wrapper for libtcod. But reinventing the wheel and implementing all by yourself just doesn’t work either. So, getting to know the frameworks you want to use beforehand is crucial.
#6 - Don’t drink and code
Yeah…didn’t work :)
7 days of coding and all I’ve got are those lousy screenshots