My dear Watson,

January 7th, 2012
“Very Well. And I say, Doctor, there may be some little danger, so kindly put your army revolver in your pocket”

– Sherlock Holmes, The Red-Headed League

The height of adventure and excitement in the 1900’s, this is so cute! ‘would you please take your gun, my friend? we might have a little danger in our way’. So different from the muscle-bulging, always-scowling, badass macho heroes of our days. Although I guess that this extremely gentlemanly behavior is what was imagined of a macho-hero of that time and place. Still, I love this quote.

As you might have guessed, I’m now reading Sherlock Holmes stories. I got the entire collection from Project Gutenberg, a wonderful website where they archive and organize classical literary works that have fallen into the public domain.

Talking about public domain, it is a good time to remind everyone of the list of works that could have been in the public domain this year. Take a careful look at this list — it is the list of works that would be now in the public domain, under the old 24+24 year rules. Notice that many of these works (specially music and Disney cartoons!) used a lot of inspiration from works that were in the Public Domain in THEIR time! In other words, authors that at the time used the Public Domain, are now NOT giving back, by supporting the crazy copyright system we have in place today.

If you are interested in this subject, this book is a great way to get introduced to the matter of intellectual property, what is wrong with it, what is write with it, and what we should do to fix it.

Happy new year everybody!

How to Make a Timelapse

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

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

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!

Playing the piano

December 4th, 2011

Today I had to wait for a few hours at the Tiete bus station, in Sao Paulo. I was reading “The Blank Slate” by Steven Pinker, a not so good portuguese translation, in a coffee shop.

The cool thing about this coffee shop is that they had a big piano, which was open for anyone who wanted to play it. When I arrived, a kid was playing nicely, and kept on it for almost an hour. After he left, a guy dressed as a bus driver sat down and played for a while as well.

I wish I could play the piano too. When I was about 10, I took maybe 2 or 3 months of classes, but then stopped. Mom says it was because at the time we could not afford to buy a piano, which I needed to progress further. Oh well.

I wonder if I’m still capable of learning it to any acceptable degree.

  • Categories

  • Archives

  • Meta


  • "When you pirate music, the copyright you are breaching is not of the artist; the copyright for the recording typically is owned by their label."
    Chris Feran (a musician)