Turbulenz Engine Goes Open Source

We’re excited to announce that we have released the Turbulenz HTML5 game engine as open source under the standard MIT license. The open source project is available on GitHub at https://github.com/turbulenz/turbulenz_engine.

You may have seen Turbulenz mentioned somewhere and wondered what it was. Turbulenz provides a game engine that delivers all the building blocks developers need to rapidly create high quality and hardware accelerated 2D and 3D games playable across mobiles, tablets and the web.

image

Polycraft by Wonderstruck

We started developing the Turbulenz Engine a little over 4 years ago in early 2009, when HTML5 was still in its infancy and before WebGL even existed. We recognized that JavaScript and the web development platform offered a huge opportunity for creating high quality games and as a mechanism and market for dynamically distributing content.

We initially proved this to ourselves by creating the service and engine capable of streaming and rendering the majority of Quake 4. This continues today to be a great test of the engine as it has evolved. You can see it demonstrated by our CTO David Galeano.

Today, the Turbulenz Engine powers the highest quality 2D and 3D HTML5 games online. If you want to see some examples we recommend looking at:

image

Save the Day from BAFTA-winning Denki

We have seen a monotonically increasing interest in the engine and SDK since it was first made publicly available.

If you want to take a look, the best place to start is the README which you can find on the Github project page and included in the source. This details how to set up a development environment and includes a short getting started guide on how to use the Turbulenz Engine APIs. From here we recommend going through the Getting Started guide and reviewing all the documentation online.

The engine is also available bundled in an easy to install SDK for Windows, Mac OS X and GNU/Linux. This might be an easier option if you’re looking for a packaged-up and fully QA’d snapshot of the engine. All future SDK releases will contain the open source engine with the associated MIT license. (Earlier versions of the SDK were released with a partially open license which has now been deprecated.) The bundled SDK is available from the Turbulenz developer service.

What Features Does the Open Source Turbulenz Engine Provide?

The Turbulenz Engine contains an extensive range of features and services for creating games. The engine was designed to be a complete Internet generation game engine. By this, we mean a game engine that was conceived, designed and implemented specifically for building games that are played via the Internet using web technologies, rather than as a native application on a console or PC. This is a single suite of technology that spans the client game application and remote game services.

The libraries contain solutions for all sensibly reusable game services, including: 2D and 3D graphics, 2D and 3D physics, 2D and 3D effects, sound, networking, user input, scene graphs, hierarchical animation, movie playback, resource management, server requests, a range of renderers, leaderboards, badges, payments, save game userdata, user profiles, game profiles, multiplayer, metrics, maths and numerous utilities.

The graphics engine is completely shader driven and hardware accelerated using WebGL. It has been implemented to allow games to efficiently dispatch their scenes. The engine comes with multiple renderers which can be selected depending on the features and performance of a user’s device, this includes, a deferred renderer, a forward renderer and a default renderer. There is also a highly efficient 2D renderer for efficiently dispatching huge numbers of sprites and effects.

The 2D and 3D physics engines are particularly powerful in comparison to the procedurally generated ports of currently available.

All the technology has been handwritten as efficient TypeScript and JavaScript to maximise execution and memory performance.

There is a detailed list of all the engine’s features in the repository README and in the documentation.

Why Are We Open Sourcing the Engine?

We’ve had a lot of interest in the Turbulenz Engine via our SDK packages and many of the people who try it out have praised the features and performance. However, two issues that have often come up are any sort of restrictive licensing and the ease of getting things started.

By releasing the Turbulenz Engine as open source under a standard liberal MIT license we hope to ease the adoption costs and ensure that people don’t feel in any way restricted by using the Engine.

What Are the Design Goals of the Turbulenz Engine?

The main design goals of the Turbulenz Engine are performance, modularity and customizability. Users of the engine should be able to build any kind of game without limitations, in an efficient manner and with an end product that performs optimally when loading and during play.

To achieve this target the Turbulenz team followed these rules when writing code:

Modularity

  • Users should be able to pick what they want and replace what they don’t.
  • When possible new functionality should be orthogonal to existing one.

High performance

  • Strict coding standards to keep code efficient.
  • Keep memory allocations to minimum, reuse existing objects or arrays whenever possible, use scratch pads, combine multiple separate objects into a single one.
  • Use most efficient storage for each data, Typed Arrays when possible.
  • Reduce function calls when possible: write functions that handle arrays of objects instead of loops that make a function call per element, games rarely do a single thing to a single object.
  • Be aware of performance differences between browsers.
  • Profile often.

Asynchronous loading

  • No API should block waiting for a response from the server, avoid polling whenever possible, use callbacks or Promises, to notify of data availability.

Data driven

  • The target should be to make the game a simple dumb player of data, all functionality defined by simple data files.

Simple well documented file formats

  • Define simple, easy to create asset formats that can trivially be connected to any tool chain.

Scalability

  • Design interfaces that can be implemented with different level of detail or quality settings in order to scale from mobile to desktops.

Power without control is nothing

  • Make sure users can do exactly what they want, with a helper layer put on top if required, document performance implications at every level.

Fault tolerant

  • The engine should keep going even if any type of asset fails to load. The application is able to provide sensible defaults for all asset types making it easier to stay productive and diagnose issues.

Fast loading

  • Reduce amount of data to be downloaded, compress data efficiently.
  • Use the browser cache efficiently, use unique file names based on content and tell the browser to cache forever.

Maintainability

  • Strict coding standards to keep code readable, easy to maintain and debug.
  • Write unit tests, samples and documentation for every new code path.

Targeted

  • This is a game engine, for games.

What Have We Made Available?

We’ve made three Git repositories available on GitHub:

Turbulenz Engine - https://github.com/turbulenz/turbulenz_engine

  • TypeScript and JavaScript implementations of the game engine
  • Documentation of the libraries, APIs and tools
  • Code samples demonstrating the engine APIs
  • Application samples showing how a basic but complete game can be built
  • Protolib high level prototyping libraries

Turbulenz Tools - https://github.com/turbulenz/turbulenz_tools

Turbulenz Local - https://github.com/turbulenz/turbulenz_local

  • A locally hosted Python development web server implementing the Turbulenz services APIs
  • Tools for interacting with the Turbulenz Hub
  • Also available from PyPi as turbulenz_local.

Want to Contribute?

We know there is a large and growing community interested in HTML5 game development and we hope that people will find this project an empowering contribution to game and Internet technology domains. Now that the project is fully available as open source and easily accessible via GitHub all contributions are gladly welcomed. Please send the project a pull request or post a git diff patch on the Turbulenz Engine google group.

Please Help Us Spread the Word

Please help spread the word to your friends and followers by sharing this announcement online. We want to make sure that anyone thinking about making a game with HTML5 is aware of Turbulenz as a free and open source solution that comes packed with high performance features.

Learn More

Sign up for the free WebCast on 21st of May at 9am PST / 5pm BST. This will include an introduction to the technology, show you how to get started, and leave time for Q&A.

Any questions or ideas about the Turbulenz Engine, HTML5 games or anything else, please get in touch.

Happy Hacking!

- James Austin

Turbulenz CEO