Answer the question
In order to leave comments, you need to log in
How to organize the structure of the Monopoly game on ECS?
The game is similar to a monopoly with alternate moves of players, how to structure entities, components, systems and ensure step-by-step in the game. I would like to roughly understand the right direction, tk. writing attempts lead to deadlocks. Game on libgdx + Ashley. ps Perhaps there is already some kind of implementation of such games on github?
Answer the question
In order to leave comments, you need to log in
The most important mistake of people who start working with ECS is an attempt to shove everything into ECS at once and in general.
You have a monopoly game. What is in a monopoly?
The game declares players, a discrete field, assets, and events. Additional rules may also be declared.
Players and assets have their own effects and can be deactivated by events. Actually, this is the essence of the game ECS-world.
And here it is important to understand that not the players and assets themselves are ECS entities, but only the properties of players and assets are entities.
The players themselves are external to the ECS, for each player an entity is created in the ECS, the identifier of which is immediately attached to the player object. The player can now interact with the game world through their entity data. The same is true for assets.
The discrete field of the game is also external to the ECS-world, it has a work logic alien to ECS. But the entities of the ECS world will be oriented in the space of the discrete world through the logic of the system connected with this world.
At its core, in a monopoly, ECS will perform the task of document flow between entities. Add ownership component, remove ownership component, deposit money, withdraw money, add activity component, remove activity component. ECS only manages shared properties between completely impersonal entities, where there is no actual difference between the player and the asset he bought.
The turn translation mechanism is also completely separate from ECS, it can only rely on a set of player components and component data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question