Game Components Docs Hub

Game Components Docs Hub

Over the years I have built up a small library of reusable components which are useful for developing HTML5 games. This is a hub for their documentation.

Essentials

Vec

A small vector and matrix library.

Utils

A collection of useful functions.

Canvas Helpers

A collection of helpers for working with HTML5 canvas.

Intersection Helpers

A collection of helpers for detecting intersections in 2D and 3D.

Components

Animation

A component for animating values in browser games.

Audio Manager

A component for playing audio (sound effects and music) in HTML5 games.

Camera

A camera component for use in 2d browser games.

Camera 3d

A camera component for use in 3d browser games.

Color

A small color utilities library.

Content Manager

A component for loading content assets and providing access to them.

Debug

A component for rendering debug output on a canvas.

Image Font

A component for rendering text using image fonts.

Input Manager

A component for handling input events and managing input device state.

Layout

Create responsive layouts for HTML5 Canvas.

Particles 2d

A component for animating and rendering particles in 2d games.

Scene Graph

A basic scene graph component for use in 2d games.

Scene Manager

A component for managing a stack of scenes in a game.

Sprite

A basic sprite component for use in 2d games, with animations and directions.

Texture Atlas

A component for chopping up images into multiple canvases.

Tile Map

Render 2d tile maps with layers, chunk rendering, tilesets, procedural generation, etc.

Experiments and other miscellaneous stuff

E2 - Editor Elements

A set of web components for building game editors.

Asobi

Framework for building and running turn-based games.

Lighting 2d

Lighting and shadows in 2.5d.

Game Example

A demo of various game components.

Async

Async versions of common list functions.

Stats

Basic statistics functions.

Weighted Averages

Various weighted average functions.

Simple State Machine

Define finite state machines and validate state transitions.

ParseColor

A function for parsing colors and turning them into RGBA values.

Tily

A simple tile engine with Javascript and Canvas.

Tyre Model

2d driving with skidding and sliding.