LD48 #13 : pansapiens timelapse video

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):


#!/bin/sh
OUTDIR=/home/perry/timelapse
DISPLAY=:0.0
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):


#!/bin/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

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…