A WebGL starter project with hot reloading and a component entity system
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
flow-typed
src
.flowconfig
.gitignore
LICENSE
README.md
package.json
webpack.config.js

README.md

Webgl-starter

A WebGL starter project with hot reloading and a component entity system

Building

Run npm install

Development

Run npm run dev to start up a development server, then browse to http://localhost:8080. Any changes made to the sim or render systems will be hot reloaded without the need to refresh the browser.

Production

Run npm run build. All built assets will be created in dist/.

Component Entity system

The starter comes with a simple component entity system (see here and here for some background on the component entity system pattern) that allows separation of state, simulation logic, and rendering logic.

Components

All relevant entity states should be attached via some combination of components on an entity.

Builders

Builders are factory functions that allow a known configuration of components to be attached to an entity.

Sim systems

Sim systems represent all the games logic and are responsible for simulating the world. Sim systems should be completely stateless (all state should reside in components) in order for them to be hot reloadable.

Render systems

Render systems are responsible for rendering entities and thier components. Render systems should be completely stateless, and also should not alter the world state - i.e. they should only read the world state.