SFII90 - C++ and Ruby Video Game Engine - 0.1.0 Released!

SFII90 - C++ and Ruby Video Game Engine

SFII90 - C++ and Ruby Video Game Engine

My name is Phillip Weisberg and I’m a software developer in the Washington, D.C. area.  Welcome to fiber-optic megawatts!  This blog will focus mainly upon video games - from reviews through development and anything else along the way.  Today’s topic is SFII90 - a free video game engine that I developed in C++ and Ruby and licensed under the GNU LGPL 2.1.  Before I jump too far ahead, let me first give you a little background about myself and the how the engine came to be.

I’ve always been interested in designing and producing video games.  I made a few demos in 2005, but I wasn’t satisfied with how horribly inefficient they were; There was almost no reusable code nor consistent design from game to game.  I looked at the top ten or twenty engines available for hobbyists and for some reason or another was not satisfied with any of them.  I thought it might be a good idea to create my own video game engine (despite some foreboding comments on www.gamedev.net), so I started by designing a small system that could draw sprites from bitmap files and load OGG Vorbis files.  It was… better, but still not very good.

In the winter of 2006, I decided to take a serious approach at researching how to design a modular, easy-to-use video game engine.  I considered as many aspects of the engine as I could before commiting to development specifics such as languages and target platforms.  After about a year of scribbling notes on pieces of scrap paper and pizza boxes, I felt I was ready to start coding.  One of my core goals was to design a system that was as straightforward as possible and encouraged developers (and even players) to toy with the game code itself and see what they could discover.  If I structured the engine and scripting language API as clear as possible, perhaps it could intrigue a few gamers into modifying/customizing the games they play.  With this in mind, I decided to sacrifice speed for the sake of simplicity.

I knew that programming games with my engine would also need to be fun.  How could that be possible?  It just so happens that at that time I was learning a scripting language called Ruby.  Its design philosophy was remarkably similar to mine - focus on the developers, not the machines.  Computers can always get faster.  Memory is cheap.  A high-level programming language should be simple, follow the Principle of Least Surprise (POSS, though definitely related to KISS), and most of all enjoyable!  I found this to be the case when developing with Ruby, so I decided to integrate it into my engine as the scripting language.  I wrote a framework around it to handle entities, device input, and finite state machines.

By the summer of 2008, the engine was in a stable state and was ready to be tested.  A few colleagues and friends of mine suggested forming a game development team to enter the “Games for Health Game Jam”.  The contest focused on creating a game in a 24-hour period that related to personal health and safely controlling one’s body mass index (BMI).  It was sponsored by the Games for Health Initiative and the Robert Wood Johnson Foundation.  There were six teams that entered and competed for a total of $4,000 in cash prizes.  The contest was a great experience and there were a lot of really innovative entries.

Games for Health Game Jam 2008 - Baltimore, MD

Games for Health Game Jam 2008 - Baltimore, MD

After everyone presented their games, the judges exited the auditorium to confer.  They returned shortly to announce that my team and I had won the grand prize for our entry “150 A Day”.  We were incredibly happy to have won the game jam, and I was particularly happy that the game had been developed using SFII90.  It had passed an important test.  However, the experience had taught me a few things about using the engine.  Most notably, it was difficult for other developers to get the hang of it without any documentation.  Since I had always been a lone developer on this project, I definitely neglected this aspect.

For the next two months, I worked on documenting all of the C++ engine as well as the Ruby framework.  I also added a much needed logging utility to tell developers which lines of Ruby script cause problems.  The Game Jam was a great experience because it showed me quite clearly that an engine (no matter how complex or simple) is useless without proper documentation.  I also realized that it would be very helpful to add a set of “common” objects, or entities, to the distribution of SFII90.  There are now classes that are distributed as part of SFII90 for creating animated sprites, frames per second (FPS) counters, and joystick bindings.

So today, after a total of possibly three years, I released the first version of SFII90.  I’m excited to see what people can create with it, and I welcome your feedback and suggestions.  SFII90 has come a long way since being a simple bitmap and OGG audio file loader, but of course there is still much more work to be done. ;)

Comments are closed.