Common game utilities + rollup config, suitable for a small game competition. Like JS13k!
- Component Entity System
- Stable Game Loop with interpolation and panic modes
- Scheduling, for game-time dependent time events
- JS13K-compatible zip creation + notice of how close you are to the limit:
npm run zip
- Rollup, so you still get to use modules and separate files.
- More? You should make a PR!
Rollup bundles JS using ES2015 modules, but does not leave any of the import/export syntax in the resulting bundle. It pulls everything into the same lexical scope, uniquely named. This makes it excellent for a size-based competition, because by its very nature it emits the smallest representation of code! Combined with UglifyJS this gets us very close to a nice base size.
Fork this repo, then add / change code in index.js as you see fit! There are two dependencies included, but you can remove those. Rollup ensures that only code you
import is included!
npm run zip
How close are you to the limit? Compiles in production mode, and creates a zip suitable for JS13K!
npm run build
NODE_ENV=production npm run build to remove debug / runtime checks (similar to how React does it).
npm run watch
Rebuild quickly for development mode!
npm run uglify-view
See what the compiled JS will look like, to make sure rollup is treeshaking / hoisting as expected and that dead code is being eliminated. Requires
bundle.js to exist.