0.0.1-beta.8 • Published 5 years ago

wild-magic v0.0.1-beta.8

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

Concepts

Very terribly explained :)

Component Graph System

This expands on the ECS, Entity Component System architecture. A game Engine manages a list of Systems, each of whom follow and impact changes on a list of Entities. Entities have their list of components, which are discrete bags of state.

Instead, Wild-Magic will be component-first, so that components may reference other components in a graph-like way.

Data-Driven

The ECS or Component-Graph-System means that the games programmer must operate on data, instead of designing complex webs of logic inside classes and handlers. This is a little hard to explain, I'd like to prove it in a demo.

Stateless

The game system is immutable and stateless. Each activity produces an entirely new engine object. At any time data can be injected, for example, from local storage or from a server, and the game logic will rehydrate.

Functional

This project, at least the core package, aims to be functional where possible to aid in testing, and as a creative constraint. Here functional means using composition, unary functions, and disallowing certain code concepts such as classes and if blocks to limit side-effects.

Status

Beta! The nature of this code is ever-shifting!

Development

Note: If you don't have Node.js installed on your machine, you can run a "docker shell" with make dshell from which you'll have a fully working Node.js environment. Make sure you have already installed both Docker Engine and Docker Compose.

  • Install dependencies: make install
  • Run in dev mode: make start
  • Build: make build
  • Test: make test
  • Lint: make lint
  • Clean: make clean

This project is a mono-repo, setup using Lerna. All packages can be found under ./packages/.

Some useful commands:

  • lerna run --scope package-name dev --stream will run the dev script defined in package-name project