Well, it’s not an official entry, since it’s way too late. You can see what I was trying to achieve here and here. Essentially, I was attempting to entertain myself in the boring parts of a plane flight from Rome to Melbourne, via Hong Kong, by making my Ludum Dare entry. Various problems, mainly to do with finding working laptop power, prevented me from submitting it by the deadline.
This is the product of about two laptop battery charges (~2.5 hours), and one hour to polish, fix the odd bug and package .. so in total it’s about a ~6 hour game. It’s based on the garbage compactor scene from a particular space opera that had it’s heyday in the late 70’s and early 80’s. You could imagine it was one of the ideas that was considered, then discarded, before the early arcade developers went “Nah, we should do a 3D X-Wing game with vector graphics. That would be much cooler”.
You are the (inexplicably) green hero. You play with the arrow keys. You move bits of junk (grey) such that you can jam the compactor before it crushes you. Some bits of junk (white), are too large to move. There is only one level and no sound.
Play it here (Java applet, requires the Java plugin that you most likely already have installed).
Here’s a new game I’ve been developing on-and-off for a few months now. I’ve become pretty busy at “The Day Job” recently, and due to commuting time I haven’t found time to add all the features I’d like. I thought rather than sit on this game for many more months, I’d just release it as is. It’s polished enough to play … but you’ll need a friend (if you live in Melbourne … I’m happy to drop round and play it with you :) ).
Phobocore is a two-player hotseat game, where the aim is to capture all the planets onscreen by shooting them. It’s sort of a cross between Asteroids and Risk/Galcon, with a respectful nod to open field overhead shooters like Robotron, Bezerk or Gauntlet.
Download Phobocore (v.09 for Windows & Linux) [10.3 mb]
The experience of creating this game has been quite enlightening so far. It really got me thinking about aspects of game design I hadn’t thought deeply about. I threw around lots of ideas relating to ‘resources’ and ‘defenses’, particularly thinking about how RTSs like Starcraft require balance in play style between defense building, offensive maneuvers and resource gathering. Good players must multitask and proiritize to get the upperhand on their opponents. Key questions like “Should captured/neutral/enemy planets be solid objects or unhindering ?” occupied more than one dinner time conversation, bearing out all the ways these would changed the game. I had great fun testing the effect of different game rules, and how these changed the dynamics of the gameplay (with huge thanks to my long-suffering girlfriend for playtesting. The next best thing to writing an AI player :) ). If you are keen to fiddle with these game rules yourself, you can throw various flags in the phobocore.py sourcecode to test how these variations change the play style required to win.
I also spent considerable time tweaking things like fire rates and the “planets-held to ammo recharge rate” ratio to try and make the game somewhat fun. It works pretty well for players that are equally matched, but much like Galcon, once one player gets an edge, it can be hard to recover and things are over pretty quickly.
Big features I’d love to add in the future: an AI compurer player for single player mode, and maybe network play. I need to work on the collision detection, improve the graphics, add background music, and add a help screen / tutorial screen and slap on a license (probably GPL for code and Creative Commons for audiovisual assests).
Have fun & feedback is, as always, welcome !
Here’s the timelapse from my recent Ludum Dare 48 hour game development compo session.
LD48 #13 : pansapiens timelapse
One screenshot every 5 mins, taken with the script (screenshot.sh):
import -window root -display $DISPLAY $OUTDIR/$(date +%F_%R.%S).png >/dev/null 2>/dev/null
using the cronjob:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/perry/timelapse/screenshot.sh
And converted to a video by running the script (timelapse_convert.sh):
# convert pngs to jpgs and scale down the size
mogrify -format jpg -scale 840x526 *.png
# convert jpgs to video
# will fail if there are any frames of different sizes (geometry)
# also, need to remove "blank" frames if the screensaver went off
mencoder "mf://*.jpg" -mf fps=4 -o timelapse.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800
Note to self: Check out TextWidget before I finish my (unreleased) SimpleMenu moduleÂ … I may be able to use TextWidget within the SimpleMenu framework …. or the work may have even been done for me since they look similar in spirit.
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.