Longanimals | Snake Engine


Snake Engine is the powerhouse behind all LongAnimals and TurboNuke games. It has been built up over the last few years to enable rapid game creation in Flash, and now also to do the same with mobile / tablets. We have drawn on our long experience in console game production over the last 20 years or so to ake a system which enables us quickly to get our ideas in place, and to iterate on them.


Snake Engine, as a framework, relies on the idea of using the greatest simplicity one can get away with. The simpler an idea, we believe, the lesserror prone it's likely to be, and the more reliable it is. The Snake Game Engine, at its heart, is essentially a GameObject controller. Pretty much everything internally is a GameObject (GO). Player, bullets, pickups, etc. are GOs, as are hinge joints, logic paths, polygon scenery, routes, backgrounds, particle systems, AI helpers, springs, Level Information controllers, etc. etc. This principle gives us a consistency which helps when it comes to using an editor with the system.

Philosophy of Iteration

One of the main goals of Snake Engine is to offer us as game designers rapid iteration on gameplay when building levels. We think that the more times you go in and adjust a level, the better and more refined it is likely to be. There are always time constraints when making games, so getting as much done as possible in a short time is important. With this in mind we built the level editor as part of the system. One keypress switches betweem level editing and playing the game, allowing for many minor changes to be made very quickly. These editing iterations only apply to the starting positions of obejcts and to their behaviour. We also have the ability to change variables on the fly, for instance adjusting the braking ability of a car while driving it around.

The Editor

Our editor fundamentally hasn't been designed and implemented, as so often happens with these things. Instead it has grown directly from our needs as game designers. Any new features we feel the need for when making games, we generally add in straight away, especially if they're time saving features. Level editing is based around the fundamental GameObject. GOs are defined in XML, given a unique name, and any number of editable parameters. The XML also contains physical attributes, and links to whatever graphics and code which might be needed. Note that GOs don't need to be visible in-game, though they always are in the editor. It's perfectly possible to define the whole set of gameobjects and lay out levels without writing any code. We can just plug in commonly used functions, or we can write new behaviour code for each and every object. The code can take the object's parameters and deal with them howeverit sees fit.

Specific Editor Modes

We haven't really done much UI in the editor. Most things rely on keyboard / mouse button combinations, for speed of use, though I will put less-used features on buttons. This is fine for us, but it means that any new user has quite a steep learning curve when beginning to use the editors. Without the benefit of menus we have split the editor up in to modes grouped on functionality. Each mode has specific features for instance drawing / editing polygons or splines, quick placement of new objects, a mode for generally editing everything (multi-edit mode), a UI editor, one for joints and linkages, even a tile editor, which is very rarely used. Further modes include the Road Editor, which allows for very rapid generation of 3d driving games (but is not limited to that), an object library, with per-object parameter adjustment, and a library for storing compound objects, as some games tend to re-use groups of objects which are joined together in a certain way, for instance ropes made out of linked segments. We have more modes coming along, which aren't available yet, such as a skeletal animation tool and a generic timeline editor.

Non-integrated Tools

We have found that it makes sense to have some tools separate from the ingame editor. We have a number of graphical conversion utilities, made in C# / .net, which handle large amounts of IO much better than Flash. There's also an adventure tool, which warrants its own page!

Image from Blob's Adventure for mobile from TurboNUKE