If you're looking to build a game width node.js:
This is a quick start guide but for the docs go to (The readme is the docs):
https:
Run in the terminal: npm install nodegamesjs
Then write in your code:
```js
var nodegames = require("nodegamesjs");
nodegames.init();
var width = 800;
var height = 600;
nodegames.newGame(async function (game) {
console.log("[Game] Game opened.");
game.setWindowName("Mygame");
game.on("close", function () {
var process = require("process");
process.exit(0); //Exit because game window has been closed.
});
while (true) {
//Draw stuff do your stuff. (game loop)
//
//
game.renderFrame(); //Render the frame that has just been drawn.
await new Promise(function (resolve, reject) {setTimeout(resolve, 10)}); //Wait 10ms for stability and to let events run.
}
});
(I made the package, hope ya like it)