The Lappeenranta University of Technology (LUT) organized 20th summer school on telecommunications during the last week. I was there arranging it and running a 24 hour codecamp. The theme of the summer school was “Supporting independent living with technology”. We had a number of seminaries related on the theme and at the end of the week we had a 24 hour codecamp. During the codecamp the students were introduced to the Nokia N900 smart phone that runs the newest Maemo operating system. The good side of the OS is that you can use Python to quickly develop applications and test them. This was the case on the one-day codecamp – Program something that supports independent living at home and do it quickly (and dirty :-P).
Even though I was helping people out most of the time and programming some harder parts (like the very evil how-to send an SMS), I still had time to do something own. As most of the readers know, I am a big game aficianado. Thus, I had to do a game😛 All I had was a few dark hours of the night. I decided to use pygame as the library to program with and away I went!
Okay… Where do I start from? Well, I had a mobile device on my hands. The first thing that came to my mind was to create a certain limitation (in addition to the small amount of time I had). Thus, I decided that the only way to control would be with the accelerometer of the phone – no touching, no keyboard buttons. Just tilting the phone.
Fine, I had a limitation and the controls. Now, the game? I wanted to have something fast paced, quick to play, quick to fail and quick to start again. Thus, I came across the idea of a car game. Just your old, not-so-breakthrough, driving game.
So, now we have the game idea: A car driving forwards that moves according to the tilting of the phone. Nice😀
Well, something easy and fast-paced. This was quite easy to come by. Imagine a car driving very fast on the wrong lane. There are other cars coming towards you. The player needs to tilt the phone to avoid colliding with the law-abiding citizens. As this would be too easy by itself, I added oil spills. If the car hits an oil spill, it looses maneuverability – the player cannot move the car for a few seconds, thus forcing the car to just keep going straight. This added some nice challenge to the game.
Also, the game keeps track of the player’s score. The further you get, the more points you get. In addition, if the player tilts the phone forwards the car goes faster and if tilted backwards the car brakes. Going slow is easier, but the player earns a lot less points in the exchange. So, either higher speed, higher gain and higher risk or the slow grandma way😛 Now there is a simple gameplay logic and challenge to the game. All that is missing is…
Urmm… yeah. This is something that is needed. I guess. As I suck on drawing and making graphics I had to go with some really cheap stuff. If you can go the whole nine yards, I decided not to even go to the start line. No fancy programs and pixel graphics. Instead, I drew the car, oil spills, the road and the oncoming cars by hand. Some really ugly and nasty pencil drawings. BUT! After editing them a little bit (just changing temperature, saturation, hue, brightness, etc.) I came up with pretty decent looking graphics.
Here are the graphics I created and edited (all in a short amount of time)
Ugly? Well, it still works surprisingly good.
Putting it all together
Okay, so now I had everything in place. Easy controls, cheap graphics and simple gameplay. The creation of this whole game from a scratch took me about 4 hours, which I am quite proud of. Here is a screenshot of the game (yeah, screen capture of a quick-paced game is not easy, but you get the idea):
If you are still interested and would like to try out the game (I think it works only on n900), get the source from the following page: http://www.codecamp.fi/doku.php/ssotc_2011/grp1/start
It’s completely free and open-source. Do whatever you want with it, but please, at least provide some credits to my work. Also, if you happen to use something I have made, please let me know. I would be more than happy to hear about it😀