The ECS in Idle Orbs: Tycoon


Idle Orbs: Tycoon is another addition to the "Idle Orbs Franchise" that I'm building up. It's not much for gameplay, just a nice little project to test out an ECS (Entity Component System) that I made. So, let's talk about the trials and tribulations I experienced when trying to create this game.

First, my idea for the ECS is to have a manager hold all the entities and loop through them, running anything that needed to be ran, every frame. All the entities have "tags" and based off the tags they had they would be sent over to a function assigned to deal with entities with that tag. So, to add more functionality you just add another tag to the entity. But, that wasn't really an ECS. So, starting over, I made something more pure... As far as ESCs go.

With my second iteration I made it so that there was an entity manager, same as before. But, the entity manager loops through all the entities and hands them, along with each of it's "components", over to it's respective "system". With this, if I wanted to create a dropper I would simply create a new entity with components such as: Position, Collider, Dropper, and Graphic. Each holding data, drawing things, or running functions every frame.

Files

v0.4.1.zip Play in browser
Apr 17, 2022

Leave a comment

Log in with itch.io to leave a comment.