A programming paradigm in which gameobjects (entities) are composed out of components, and are operated upon by systems. Each entity is an ID that points to specific components.
0
votes
0answers
8 views
How to add the concept of entities and components into an isometric tile map?
To get some practice with SpriteKit, entities and components I built a little demo.
I created a SKNode subclass (IsometricMapNode) which renders an isometric map. It does so by adding SKSpriteNode (...
0
votes
1answer
36 views
AI and EntitySystem
I'm using an Entity-Component System and have an AI System that acts on certain entities (agents) within the system. My question is: how should the AI system interact with the world and the agents? I'...
0
votes
1answer
32 views
Use Ashley with Scene2d in libGDX?
I want to use Ashley but I also want to use actions and listeners with Scene2d. I read that it is not a good idea, but why? Ican create a system with stage.act(); and stage.draw(); in the update ...
5
votes
1answer
181 views
Understanding Entity Component System
I'm new in game development and I'm struggling to implement Entity Component System (ECS) properly, I have no idea whether I'm doing it right or completely wrong.
Basically, I try to implement ECS ...
0
votes
1answer
32 views
Creating Multiple Render System to Draw Different Entities in Entity-Component-System
When creating ECS based game engine, do you (or can I) create multiple rendering systems?
Let's say I have an Entity class which is the basic unit in my engine, all it can do is add, remove and get ...
0
votes
0answers
36 views
How to do lazy initialization with an ECS?
I'm trying to use the ECS pattern. My problem has to do with initialization.
In my example below, the bounds of the sprite cannot be computed until the sprite is actually loaded from disk. Once ...
0
votes
0answers
60 views
Entities and Components of Battleship (Entity Component System)?
I started to interest myself for entity component systems. I wanted to start softly with creating Battleship in python using an entity component system. At the beginning, everything I was doing made ...
-1
votes
0answers
38 views
How to handle entities when switching scenes in an Entity Component System
I originally asked this question on Reddit, but it did not get much traction. I thought it might help if I tried another audience.
https://www.reddit.com/r/gamedev/comments/5bnttf/...
0
votes
1answer
52 views
Interfacing Entity component systems with networking/saving/serialization
I have a game engine using ECS. I have figured out how could I serialize the data contained in the ECS. Simply Have a system that registers serializers for different component types.
I want to create ...
0
votes
0answers
21 views
How to model actions/animations with limited duration in an Entity Component System
Alternative title: How to prevent duplication of progress/duration properties in temporal components in ECS?
I'm trying to wrap my head around ECS and came up with the following problem: Certain ...
1
vote
1answer
103 views
Component based Entity System using polymorphism: OpenGL does not render
I want to be able to create Entities from different Component sets. I want to call Entity entity(new StaticObject(modelpath, position));
I have an EntityTypes Header:
struct EntityType
{
public:
...
1
vote
1answer
68 views
How to skip comparing if one of the value is null?
I am using libGDX - Ashley as entity-system framework. My problem is I don't know how do I avoid having a java.lang.NullPointerException when using Comparator<Entity> entity comparison. There is ...
1
vote
2answers
101 views
Incrementally processing large number of entitites in an entity-component system
LibGDX/Ashley has a class IntervalIteratingSystem that allows you to process all entities in a particular family every X milliseconds. But if you have a lot of entities to process, it might be a bad ...
0
votes
2answers
113 views
What component should hold the bool attack and vector target?
I am having trouble thinking of what component should hold the attack and target data. In the below code components are holding a redundant data which I want to eliminate.
public class ...
1
vote
1answer
50 views
AI: dealing with movement driving the same inputs as the player
My AI design is pretty simple. I have different entities that can be possessed either by the player or the AI.
Those entities have an "Input" component that holds the states of the actual inputs, like ...
0
votes
2answers
76 views
How to create a generic character entity in Entity System?
In the below code is the way I create a character in Entity System. But I think this is the decouple, I'm having hard time decoupling this class.
1st approach
public enum CharacterType {
...
0
votes
1answer
71 views
C++ Pass the reference of the class to a vector inside the constructor [closed]
Okay so i have an extern vector of pointer type 'Entity', and what i want to do is, when a new Entity type class gets constructed it gets pushed back in the vector of Entities, in C# this would be ...
1
vote
0answers
17 views
Defining collision rules in Farseer XNA
I'm trying to integrate Farseer into my XNA game.
Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components.
One thing I'm ...
0
votes
0answers
50 views
How would you create a single object effect with ecs like a shadow moving straight and a bouncing ball?
I have a bullet that has projectile motion, this bullet is also an effect. Also the bullet has a shadow, that fade on specific time relatively to bullet. So I'm thinking of using the libgdx particle ...
0
votes
1answer
52 views
Central logic in entity-component-architectures
I've build a architecture based on the entity-component-system-idea.
So I got
Components - Just store Data
Systems - Operates isolated on Components
Scripts - Which are just objects from type Script ...
0
votes
1answer
82 views
How to access entites from scripts in an entity-framework?
I'm developing on a simple libGDX-based Game and im using the entity-component-system ashley.
For non-generic but custom behaviour (e.g. the Player Movement), I'm using "scripts" instead of reuseable ...
1
vote
2answers
109 views
How to handle a different kinds of weapon in a single component and system in entity system?
A weapon can be used as melee or range weapon, it can be thrown, toss, fired, shoot, cast (a projectile) or use to slash, bash, stab . How do I apply these to entity-system? my first approach is to ...
1
vote
0answers
96 views
How do you handle entity parent-child relationship in Ashley ECS?
In the below code example, is a parent-child relationship of an entities. Now every child should follow its parent position, and the child could be re-positioned anywhere.
Entity character; // ...
0
votes
0answers
66 views
How to properly process 2 entities in 1 system? If possible, is this recommended?
I'm using Ashley ECS framework, in ECS framework the Component handles only purely data while System handles the processing of the data. Now, I've encountered a problem which I have 2 entities which ...
1
vote
2answers
81 views
How to convert and handle (controlling) OOP game objects via ECS?
I'm having hard time converting OOP game objects to Ashley ECS framework. I have a character, gun & a bullet class. The character uses the gun as weapon, the gun class has a fire method that ...
0
votes
1answer
55 views
Accessing entity config data without singleton
Every entity has some stats which change over time and some which are static for a given type of entity. For example current hp vs max hp: lets say humans have max 100hp, then every human would have ...
1
vote
1answer
61 views
What component should hold the character movements in ecs and fsm?
In the below code, there's a FSM for CharacterState that will be handled also in CharacterSystem. The problem was, I don't know what component should hold movements data to process in CharacterState ...
1
vote
1answer
67 views
Problem in nested parent-entity relationship in ecs
In the given flow, the character is the parent entity, gun is child of character and bullet is child of gun. I've got a component called NodeComponent which has the storage of child entities and a ...
0
votes
1answer
114 views
Entity polymorphism and entity attributes
I want to design the entity system of my game in a way such that entities are modular, easily modified without affecting other entities, and finally easy to add new types of entities. So ideally some ...
1
vote
1answer
61 views
How to avoid position increment by velocity multiplied by delta time even the body is not moving?
In the below image, the character texture is properly sync to body even moving on free space.
In the below image, the character is moving downward. But the texture got a span or not sync properly, ...
3
votes
1answer
150 views
Handling data logic on libgdx ai state machine or in ashley system?
In this below example, I've combined libgdx ashley and AI state machine. Do you think it's a good idea to handle the logic in state machine or stick on handling the data logic on System?
public enum ...
1
vote
0answers
65 views
How do I pool a bullet in libgdx ashley ECS approach?
I'm having problem creating bullet pool in ashley ECS approach, because i'm using PooledEngine, everything is pooled. So I've done is I just use engine.createEntity(), engine.addEntity() and engine....
1
vote
0answers
58 views
What is the proper way of creating bullet in libgdx ashley ecs framework?
I'm still thinking, how do I properly pool a bullet in libgdx ashley? Because the PooledEngine is available, which the Entities, Components and Systems are already Pooled. I made this below example, ...
1
vote
1answer
75 views
Loading scenes from files, or hard coding it?
In a game engine I'm working on I'm using scenes similar to what you would find in Unity. The entities in my game are composed of reusable components and custom data which is linked to those ...
0
votes
1answer
123 views
Proper system architecture in a game engine?
This is my first time attempting to create a game engine. I came across a theoretical problem and would like to solve it before implementation. Right now I have a WindowSystem, which opens the window, ...
1
vote
1answer
71 views
Multiple traversal of a component-based hierarchy
Let's say a game use a component-based hierarchy to store all of its entities.
So it can have objects, characters, lights organized in some kind of tree.
When rendering the game, it needs to first ...
-1
votes
1answer
98 views
How can I handling rendering of entities with an entity/component system?
I'm implementing an entity system in a game engine which is based on the Artemis framework. My question is, how can I wrap an existing rendering engine (like Ogre or Irrlicht) under this framework?
...
9
votes
2answers
238 views
How can I support component-to-object communication safely and with cache-friendly component storage?
I'm making a game that uses component-based game objects, and I am having a hard time implementing a way for each component to communicate with its game object. Rather than explain everything at once,...
1
vote
2answers
212 views
Entity System and “composite” entities
I'm new to the Entity Component System pattern and there's something I cannot figure out. Let's say I have the following entity:
Player: {
Components: [
Position: {
x: 0,
...
0
votes
1answer
90 views
How to combat exponential growth in sprite messaging?
In my 2D platformer game, I have a number of sprites moving around the world. When two sprites collide with each other, I calculate how deep the collision is and then call a virtual method on both ...
9
votes
4answers
714 views
Entity component system - game progression
I'm quite new to game development (but not to programming) and I'm trying to figure out what would be the best way to handle inter-world communication. What I mean is this:
I've been reading about ...
2
votes
0answers
99 views
When NOT to use ECS architecture? [closed]
I'm familiar with the notion of entity-component-system architecture, and its advantages over traditional class trees. That being said, are there scenarios where one wouldn't want to use entity-...
0
votes
1answer
99 views
SceneGraph in Entity Component System, Transformations
I'm recently learning entity component systems, and started implementing it into my test engine, however I'm having an issue integrating this with scene-graph, which I'm trying for the first time.
...
0
votes
2answers
63 views
Running subsystems at difference update intervals
I want to update the rendering at 60fps, but the logic at some lower rate, say 15Hz. But if an only moves when the game logic updates, then it would appear to stutter badly especially for lower ...
1
vote
1answer
425 views
Updating a multithreaded Entity-Component-System
I am currently trying to implement an (sort-of) Entity-Component-System. I've got the gist of it, that is, how an ECS is supposed to work. So far i have 4 classes in my design (not yet fully ...
4
votes
1answer
424 views
ECS: AI components and systems
I'm trying to find the best design pattern for my AI code using an ECS.
Right now the entities that act as CPU-controlled have components like:
WeaponComponent
ChargeComponent
MovementComponent
...
3
votes
1answer
126 views
How to propagate component updates? (Changing components at runtime)
Whenever an entity is being added to an entity controller (which is essentially just a bag of entities), I scan through it's components to figure out if I need to register additional entity processors ...
5
votes
3answers
265 views
How to handle GameObjects that have been destroyed but are still held by others?
I'm developing my own game engine in C++ as a learning exercise. I have employed a fairly standard method of handling destroyed GameObjects:
Mark them as destroyed
Have the scene delete destroyed ...
1
vote
1answer
242 views
Transform components in ECS
Many game engines I've seen which are based on an Entity Component System. It has some kind of a Transform Component as a necessary component attached to all of their entities. While this does seem to ...
2
votes
1answer
236 views
Component arrays vs. entity structs? [closed]
Two of the main systems I've seen in entity system tutorials are:
An Entities class with one array / [hash]map for each component, with indices corresponding to entity IDs.
A list of Entity structs, ...