The Great 2D Framework Evaluation, Part 1

Here we go. Let's just start this off straight away stating the obvious: the words in this post are my personal opinion. They are not representative of the beliefs and ideas of anyone but myself and are born of my own unique experiences. Your opinion is likely to differ drastically.

A note for any aspiring game developers who find this post: you've got a monstrous quagmire of engines out there. You can jump in and have a game up-and-running in minutes with just about any of them. The biggest piece of advice I can give you after having witnessed tons of new game developers starting out with these high-level tools is don't do it. Spend a bit of time without a high-level engine first. Once you have a basic understanding of the principles of game development grab one of the high-level engines. Read this article for some of the reasons why: Here's why I stopped teaching Unity first. Well, don't read the whole thing. Just read the first 1/3rd of it (the rest is a sales pitch so disregard that).

A few short weeks ago I set out to find a new home for any 2D games that I build. I've used various 2D frameworks over the years (for the sake of clarity engine and framework will be used interchangeably and just refer to a set of code and tools used to make a game) and have recently been using Unity. I decided to use my evenings to test out a bunch of 2D frameworks to see what's out there. This post is the current result of my evaluations which are still ongoing.


If you are here just to find out who the winner is I'll save you some time: no framework wins. Every framework has compromises. Going with no framework is itself a compromise as well. Let's dig in and see if we can figure out which frameworks have the least amount of compromises.

The Criteria

There are tons of 2D frameworks out there these days. Tons. There is no possible way anyone could get familiar with all of them. There are that many. The first step in this process was to figure out my own unique criteria (yours may differ significantly so beware). This allows me to cull the list and only spend time with the ones that meet it. Some of these criteria are more rigid and some less. I would be willing to forego one thing if a framework had some other really great attributes. Below are the most important criteria used to cull the list:

  • cross platform deployment: iOS, Android, Win and Mac at a minimum with WebGL being a bonus but not required.
  • uses a real programming language: no made-up programming languages allowed. I want to be able to use the plethora of tools (IDEs with code completion, code analysis tools, StackOverflow, existing documentation, profiling tools, etc) already out there for all the major languages.
  • open source: having source code is a huge boon. These last few weeks working with almost all open source frameworks has been incredibly refreshing after working exclusively in Unity for so long. No black boxes or being stuck with a feature not working the way I would like it to. A framework would have to be really good for me to bend on this one at this point.
  • no ridiculous WebGL wrappers: it does not count as a cross platform engine if it's a JavaScript engine that wraps a web view in a native app. Sorry folks.
  • decent documentation and sample code: this one is really important for getting up and running quickly. If the documentation is bad/non-existent and the samples don't work that's two strikes out of the gate.
  • focused: I am not looking for a does-everything-under-the-sun framework that has a million features but most are half-baked. I'd much rather work with a solid core and build on top of it. This is just 2D stuff so it's not exceptionally difficult or time consuming to code up some higher level specifics as needed.
  • well written code: I'm not at all afraid of diving into the deep end of the framework and making changes that suit my needs so the code needs to be cleanly written and well structured.
  • performant: 95% of a 2D framework is shuttling sprites on screen. If it can't do that really well that's a bad sign.
  • good tooling/abstraction/build system: the underlying framework should abstract things as much as possible while still remaining true to the native platform. It should be able to deploy to all supported platforms without troubles (I've seen some serious troubles the last couple weeks). Examples: write code once and it should work in OpenGL and WebGL. Build a Mac app and it should actually build.

Some Niceties but not Required

  • doesn't use C++: for some reason the C++ landscape for 2D frameworks is really dismal. Bad documentation galore and terribly fragile build systems are the two biggest obstacles I came across. Then I remembered I don't really like to code in C++ so much so here we are. I actually prefer good old C myself.
  • visual editor: this one is in the nicety bucket for a few reasons: it's not that hard to make a visual editor for a specific game, you often end up doing so anyway, Tiled exists already for tile-based games, Overlap2D exists, Level Helper exists, Rube exists, SpriteBuilder exists. You get the point. There are plenty of 2D level editors and it's fairly trivial to parse their output with any framework. Update: this isn't really a nicety now that I think about it. For a game jam project it is a nicety but the more I think about it the more I realize having a custom level editor and data format is often the easiest way to go vs being limited to some built-in level editor. Also, as you can see from the list above, there are more than enough capable level editors that export framework-agnostic data available.
  • code exists in the wild: stuff like A*, nav mesh, polygon decomposition libs, etc are out there already. I don't mind modding/repurposing existing code to suit my needs (which I pretty much do with every piece of code I incorporate into a project) but I'd rather not have to reinvent the wheel every step of the way.

That's it for now. In the next post we'll continue the journey into the world of 2D game engines and actually get into the engines that passed the criteria.