It’s a game, not a program!

One of my goals for 0.2 was to take some time to clean up and improve the codebase, get rid of all that sloppy mess that I’ve been leaving behind. Refactoring, optimizing, getting rid of copy-pasting, etc. You know, the kind of things boring nerdy programmers care about.

Which is all good, but as I’ve realized, it’s also a very dangerous trap. It requires a lot of restraint, because once you start cleaning up code, you never stop. There’s always something that can be improved. Something that could be done slightly better. You’ll get stuck in an endless loop always trying to think up of better ways to do everything, because it’s never perfect. Who knows how many more precious frames you could gain! Then it becomes contagious and all the other programmer contributors start chiming in on all the wonderful new ways you could be doing things. Before you know it you’re ignoring gameplay bugs for programming issues, completely lose track of your goal and only put out a new version years later with no visible changes. And guess what?

Nobody gives a shit!

This is a game! The whole point is to give people things to play! I shouldn’t forget that! So starting now I’m gonna stop wasting time and losing sleep over clean code and going back to implementing actual features. The reason I’m posting this publicly is not only to remind myself of this fact, but to everyone else involved in the project or other similar projects that tend to fall into this trap without noticing. Hope you find it helpful.

4 thoughts on “It’s a game, not a program!

  1. Ronen1kr

    Hey,

    I’ve made a port of your engine to Symbian platform (s60 v3)

    Can’t wait till you finish the project
    (or at least get a verison with saves 😉 )

    Keep up the good work.

    Small bug that I have found:
    You create 2 SDL surfaces which overlap one another (SDL_SetVideo)
    you should delete the first one before creating the second one.

    R.K.

  2. Raul Pedro Santos

    I know what you mean. I used to suffer from that, too. But you have to be careful not to go to the opposite extreme. Clean code *is* important, but you can’t let it consume most of your time, because 80% of the time you’ll invest in that will only reflect in 20% of visible improvements. Gotta love Pareto’s rule.

    I’ve been following your blog since I discovered your project and I intend to give a hand sporadically when I have some free time, to help you move it forward. Now I just need to find that free time thing… 😛

  3. anon

    I tend to follow a rule when writing code: keep interfaces clean and maintain a separation of modules, but write the implementation as messy as you want. The implementation can easily be fixed later. The interfaces often can’t, as they affect a lot of other code that uses them.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.