Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pixelbox

Create 2D games in JavaScript, made easier · By Cedric Stoquer

Behavior libraries, scene system and Game Object implementation

A topic by davemour created Apr 29, 2021 Views: 114
Viewing posts 1 to 1

First of all, I want to congratulate the nice work done with this game engine. I wanted to develop a tool like this and I found it on Itch.io.

I like the philosofy of creating the game mechanics from scratch, is ideal for learning and I appreciate it.

But there are a set of things that I miss, and are common to almost every game: GameObjects and behaviors.

Game objects could be linked to a game instance reference, or the scene instance where they belong.

Game Objects could implement a set of behaviors:

- Position system, based on tiles and/or coordinates. Useful for calculating collisions.

- Health system, for perishable objects.

- Camera following system for a given object

- Animation interface, with loop, frame skips and sprite sequence options

Finally, the scene interface should define the game workflow methods (init, update, render).

- Main script would delegate the initialization and update of game state on scenes.

- Game would have a set of scenes and a reference to current scene

This is the approach I follow for developing using pixelbox. It takes ideas from other game engines that could be very useful.

When I finish my first real project with this engine, I want to extract my implementations of these and create a npm package with these.

If you want to collaborate and implement it together in you game engine, you can contact me.