Sunday, 9 September 2012

Implementing an Entity System

Due to the amount of assets that need to be loaded in the engine, I have proposed an Entity System where I can control everything and manage every asset in the engine easily and smoothly. I am currently designing two classes: 'Entity' and 'Entity Manager'. 'Entity' will be inherited by anything in the engine, it contains two prime varibles, 'name' and 'id', with just these two variables, I can get the entities state and it's children. Speaking of which, the entity class is capable of having parents and children, this would enable you to make an Entity Structure e.g. A Skeleton or a collection of every enemy.

The 'Entity Manager' class will be the surpreme controller over the engine, it will manage every single individual entity/assest within the engine, it will be able to access anything, anytime, anywhere. Though the only thing it cannot change is the ID's of entities, if I allowed a third party to change the ID's of it's entities, it could cause fatal crashes if they are dependent.

Thanks for reading this! I will make an update video once it has been complete, be sure to check my channel for future updates!