Component-based designs rely on separating the multiple logical attributes of business objects and game objects into small components dedicated only to specific tasks. Whereas game objects are usually modeled to reproduce the attributes and behavior of "real world" objects by aggregating them ...
5
votes
1answer
157 views
Entity-Component-System data storage design
I'm working on an ECS and I've already read a lot of articles about it. Most of these articles are talking about a simple case (store data contiguously, read it in a single for loop). However the real ...
0
votes
1answer
62 views
Component oriented programming for rich RPG world
I've asked this question on several forums but didn't get the proper answer yet.
So, in my opinion, it is a really theoritical and deep, but I really can't deal with it by myself.
What is my goal?
...
-1
votes
0answers
23 views
Unity Engine : I want to move the player once while he is jumping
This is my move function which moves the player and stops it from moving if player isn't on the ground and canMoveWhileJumping is set to false
I can't figure out how to make my player move once while ...
0
votes
1answer
104 views
Data-oriented design and Component Sytem cross-referencing
Let's assume we're talking about a game (engine) which is written in C++. This is more like a design question but I can't find any suitable description.
Component System
The Component System says ...
1
vote
1answer
57 views
Communication between the SubSystems and the GameObject components?
Currently I have an architecture (not 100% accurate):
The RenderData contains primitives, which will be processed by the GraphicsEngine.
Upon creation I have to send the pointer of the renderData ...
0
votes
2answers
61 views
Unused methods after component inheritance in component based architecture?
I have a GameObject class, which contains Components, like:
Renderer
Camera
Behaviour
Rigidbody
First I inherited all of them from Component which has an Update() method, and it is called every ...
2
votes
1answer
54 views
Different objects interacting based on type
Many many thanks to anyone who chooses to take the time to read through this all and offer any advice.
I'm writing a game in which multiple different kinds of Objects move around a grid-based board ...
1
vote
2answers
81 views
What is the disadvantage of this communication protocol?
I am working on an ECS, and I thinked about this communication protocol: (with physics example)
Physics Component of a GameObject A sends UpdateMyState message with its state attached to it.
Physics ...
0
votes
2answers
75 views
How to disable script component while in game?
I'm trying to make a C# script to disable the First person controller script component for my character. I'm doing this so that while I'm controlling something else such as a vehicle, the only control ...
0
votes
0answers
77 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
vote
0answers
70 views
How to properly use Unity component approach?
It may sound like an opinion-based question, but I feel like I am not alone with such problem and this may help others too. I spent a lot of time trying to understand how to make things Unity-way, use ...
1
vote
1answer
123 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:
...
3
votes
1answer
131 views
how to make weapon charge up behavior using composition
I am trying to design different weapon behaviors.
Right now, there are 3 different types of weapon behaviors that i would like to implement.
When not pressing anything, weapon fires at a ...
0
votes
1answer
72 views
How to force a custom component on every GameObject?
I want to have a custom component which will have a drop down. I want this to be applied to ever GameObject in the project, which means every GameObject in the hierarchy and every GameObject prefab. ...
1
vote
1answer
51 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
1answer
57 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
0answers
67 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 ...
2
votes
1answer
112 views
Deserializing component array using JSON
I have a collection of serialized components in JSON format:
{
"components": [{
"class": "com.package.component.PositionComponent",
"x": 100,
"y": 100
}, {
"...
0
votes
1answer
136 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 ...
0
votes
0answers
31 views
Animations and timed events in a UI
I'm making a GUI framework for my game and I want to add animations. For example when a textbox appears, it can fade in and scale up to size. I want to give the framework user the ability to combine ...
3
votes
1answer
122 views
How can I facilitate communication between “attack” and “movement” components?
I'm currently programming in Unreal, but this is more of a component oriented design question.
I'm trying to follow a component driven aproach, and I have currently achieved creating a movement ...
9
votes
2answers
249 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,...
2
votes
0answers
113 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
122 views
Component messaging system - using integers vs message objects
I'm currently working on a component based system for my game, and I've decided to use a messaging system to communicate between components. I've read some on the subject and it seems that most people ...
1
vote
1answer
537 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 ...
0
votes
1answer
31 views
Issue with Button component
When I add a Button component, it looks like this:
Normally, it should look like this:
How can I fix this issue?
4
votes
1answer
511 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
...
1
vote
0answers
90 views
Custom Scene Component Do Not Register Children
I have made a class that is derived from USceneComponent which contains 4 references for itself and two UStaticMeshComponents. Simply I am trying to make a tree structure. When I first create actor (...
1
vote
1answer
275 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 ...
1
vote
1answer
172 views
Relation between game systems and components in a component-based architecture?
Based on a question I previously asked here regarding to decoupling input from other components of an entity I developed a small component architecture on top of XNA to understand how everything works ...
3
votes
2answers
127 views
Reusable component design
I'm working on an engine for my game (in C++). I've done the graphics related stuff and I've started working on UI (user interface). When I was working on buttons I've realized that hardcoding every ...
3
votes
1answer
835 views
Should I implement Entity Component System in all my projects?
I'm not here to ask for any specific code implementation, I'm here just to make my ideas clearer. But let me explain the situation:
I have already developed some little and amatorial game projects (...
5
votes
3answers
757 views
Complex system-component dependencies in entity-component-system?
I am trying to design a data-oriented ECS engine. The issue I am struggling with is that my rendering system have to rely on two different sets of entities to actually do rendering.
My current idea ...
0
votes
1answer
103 views
ECS: performance of many systems cycling on entities
I have been working with an ECS for my current game and I noticed that I came up with quite a few systems that go over lists of entities that sometimes overlap, so it's not unlikely that I loop on the ...
0
votes
1answer
157 views
How to make my components only contain raw data?
I'm reading that Components in ECS are just only data and have no logic. I'm trying to follow this and I got that working:
class Sprite : public Component
{
public:
Sprite(const std::string &...
2
votes
2answers
252 views
Low performance from unordered_map when accessing elements in member template function in derived class
I'm trying to implement a component based architecture on a game engine project. Each GameObject has an unordered_map that holds a pointer to Component base class. At this point, I only have one ...
3
votes
1answer
204 views
Handling multiple input mapped to single in-game controls
I am trying to map multiple input types to single in-game controls using libGDX's InputProcessor and ControllerListener interfaces. Currently, I have created a single InputType interface which is ...
7
votes
2answers
541 views
Create entity from template in component-based engine
For my project I would like to use a component-based entities in C++. My current implementation is split to these parts:
Systems - Contain a map of components of certain class and operate on these. ...
3
votes
1answer
381 views
Communicating with Collision System in ECS
I have read tons of articles and forums threads about ECS but still can't understand how anything in engine should communicate with Collision System. Let's say I have Input System that handle keyboard ...
2
votes
1answer
845 views
Creating a Static function inside my class to handle small housekeeping tasks
I have used Unity 3D for quite some time, and a lot of my game programming experience originates from using UnityEngine.
Writing in XNA, I am setting up a nested list of objects. Each object will be ...
0
votes
1answer
175 views
How to manage a vector of “Component” base class?
I'm trying to implement a component based design for a game i'm making. I decided to write it in c++ but i'm not very good at it. Coming from a java background I encountered a problem when trying to ...
1
vote
1answer
215 views
How can I handle invulnerability in an entity system?
I currently have an entity component system with messaging. The messages are delivered to each subscriber, but each subscriber gets their own copy, basically meaning that altering a message doesn't ...
1
vote
1answer
4k views
How to enable and disable scripts on a Game Object?
This worked briefly yesterday, I believe I did something to mess this up. All my inputs that I put in are correct; therefor, it must be the code. I want to switch players. While the red cube's script ...
2
votes
2answers
536 views
How to manage state in a component-based game engine?
I'm working on a small, data-driven game engine with some friends.
We use GameObjects (a.k.a. Entities, Actors, or whatever it is called in your favorite engine) to represent every entity in the game....
4
votes
3answers
254 views
Single Switch Script vs Multiple Scripts
Would it be better to have one script that switches or have multiple scripts with each with their own function?
In example, Lets say I am making a powerup script.
Option 1: Create a single powerup ...
1
vote
1answer
129 views
Unity3D - GameObject as a static function
Newbie Unity3D/C# developer here.
I've tried learning Unity3D during my May/June college vacation and came across a problem:Code 1:
CameraObj returnVoid;
void Start ()
{
returnVoid = GameObject....
1
vote
0answers
206 views
How to architect systems is Enity Component System, in C++ [closed]
When creating an ECS in C++, what are good, simple approaches to architecting the systems.
Should each system be a static function of a dedicated class (is this semantically different than just ...
3
votes
1answer
403 views
Character states in component based entity system
I'm working on a Zelda-like game (github), and I made a component-based entity system.
I've a Scene class which holds a std::vector of SceneObject.
SceneObject is a collection of components
Scene ...
3
votes
2answers
227 views
Unity : callbacks in component based design
I am trying to use component based design in Unity3d v5. If I have 2 separate C# scripts attached to enemy ships like below:
Script1.shipDead() - Remove game object and show explosion animation
...
2
votes
1answer
349 views
Client-Server Game Communication (w/ Protobuf, Relevancy and Delta Compression)
So, I have reached another problem while trying to implement my client-server communication. From everything I've read there are three main ways to minimize packet size:
Only send what has changed to ...