A few weeks ago I was assigned a final project. The final project could be anything as long as it’s written in Python. So I chose to make a game.
And so the mad scramble began. Actually, it wasn’t really a mad scramble at all. I took my time with the code, working on it only when I was able to do so. And so without the distractions of my brother, I was able to knock out 8 hours of coding today, which equates to 570 lines to check into source control.
Python is an incredibly addictive language. I thought it was just some simple language for kids; boy, was I wrong. It is a language of elegance, of minimalism. It makes Java look like a rusty pipe under a sink (which it is, for the most part). Say goodbye to curly braces and excess if statements. And bugs are incredibly easy to find, even without an IDE, if there are any in your code.
Python does have its shortcomings, however. Its object-oriented design isn’t exactly something familiar, and the mechanics of it are definitely not explicit. Still, it allows for multiple inheritance along with a degree of control you could never have with Java. In Java, you had to make a rigid model of the class before actually implementing it, and changing constructors around leads to problems down the line fairly quickly. In Python, however, you can build the implementation first, and then make an object encasing that behavior. It is purpose-driven rather than enterprise-driven, and so it works extremely well for small projects.
This is what I’ve been able to accomplish so far. I have until the 20th to “ship” the project, if you will, and I’m quite satisfied with the progress so far. I estimate it will only take 500-750 more lines to bring it to a playable state, but then again, I cannot make a fair estimate of line count because it’s not really what matters. I need to implement network, HUD, and some game-specific behaviors like grabbing the ball and throwing it to the goal.
I shall press forward…