The tools of the craft.
The time to code is near. I lay before you the tools we shall use to design and build our magnificent game.In short:
- Python : because it’s fast to code with it.
- pygame : because I need to display 2D graphics and handle mouse/keyboard events.
- eclipse : because I kind of got used to it by now even though you probably prefer pico/emacs/vi/notepad/idle.
- PyDev : because I want eclipse to speak Python, not Java.
- Git: for controlling versions.
- GitHub: for sharing the source with you guys and gals.
I wish people would agree on how to capitalize these words… pygame, Pygame, PyGame ? I have to look it up every time. You’d think programmers would become case-sensitive after a while.
Now, there are one gazillion ways of doing it, all the combinations of programming languages and libraries you can come up with. The choice is quickly made though: I’m going to code in Python. I want to code fast and efficiently even if that means sacrificing some performance. Python is open source, cross-platform (mostly), comes with many delicious libraries, and takes care of all the boring stuff to let me focus with the cool things. Yes, python is slow, and I would get so much better results in C ANSI. Except that I’ll spend four months displaying a pixel on a 64 bits Linux laptop, and then I’ll have to redo the same for a 32 bits Vista machine. No thanks. Plus I hate C ; I like Pascal more. Also we’re doing a 2D game, of the kind that ran smoothly on a Nintendo Game Boy, so I think our over-powered machines won’t have too much troubles running a few more layers of software if that makes things easy for me.
Python and its standard library are not enough though. I want something that is able to display sprites and poll the mouse and keyboard events. SDL is going to be enough for me so I’ll go for pygame. pygame is a relatively thin wrapper around SDL and comes with a nifty pair of classes: Rect and Sprite. If I want windows, buttons and all, I’ll have to code them myself.
I really don’t want to use anything more. I don’t want to track bugs in someone else’s code. I don’t want anybody to steal my main loop (Twisted, tk, I’m talking to you). I don’t want to make my game a nightmare to install. I just want to keep control of what I’m doing.
That being said, I must jump on my bike and say hello to my hamster I haven’t seen in two weeks !