Continuing with the theme from my previous post, here’s the first introductory video for the new Stair Dismount for iPhone and iPod touch.
Youtube link: http://www.youtube.com/watch?v=tAeTxPINttw
Continuing with the theme from my previous post, here’s the first introductory video for the new Stair Dismount for iPhone and iPod touch.
Youtube link: http://www.youtube.com/watch?v=tAeTxPINttw

Me and few others have recently posted some “Dismount Moments” photos to Facebook, as seen here for an example. These images originate from the all-new Stair Dismount, created for iPhone and iPod touch. It is of course a direct successor to the original Stair Dismount released in 2002. The game has been submitted for Apple’s approval to the App Store, so it should be available for purchasing quite soon (just a few weeks). Here’s a short introduction of what the new game is all about…
Read the rest of this entry »
Here’s a little C++ utility class for splitting C strings into tokens by given separators. It’s inspired by “tokenwad” taken from Sol’s CFL3, which I have used quite a few times. This version has low memory overhead as it performs only 1-2 allocations (depending if the tokenization is done in-place or a separate copy is needed).
So, my Twitter account is jlauha. I configured the blog posts to be automatically updated there, so that’s one way to follow my stuff if you’re into that. We’ll see if I start occasionally posting something else as well.
Sometimes there’s a need to embed some little bit of binary data in the executable. The reasons may vary – perhaps it is for a resource you want to exist even if data files are missing, or it could be even something you want to “hide” from some curious wannabe-hackers.
In the past years my typical use case was as follows. I used to make “64 KB intros” (such as this one), and for those I needed to embed a few data files to the executable as object data, so that I could exploit compression of the executable packer without writing a proper compression tool myself (such as UPX).
When programming visuals, I often need to fix color values of pixels in image data where alpha is 0. Here’s a little tool called pngprep which can do some pre-processing of image data and save the result as a 32 bpp png file.
Read the rest of this entry »
A while ago I posted psdlayerstga 1.0. I have now updated it to support saving to PNG files, which is also now the default output format. The tool also got renamed to psdslayer, since I was constantly imagining, and even mistyping, the name to be “psd slayer” rather than “psd layers“. And I find it funny.
Read the rest of this entry »
A few years ago I read the book Texturing and Modeling: A Procedural Approach (Ebert et al.) and found some low level “step” and “pulse” primitives used for generating procedural graphics. It didn’t take a long time to notice that those are actually really useful in many other situations as well.
A generic pattern is that some value changes its value from a to b over t iterations, and you want something other to move along from c to d in the same time. Implementation is easier when the transition from a to b is just normalized to [0..1]. After that it’s really easy to map it to any range just by another multiplication (d – c) and adding an offset (c).
The “boxStep” function does the normalization part described above. However, just linear movement is actually quite boring, so the funky part here is that you can just switch “boxStep” to a “smoothStep” and there we go, movement along a smooth curve which feels better. Or you can map the boxStep result to a different function which takes in a value in the [0..1] range and outputs a value in the same range, e.g. sqrt().
UPDATE: psdlayerstga has been renamed to psdslayer with addition of saving the layers as png files. Get the new tool from here.
I took DrPetter’s PSDImage code for extracting layers from PSD images, and combined it with stb_image just for saving out the layers easily as TGA files. And then I included some simple options and output of the metadata (i.e. name and position of each layer). Result is a little command-line utility, “psdlayerstga”. Use it for anything, but do so at your own risk. (The PSDImage code uses that same license, and stb_image is public domain.)
Download here, including C/C++ source and a pre-built executable for windows:
psdlayerstga.zip
Go get newer version (psdslayer) from here.
15th Ludum Dare 48 hour game development competition was held last weekend, and it got total of 144 entries! This time given theme was “Caverns”. I continued with my tongue-in-cheek-named “warrior” series of prototype games and created Rock Warrior. Hopefully next time I don’t want to make a prototype about rock music…
Anyway, a mini-post-mortem of the Rock Warrior development can be read from the separate page about the game. Including a downloadable version, source code and a YouTube video.