no love / linux timelapse howto

Posted by
August 9th, 2008 1:59 am

The story so far:

no love

Woke up early today at 06:15 CEST (which is unusual..), but haven’t really done anything since then, except having some more or less vague ideas about what I’m going to make. For the code part I was planning to do it entirely in Lua, using the löve game box thing. I’ve briefly looked at löve once before, but discarded it then because it was missing a few features I’d like (such as fixed timestep). For some reason I thought I’d actually give it a chance though, and what better time to try out new things than during Ludum Dare? It does seem to have some nice parts, and assuming I could get it to work it’d save a fair bunch of engine coding in favour of actual game development. So, that’s what I’ve mostly been fiddling around with for these past few hours since I woke up.

I won’t be using it, though. I do like parts of it, and some annoyances are bearable or can be worked around (fixed timestep can at least be approximated, with some slight drift), but there’s some serious issues that can’t be overlooked. For example, I can’t get it to load any png images (“png library error”), and the love executable sometimes segfaults on exit.

Also, I get the impression this isn’t actually intended to use for stand-alone games(?). I couldn’t find any way to get it to autorun a game on start, you have to pass the .love file or directory as a command line parameter. A bat/shell script easily fixes that, but eh. Also, there’s a ton of dependencies, so packaging the final entry would be pretty involved for the Linux version at least (though they do provide Windows binaries).

I’ll just have to code up some Lua game engine myself then, won’t I =].  I’ll begin work on that in a little bit I guess..

recording a timelapse in linux

This comes a little bit late perhaps, but people always ask about this, so.. To record a timelapse in Linux, first get scrot for capturing screendumps (some distros have a package for it). You can use some other screen capturing tool if you really want to, but scrot can capture screendumps without annoyingly freezing the screen like many other screen capture tools seems to do for some reason. Then just run that every x seconds with some shell scripting. Make a directory somewhere with a couple gigabytes free space, enter it, and run this (every 30 sec here):

while true; do scrot; sleep 30; done

Hit ctrl+c to stop it when you’re done. Now you’ve got a directory filled with lots of huge image files, which you probably want to combine into a video somehow. Er, I apparently lost my script for that, but the mencoder man page should be helpful =]

4 Responses to “no love / linux timelapse howto”

  1. gugu says:

    wow this a amaging BLog i got info which i want.

  2. GBGames says:

    Here’s a makefile I made:

    @echo “Use make capture to get images once a minute”
    @echo “Use make movie to combine images into an avi”

    while true; do scrot -e ‘convert $$f -resize 50% $$f.jpg; rm -f $$f’ & sleep 60; done

    @mencoder “mf://*.jpg” -mf fps=4 -o timelapse.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800

    rm -f *.jpg
    rm -f *.avi

  3. GBGames says:

    Er, there were tabs originally, but you should be able to figure it out. Time ti wiki this info!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]