Skip to content
On this page

TypeSpriteJS Game Engine

What is it?

TypeSpriteJS is an 2D game engine for browsers. It's open source and based on the Entity & Component design pattern. It makes it easy to spawn game objects (Entities), exchange messages and managing the required resources. The multi world approach helps to organize loading scopes and to design screenflows.

It's a single package that comes with a built-in dev-server, asset-pipeline and takes care of bundling (using esbuild). It consumes Typescript and modern Javascript right away.

The custom 2D graphics engine makes use of the GPU (WebGL) and takes care of texture memory management and offers a comfy scene graph including support for Bitmap-Fonts.

For in-game-UI (inside WebGL) there is an UI framework to quickly put buttons, panels and labels on the screen. Using a simple but extensible API it's easy to create custom skins and custom input elements. The UI rendering makes use of batching and in many cases one draw-call will do the trick.

Additonally you find a particle engine, an animation framework based on timelines/property transitions and more.

What's the state?

I would call it: useful experimental. Many parts are there. Some parts are missing. Also expect bugs, akward names and codeing style inconsistensies. Sometimes it's getWidth() {...} and sometimes get width() {...). A QuadElement that is actually a RectangleElement and so on.

It's good for prototypes, game jams and to have fun. Not for production.

The idea is to improve on it with while developing further demos and (maybe) another game.

The name?

Type + Sprite + JS

  • Type is short for Typescript.
  • Sprite is pointing to the fact that it's a game engine and that it's mostly 2D.
  • JS that it's an engine for Browsers/Javascript. (I personally hope that one day I can convert the Typescript part of the engine to this).

Who is behind it?

It's developed by Christoph and is the driver behind GhostJumpGo!.

How to create an executable?

The build command (typesprite build) creates a browser compatible version of your game which you can publish on web platforms. If you like to deploy to an app store or Steam you need to use one of these:

  • iPhone, Android, iPad:
  • Desktop (macOS, Windows, Linux):
  • Consoles:
    • Unfortunately console vendors have no web support afaik. But if you're a V8 expert and like to discuss a DOM free version of TypeSpriteJS that could run in a browserfree environment I would be highly interested.

Can I help?

Sure. Join the Discord Server so we can chat.