This evening I’ve been doing some testing in Python to see the language power. I love making little videogames, so, why not to try it in Python?
Pygame is a module that makes easier the task, providing classes and functions to manage the display, sprites, collisions, fonts… and has a documentation good enough. Using that documentacion, the Python language reference, a sprite managing tutorial and googling here and there, I’ve developed this tiny example: a number mental calculus videogame.
The player starts with the number zero, and collecting some sheets in a particular order, can perform arithmetic operations on his/her base number in order to get the goal number.
The main character in the game has “momentum”, so it’s a bit tricky to have control over it. You can press [ESC] whenever you wish to terminate the program, and then press any key.
If you like, you can download the source code and try it. I would be very proud of reading comments about it. 🙂
2007-03-11 UPDATE: I’ve received a request to make clear under which license is the code published. You can consider the python source code file (and NOT the icon files)published under public domain, as well as under GPL license. The problem about the icons are that they are borrowed from some KDE style package I can’t remember about (and I’ve tried hard). Such package should be GPL or similar also, but I can’t state it for sure.
2008-11-26 UPDATE:
I’ve adapted the source code to run on Ubuntu Hardy. Download the new version from here.
Hi,
I have used your code for a tennis game for the Wiimote. Can you specify the license? It would be easiest if it was Public Domain + GPL.
The website is here:
http://www.student.dtu.dk/~s011272/wiimote
Regards,
Lean Fuglsang
It’s a good new to know that this code has been useful for somebody.
Please, feel free to use a public domain license or a GPL license (as you wish) for the source file, and GPL license for the icons.
It would be nice if you could publish a screenshot or a picture of somebody playing your geme using the controller. I don’t have a wii pad, so i can’t try the game. :’-(