Blog      Twitter      About

Building a Videogame Development Framework

I've spent the past few weeks on-and-off building a new framework for myself. Having done this a couple of times now, I figured I would impart some unsolicited advice.

You probably don't have to

Before you embark on what can be a long and arduous journey, consider if you really have to build a framework. There are plenty of great ones out there. I've had positive experiences with openFrameworks, GLFW and SDL. They may do exactly what you need.

But they may not. A few good reasons for writing your own framework are:

Even if you decide to roll your own framework, I'd recommend trying existing solutions first. At the very least you'll pick up some design tips. At best, you may find they do exactly what you need.

Build your framework on a framework

This sounds counterintuitive, but there's underlying code that might be worth taking. How much is a personal preference. I've been all over trying low- and high-level frameworks. The journey helped me figure out what I wanted done for me, and what I wanted to do myself. Identify the areas you really care about and focus on those. "Outsource" the rest.

What did I focus on?

These are all personal preferences I've figured out over the years. You'll figure out what your focus is too.

Version gracefully

As you go along, your framework will evolve. You want to ensure that your older projects continue to work as your framework blazes ahead. My approach is to version the framework (using a simple folder structure), and allow each project to select a version to build against. This allows me to "go forth and break things", without worrying about older projects.

Learn and do it better

Building a framework is a learning experience. With every iteration I've done a better job. Keep working with a framework until you feel you've outgrown it, and then do it all over again.

But don't make it a frequent thing. I've only done this four times over the past nine or so years. And don't forget that old code can still be good. Most of Zucchini is based on Chickpea's source code.

Finally, remember: do this because you need to. Don't get caught up in the trap of making the "ultimate" framework. Build a framework to make better workflows for yourself, and of course, to make incredible videogames.

posted 08 December 2012