A simulation for benchmarking Goodluck, a hackable ECS template for creating small and fast browser games.
$ git clone https://github.com/stasm/pewpew.git
$ cd pewpew
$ npm install
npm start
- Open http://localhost:1234
Build the targets runnable in Node.js:
$ make -C node
You can choose to run the simulation using one of the three versions:
node node/game_node_canvas.rollup.js
uses thecanvas
package and renders to a rendering context implemented in Cairo.node node/game_fake_canvas.rollup.js
uses thefake-canvas
package and renders to a no-op rendering context implemented as a native Node.js module in C++.node node/game_noop_canvas.rollup.js
renders to theNoopRenderingContext2D
instance implemented in pure JS. This variant is likely to optimize the no-op draw calls away. In my measurements it's ca. 35% faster than the no-op native module version.