Archive for the ‘LD48’ Category

How to Make a Timelapse

Wednesday, December 21st, 2011

Timelapses are videos where many successive pictures of a subject are put together, ordered by date.

The first one I remember seeing was that guy who took pictures of the front of his home, every day, for a couple of years. There is another very cool one of a guy who travels around china, always taking pictures of his face. Those videos of crossings in large towns, where you see everybody moving very fast, are also a sort of time lapse.

Besides having a very cool effect, time-lapses can show in a pleasant and interesting way how something was made. One example are the games of Ludum Dare (a challenge to make a game from scratch in 48 hours), that are often followed by a time lapse of how the game was made.

I wanted to add a timelapse video of my own entry to LD, and at first I thought it would be a very complicated affair. Turns out it was really simple.

First thing you need to do is to set up your system to take regular pictures of your desktop. You can do this with a single command using xwd, imagemagick and date:

xwd -root | convert xwd:- -resize 800x800 `date +%d%H%M%S.png`

This will create a screenshot of whatever is on your screen, and name it “dayhourminutesecond.png”. The 800×800 part resizes the screenshot so that the largest size will be 800 pixels (you don’t want full-sized screenshots, unless you don’t care about running out of disk space).

Now you need to set up your system to run the above line every minute. I tried to get CRON to do that, but it * * * * * wouldn’t work for some reason, so I wrote a shell script and left it running in the background:

#/bin/bash
while true; do
i=`date +%d%H%M%S.png`
xwd -root | convert xwd:- -resize 800x800 $i
sleep 1m
done

No magic here.

After you are done with your screenshots, you need to put them together in a video. You do that using mencoder. I took this line from the Cenolan blog (originally for web cam time lapsing):

% ls -1tr > files.txt
% mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi -mf type=png:fps=10 mf://@files.txt

Note the bolded part. You need to change these lines if you save your pictures as something other than pngs, and if you want a different speed to your timelapse. I find that anything under 10 fps gets a bit too slow. The script runs surprisingly fast for 3.000 pictures.

Now go make some time lapses! Here is mine.

Ludum Dare, I did it! :-)

Tuesday, December 20th, 2011

If you graduated in computer science or computer engineering, you have, at least once, thought about writing a computer game.

And if you are like most people, and like me, you never went through with that idea. What a shame, I know how it feels.

But this weekend, I was vindicated. I decided to plunge into the Ludum Dare. The Ludum dare (or LD48 as it is also know), is an open challenge to develop a game in 48 hours. The game must be done from scratch: code, graphics, sounds, everything. Also, each edition has a theme, that should be followed. The theme this time was “Alone”.

Since I’ve never completed a game before (and I suck at GUI programming), I was not very confident that I would be able to complete the dare. Fortunately, that was not the case at all. Not only I completed my game, but I was also rather proud of it, given the constraints, and I also got very excited about the whole LD48 community.

I think one of the big things that helped me along was having a friend do the dare with me. My Milked Eek, from the Mafia Scum Forums, participated in the Dare too, and we would exchange messages every time we had a problem, or reached a milestone, or just had a lol-worthy thought. That helped me keep my motivation up in those 48 hours.

It was a great experience. I managed to learn a lot about Java, and about Slick, the gaming library that I used. I gained a lot of confidence in my programming skills. And I made a game! I made a gaaaameeee :-)

So, here are some links:

Maze Explorers, my Ludum dare entry. You run it with Java. Works in Linux/Mac/Windows

A time lapse video of me making the game

Courage Quest, a fantastic entry for this edition of the LD48. If I didn’t tell you, you couldn’t say that this game was made in 48 hours.

Stay tuned!

Getting Myself into Trouble — Ludum Dare

Saturday, December 17th, 2011

So I decided to participate in Ludum Dare this weekend.

Ludum Dare is an event that happens about 3 times per year. It challenges you to build a complete game, from scratch, in 48 hours. By ¨from scratch¨, I mean everything: design, code, image assets, sounds. A theme is picked and you have to follow this theme.

It is a great opportunity for game developers to show off, and for common folk to try and finally complete that pong reimplementation. Guess which category I´m in ;-)

To record my adventure, I decided to make a time-lapse video of my desktop: something I have never done before. Hey, if I can learn one thing, I can learn two at once, right? So my idea is to take a screenshot of my desktop every minute this week, and put all the images together into a video in the end.

The problems started there…

I found on the net a nice spell to take screenshots from the command line using xwd. Then I tried to put it on cron. Nothing happened. No error message either (if you don´t have a mailing agent installed, where does cron send its error messages in ubuntu??? :-( ). Since I only have 5 hours to the start of LD, and I have other important preparations to make (like writing this blog post), I decided to write an infinite loop script to do this for me, as a quick fix. Here it is, for the curious:

#/bin/bash

while true; do
i=`date +%d%H%M%S.png`
xwd -root | convert xwd:- -resize 800x800 $i
sleep 1m
done

I´ll post more about LD this weekend, stay tuned!

  • Categories

  • Archives

  • Meta


  • "Young Virgin Autosodomized by her Own Chastity"
    Painting, by Salvador Dali