Note: this engine is still in active developement. It lacks many tests, documentation is not complete and breaking API changes are very likely to happen. It is not production ready, but I was able to build a bunch of games with it, so if you want to experiment or help with developement, you are welcome.
Documentation note: all "classes" in docs are not real classes, they are factory functions and should be called without new
. JSDocs has no convenient way to describe factory functions.
JavaScript entity system framework for games.
Entropy is literally just a framework, variation on an entity system, that can help you organize and write your game in very specific way. It also does many things for you, such as game state management, input handling. It is not tied to any graphics library, sound library, or other fancy stuff. If you are not familiar with entity system idea, check out these articles: one two.
Recommended way to install and use Entropy is to use npm
:
npm install --save entropy.js
Then require it in your project and use your favourite bundling tool to package your game for browser use.
If you prefer to just include script as standalone lib, put reference to entropy.min.js
file in the script tag or add it to you assets loader. Use global variable Entropy
to interact with the framework.
The best way to get a grasp of Entropy is to read the wiki.
You can also read the docs and check out examples:
This is monorepo. You can check versions of included packages by looking at the table below.
Package | Version |
---|---|
entropy.js |
|
entropy.js-state-plugin |
|
entropy.js-loader-plugin |
|
entropy.js-animation-plugin |
After cloning the repo run:
npm install
Then you need to bootstrap all packages (install dependencies, etc.):
npm run bootstrap
Bootstraping automatically compiles and builds all packages.
If you want to bundle or build single package, cd
into desired package directore and use npm
scripts:
cd ./packages/entropy
npm run bundle # bundles package for browser
npm run babel # transpiles source files
To run tests for all packages:
npm test
Documentation is located in docs
folder. You can also read it online: http://tdzienniak.github.io/entropy/docs/entropy.js/1.0.0-alpha.5/.
MIT