8-bit : the film

I went to the Australian Premier (and I expect only screening) of the film 8-bit last night at ACMI last night. It’s essentially a film about the intersection of 8-bit 80 culture video games and art, with a distinct focus in chiptune performers in New York city and various parts of Europe.

I was great … a wicked chiptune soundtrack, lots of video of guys playing Gameboys as synthesizers live, nostalgic “Cracked by … ” title screens from the old BBS cracking days, and some smart (and some wanky) digital art. I stayed around for the Q & A with the Director (who incidently doesn’t own any videogame consoles, or a TV). Oh, and I can’t forget to mention the thumping 8-bit sample infused intro music performed live by DJ Trip (that wasn’t part of the actual film, just a special live set for the ACMI screening).

Well worth a look if you get the chance … the film doesn’t have distribution yet, so I’m not sure where you can actually see it (it took ~ 2 years to make it to Australia, but still seems to be touring various video game and film festivals). Maybe check the screenings page at the official 8-bit site. There was also some pre-screening coverage at Kotaku which has some more info about the film.

Mondrian: Final Ludum Dare 11 entry

I’ve just submitted my final game entry for for Ludum Dare 11.

You can download it here [Mondrian_by_pansapiens_LD11.zip] (Windows and Linux compatible).

More details later. Right now, I have to sleeeeeeeep.

Update: Here’s the text of the README from the zip. You may need to use the level editor and replace level7.pickle and level8.pickle with some easier levels.

Continue reading…

Packaging a Python game for distribution on Windows — py2exe and cx_Freeze

I do my game development on Ubuntu Linux. In case you hadn’t noticed, unlike pretty much every Linux distro, Windows does not come with Python installed by default. For distributing games written in Python on Windows, it’s nice to create a compiled executable version (using py2exe or cx_Freeze, for example) that can unzipped or installed with two or three clicks, without requiring a separate Python installation. Gamers will typically give up if they have to go on a wild goose chase to install Python, Pygame and maybe something else just to get your lame game to run. (Hey, that gives me an idea for a great game – “Software Dependency Wild-goose Chase”. Actually, it would probably be un-fun. Scrap that idea.)

Continue reading…

Profiling Python functions with IPython’s timeit

If you aren’t careful (and even sometime when you are) realtime games written in Python sometimes hit speed problems and require some profiling to bring them to a playable speed. Typically, I would use the Python standard library’s “profile” module to find “hot” functions which are stealing all the CPU cycles. Today I discovered another way.

Over at scienceoss.com theres a nice post about profiling functions using “timeit” within IPython. Essentially, in IPython, you can run:

timeit my_slightly_sluggish_function(x, y)
timeit maybe_a_faster_function(x, y)

and get average execution time values over many replicates of each function call, like:

100000 loops, best of 3: 8.9 µs per loop
100000 loops, best of 3: 4.9 µs per loop

Interesting how programming for games and programming for scientific number crunching often have the same requirements and boil down to using similar techniques.

Interactive fiction in Python ?

I’ve just been researching Interactive Fiction (aka text adventure) systems written in Python. I’ve always wanted to make an interactive fiction, but never quite got around to it. I even started learning the Inform language a few years back, which can be compiled to run on the Infocom Z-machine interpreters (like Frotz, among many others). Of course, I’d rather write it in Python since there’s more chance I could add some custom features to the game.

As tempting as is it to reinvent the wheel and write my own IF interpretor in Python, I figured it was likely that others had already done this grunt work for me. After a bit of Googling, so far Python Universe Builder (PUB) looks like the best option. Hopefully this will save me from the grue.