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.

Masonic symbol: square and compass.

Tools. Can you tell I'm just back from two weeks in Rennes-le-Château?

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.

In long:

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.

Pygame logo

There a a lot of tile-based games made with pygame so we know we can do it.

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 !


About Niriel

Cynical utopist who likes red wines from Languedoc and playing Minecraft instead of working on his own game.

Posted on 06/08/2011, in Infiniworld and tagged , , . Bookmark the permalink. Leave a comment.

What do you think about it?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: