A personal game engine developed in JavaScript. Meant for quick prototyping and easy development for smaller games. Documentation and a full release are in progress.
The engine is made up of a modular series of systems that tie into a larger controller. Game objects are identified as Entites and can be extended with for different behaviors. The basic structure functions similar to a heiarchy in a game engine like Unity. Moving over to pixijs for rendering.
It's built on mostly older code from years of building and prototyping games in JavaScript for the web.
Include the main JavaScript file in your HTML header. Use defer to ensure it loads after the page content.
<script src="app.js" defer></script>A basic game can be created with the following code.
const main = new Scene(() => {
World.instantiate(new Circle(graphics.view.width/2, graphics.view.height/2));
World.instantiate(new Agent(graphics.view.width/2, graphics.view.height/2));
});
Scene.load(main);
World.start();Create new game Entities by extending the Entity class.
Work in progress -- once all code is moved over from a different local system.
- clean up the system by defining individual modules that can be added to the engine
World - Make wrappers for the more convoluted sections
- Move helper methods to a dedicated class so users don't accidentally hide them with new definitions
