Gaming the System with Python
Traditionally, scripting languages help administrators manage systems
with relatively small scripts. Python is used in this capacity as well
as for larger applications such as installation programs. The latest
effort, though, uses a library and tools from the PyGame effort to take
Python into the realm of interactive gaming.
PyGame (http://www.pygame.org) offers a Python-based game development
library built on the Simple DirectMedia Layer (SDL). SDL
(http://www.libsdl.org), the premier Linux library for graphics-heavy
games, provides multimedia capabilities on a number of platforms,
including Linux. SDL is similar to DirectX, but it supports multiple
platforms. A number of commercial games, especially those ported by the
now-defunct Loki (http://www.lokigames.com) use SDL. Possible Worlds, a
game covered here previously, also uses SDL.
SDL is an impressive effort. By building on top of SDL, the PyGame
effort lets Python developers take advantage of the richness in
multimedia that game users take for granted to build quite a respectable
game entirely in Python. Python developers should check out the nice
tutorial at http://www.pygame.org/docs/tut/newbieguide.html for an
explanation of PyGame's offering. PyGame also provides a code repository
at http://www.pygame.org/pcr/repository.html, which is full of small
routines to help speed game development.
SDL and Python, both already multi-platform tools, make supporting
multiple platforms a lot easier. One of the most advanced games written
with the PyGame tools, Civil, an American Civil War strategy game,
demonstrates SDL and Python's cross-platform prowess by supporting
Linux, MacOS X, Windows, and BSD UNIX versions of the game. Civil
(http://civil.sourceforge.net) is a turn-based strategy game that
focuses on small battles from the Civil War. An extensive manual
explaining how to play the game can be found at
http://civil.sourceforge.net/playing.html.
Civil's main drawback is that, so far, you need to download the code
from CVS in order to play (see
http://civil.sourceforge.net/download.html for details). That should
change, however, as the game nears a 1.0 release from the current 0.7
version. More importantly, the PyGame tools are slowly tearing down the
barriers preventing Linux developers from making good games, and I
expect the future will see more quality Linux efforts like Civil.
Read more about opinion in ITworld's Opinion section
» posted by ITworld staff
ITworld
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
Brian Proffitt
Microsoft/Novell: Breaking Down the Coupon Numbers
Esther Schindler
Drupal's Dries Buytaert on Building the Next Drupal
Tom Henderson
Top Ten General Operating Systems Rants
pasmith
PS3 motion controller delayed; goes up against Project Natal
sjvn
Neolithic Windows security hole alive and well in Windows 7
claird
Perl source code comparison makes for good reading
mikelgan
Cell phones don't create stress or interrupt much
Sandra Henry-Stocker
How to: The Unix Interview
Where Google Chrome security fails: the password
I heard mention that the Chrome OS will have some sort of encryption available a la bitlocker. If it's possible to encrypt personal data using another password or key, then it may have potential for very secure data.... And Ubuntu has an 'encrypt home directory' option, perhaps google should follow suit.
- Dann
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
- Ubuntu advances: Why Ubuntu server installations will surge in 2010
- Social media marketing: How to make friends with benefits
- More...
Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.






