
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
console-game-engine
Advanced tools
A basic console game engine for Node.js.
You can use npm to install Engine: npm install console-game-engine
const ConsoleGame = require("console-game-engine");
//New game object
const game = new ConsoleGame();
//First render.
game.render();
/*Result of this render:
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
*/
const write = [[1, 2], [2, 3], [3, 4], [4, 5]];
for (const [x, y] of write) {
game.set(x, y);
}
/*Result of this:
████████████████
████████████████
█ ██████████████
██ █████████████
███ ████████████
████ ███████████
████████████████
████████████████
*/
for (const [x, y] of write){
game.set(x + 6, y);
}
/*Result of this:
████████████████
████████████████
█ █████ ████████
██ █████ ███████
███ █████ ██████
████ █████ █████
████████████████
████████████████
*/

For creating new game map.
//Default values for Class:
const width=16, height=8, backgroundChracter = "█";
const game = new ConsoleGame(width,height, BackgroundChracter);
For write map to console.
game.render();
For clearing console. No effect to map.
game.clear();
For resetting, backing first version of map (Defined in new ConsoleGame()):
game.reset();
Setting a Chracter in map:
//Default values for this:
const x=1,y=1, chracter = " ";
game.set(x,y,chracter );
WARNING: No need to use the render function, it has render in itself.
Getting a Chracter from map:
const chracter= game.get(1,1);
console.log(chracter)
WARNING: It has not default parameters.
FAQs
A basic console game engine for Node.js.
We found that console-game-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.