Articles, Tutorials, and other things. => Pixie Game Programming => : Mattias Gustavsson January 13, 2010, 04:22:24 PM

: Pixie - Introduction
: Mattias Gustavsson January 13, 2010, 04:22:24 PM
So, I thought I would write a little introduction about Pixie, what it is and how it came about, just to give you guys some context and background, and maybe give you a chance to get to know me a bit in the process :)


It all started about three years ago. At the time, I had been working on big, commercial games, like Crackdown (, for 6 or 7 years. Like many other programmers, I had been dabbling on and off with 3D engines of my own, in my spare time, but never really gotten anywhere with it. And then I was assigned to work on a quite different type of game: a Risk ( game for the downloadable games market.

The project had been done by an external contractor, and he had done a very poor job of it, the code was terrible and I had my work cut out for me. But in the process of working and reworking this code, I found myself really enjoying working on a 2D game, after all the years of 3D programming. I quickly set to work creating my own 2D game engine, and I was intent on keeping it small, simple and easy, and to quickly get to the point where I could start making games with it.

So I developed the first version of Pixie, which didn't do very much at all, but I kept on working on it. I left my job in the games industry, to work for a while as a contractor, and kept working on Pixie for another year. I went back to university to study economics, and kept working on Pixie for another two years (and with plenty of free time as a student). Now I'm getting back into the games industry again, but I still keep going with Pixie - It's gotten to the point now where I feel it is a really mature, stable and usable game engine. And I think the reason for that is that I've actually made a bunch of small game projects with it, to prove out concepts and test it for the thing it is meant to be used for - Making games.

I'd like to take this opportunity to briefly present and discuss the game projects I've made with Pixie. I think it will be a good way to present the engine and its capabilities, and give you a feel for what it's good at. All of the following were made using Pixie, and the source code is freely available for all of them.

More information on the games, and download links, can be found here (

The Amazing Adventure of Kassandra

This is a small RPG-style game I made in a weekend for a RPGDX 48-hr competition. There's not that much to do in the game, but it shows quite a few of the core concepts of Pixie: how to work with sprites and animations, how to read mouse input and change the mouse cursor and playing streaming music.

It also makes use of Pixie's built-in A* path finder - when you click on the screen, the character will navigate around obstacles to get to the destination. It also makes use of custom fonts, and uses Pixie's GameState system to manage three distinct states of the game: a splash-screen, a title screen and the main game state.

There's a video of the game available: here (


Midwinter Rites

Here's another competition game (for TIG's text-the-halls compo) - I've found that making a game quickly for a compo deadline is a great way of making progress with your engine while at the same time improving your game design skills a bit.

It is a very simple little game, simulating the Commodore 64 look and feel. The main technological thing in this game is that it shows how to read buffered text input from the keyboard, and support for playing AtariST music in YM format. Also worth noting, is that each character on the screen is a separate sprite - Pixie is good at handling lots of sprites efficiently.

There's a video of the game available: here (


Baby Viking and the Alien Invasion

There's a yearly game compo for students in Sweden, and when they held a "warm-up" competition, open to everyone, with a theme of "Vikings and the future", I made this little arcade game for it.

The specific additions for this game was support for tracker (MOD) music (which results in very small music files) and a "SpriteAction" system which allows for an easy way to move, fade and manipulate sprites.

There's a video of the game available: here (



This was just a quick little project I made just because I got the idea :) It's a remake of an old Game&Watch classic, the parachute game.

It doesn't make any special use of Pixie worth mentioning - but it sure was a lot of fun to make :)

There's a video of the game available: here (



This is probably the biggest project out of the ones I've released. It's basically a simple rythm-game where you bounce a car to the beat of the music - which is awesome Nerdcore music by YTcracker and MC Plus+ btw.

For this game, I added support for a high-color RLE-compressed graphics format, and made use of Pixie's convenient fast access to pixel data to do some nice (and weird) animation effects for the track selection screen. This game also has a built-in track editor, showing how Pixie can be used for live editing of game levels.

There's three videos available from the game: here (, here ( and here (

There's also a couple of games which I'm currently working on, which are even better as a showcase for Pixie:

The Jade Figurines


I made this for another one of RPGDX's 48-hour compos - this time the theme was doing a sidescroller. I think this shows how good Pixie is at handling lots of sprites, and big sprites as well - all the elements seen in the game are sprites, and there's several layers and lots of alpha-blending going on.

There is a video of the game available here (
You can read more about it and download it here (

Thieves and Warriors


This one is a bit experimental. Heavily inspired by classics like Pirates! and the Phantasie games, it is an attempt to make a game with a close resemblance to tabletop RPG's. For this game, I added support for advanced text output and formatting, using a simple but powerful text markup system.

You can read more about it here (

Escape from the Dungeon


I've been working on this game on and off (mostly off) for as long as I've been working on Pixie. I don't know if I'll ever finish it, but I keep coming back to it :) It is a turn-based, top-down game about three adventurers who gets separated in a randomly generated dungeon, and you have to bring them together, while fighting off monsters, and find your way to the exit.

You can read more about it and download a demo here (

Dungeon Grind


Here's my most recent project - it's very much inspired by games like Dungeon Master and Eye of the Beholder. Basically, your classic old-school first person dungeon crawl.

You can read a little bit more about it here (
A first basic walk-around demo can be downloaded here (

So, that's the projects I have to show off to demonstrate the abilities of Pixie. As you might have guessed from the descriptions, it is possible to make things happen *very* quickly with Pixie - at least if you're as familiar with it as I am :)

I have set up a site for Pixie, at, but the material that is currently uploaded there is hopelessly outdated at the moment - I have spent the last 3 months hard at work on refactoring and cleaning up the whole engine - AND the source code for all the games. I will be rolling it all out in the next couple of weeks, but until then, I thought I'd give the NOGDUS people a pre-release of the refactored version as it is so far:

Download Pixie v0.9c (

It includes the entire Pixie engine with source code, and a very simple sample application - just your basic "Hello World" example. In the next couple of days, I'll post a bit more about that sample, and follow it with some more samples/tutorials of useful Pixie functionality.

There's still things to be done on Pixie, and I don't think I'll ever be *done*, but I feel that it is very close to being a good, stable engine now, which can be used for a lot of different types of games.

All the source code for Pixie as well as the source code for the released games is Public Domain. This means that there's no license for using Pixie - I've dropped my copyright claim on it and said: "here, this belongs to all of us". So if you want to use it, or find some code-snippet in there that you'd like to use, just go right ahead and do so - no strings attached. However, there's some bits (like file format support and that sort of things) that wasn't written by me, and therefore isn't public domain - but those files are clearly marked as such.

For now, it is only for Windows, and the project is set up for Visual Studio (which you can download for free from Microsoft), but I've started the work on the Linux port already, and it doesn't look like it will be too hard to do.

At some point I will post a bit more about the general philosophy behind Pixie, and where I see it going in the future.

I'd be happy to answer any questions about this, and I welcome any and all comments, thoughts and feedback, both on Pixie, the games I've talked about here or this post in general :)

And if you've read this far: wow, you've got some patience :P

Thanks for your attention,

: Re: Pixie - Introduction
: Richard Marks January 13, 2010, 05:32:46 PM
Man Mattias, wow!  :o You really have an amazing talent for presentations!

Thank you so much for your contribution. :)

I can't wait for that Linux release of Pixie -- I'll definitely be making a game or two or ten with it then. ;D

: Re: Pixie - Introduction
: Mattias Gustavsson January 15, 2010, 04:48:48 AM
Update: Unfortunately, there was a couple of minor errors in v0.9 of Pixie, which only came up when building it in Visual Studio Express 2008 (and not in my version of Visual Studio). It's fixed now, and I've updated the download link above. But here it is again anyway  8)

Download Pixie v0.9c (

: Re: Pixie - Introduction
: Richard Marks January 15, 2010, 12:25:40 PM
Thanks for the update.
Thomas had said that he had trouble following your tutorial.
I'm guessing he let you know, and you got it all sorted out.

I might have to fire up the Vista desktop computer and give all this a try sometime.
Then again, I really want that Linux port *hint* *hint* *wink* *wink* ;D

: Re: Pixie - Introduction
: bedndarc September 22, 2011, 02:18:40 AM
It is possible to specify? Probably I haven't absolutely correctly understood. Games made on an engine, aren't restricted in any way in the further advancement? It is possible to give them to free access, and they can be sold. Thus the developer won't break any conditions of usage of an engine. And last, the instructions on an engine or on the developer of an engine, whether are necessity them to add?

Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.