Songfever, at it's heart, is a tangible front-end for iTunes. Album covers are projected onto four physical objects standing on a shelf. With a scroll wheel, attached to the shelf, you can scroll through your music library in a Cover Flow like fashion. The goal was to reintroduce the aesthetic quality of a physical music collection (CDs, LPs), while maintaining the comfort of a digital one.
Each of the four covers are tracked by a webcam mounted above the shelf. Their positions are translated in software in the same way the projector located relative to the webcam in the real world. When rendered in a 3D OpenGL view and projected back onto the shelf, the album covers line up with the physical objects again. Approximately, that is.
Songfever was our main project in the 4th semester for “Digital Media” at the Hochschule Darmstadt. I was responsible for the programming; the UVC Camera Control I posted some month ago, was a small part of it.
We finally managed to built a website for our last years semester project Klangpong. I was mainly responsible for the programming and 3d graphics. The full Processing source code of the game is available at the site, but it’s a bit complicated to get it up and running.
We will present the game at the Mediale (Darmstadt/Germany) starting tomorrow – so if you want to play it, pay us a visit!
In my last post I said I’d add some exhaust streams to my robot. I also said I’d use particles for that. Well, I didn’t. I spent several hours trying to get it right, but it always looked like my robot’s taking a bubble bath instead of riding on a powerful jet engine. I ended up using a single alpha blended sprite for each of the streams. This may sound cheap but actually looks really good.
As you will see in the following video, I did use particles for another effect: the huge explosion you’ll face every time you loose. Since there really is no way to “win” this game, I at least wanted to make the Game Over as visually appealing as possible. I also added a start animation – the robot now launches like a real rocket from a girder that is disconnected just after the engines have warmed up.
This video shows the game in its current state – it is by no means final. There’s still a lot of stuff missing: a properly designed HUD, effects when crates are collected or new ones spawn and of course: sound! I can’t really talk about sound yet, because I haven’t done anything so far. The only thing I can tell you is that Yuckfu will have sound and music. Hopefully.
Read on for some more in depth (and embarrassing) game developer geekery.
After my last post I read a bit more about displaying text with OpenGL. One of the more popular solutions is to have a single texture containing all (ASCII) characters of a font. As it turned out, there are several applications to build such a texture for you. Bitmap Font Builder is one of them. It looks a bit clunky, but gets the job done nicely – and it’s free!
Here’s a quick test I did with the Helvetica typeface. I exported the texture as a transparent PNG file, cropped it and added a simple drop shadow effect in Photoshop. For now, I only used the upper case letters. I’ll probably come back later and export the full set of Latin-1 characters.
It’s been a while… I finished the basic gameplay mechanics of my iPhone version of YuckFu just a day after my last post, but hadn’t yet found the time to write about it. So here’s just a short update.
As you can see in the screenshot, the game still looks like crap. But that’s intentional (no really, it is). The main focus of YuckFu was always on the gameplay, so thats the first thing I wanted to finish. Just to make sure it works on the iPhone – and it does! A game with good graphics that is no fun to play isn’t worth anything. A game, however, that doesn’t look nice and shiny but is fun to play, is still a good game. Just to clarify: I’m aiming for both, but I’ll still need to tweak some values and let some friends test it before I move on to the graphics side.
And of course there’s on thing still missing: the score. Displaying text in OpenGL applications has always been somewhat tedious. I haven’t yet really looked if OSX provides some different solutions, but as far as I know there are only two viable options: Using a single texture with all glyphs in it (built in Photoshop or whatever), or loading a TrueType font and rendering each glyph into a texture. With both methods you’ll face the same problems: Each glyph has to be stored in memory – this is fine for ASCII characters, but can get challenging with UTF8 characters. So a scoreboard with names consisting of characters outside of ASCII is probably not going to happen for YuckFu. The other problem is the lack of support for “features” like kerning. Even displaying proportional fonts can be a pain. So, maybe I’ll just settle with a retro looking bitmap font – but not before I’ve checked if OSX does indeed have some magic way for solving these problems! Although they are not exactly on the OS side…
After some hours of reading to figure out how exactly the memory management with alloc, dealloc, retain and release works with NSObjects in Objective-C (here’s a good article) and some more hours to get used to the funny syntax, I was finally able to do something with it.
To get my 3D model onto the iPhone, I had to find a data format that is easy to load and can be used directly in my Application without much modifications. I decided to export the model from Wings3D as Wavefront .OBJ file, which is a pretty straight forward ASCII format. I, however, didn’t want to go through the hassle of parsing ASCII data in C, so I wrote a small PHP script to transform this .obj file into a binary format that was ready to be used with OpenGL ES.