Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
4k views

How to Implement ECS Archetypes in C#?

I'm trying to figure out how to implement a simple ECS with an Archetype approach, similar to what Unity's ECS uses. An archetype is just a category for entities that have a specific set of components....
Floating Sunfish's user avatar
0 votes
0 answers
65 views

How would I go about creating dynamic weapons using EC architecture?

I currently have a weapon component that contains common functionality across weapons (mainly guns). ...
user avatar
1 vote
1 answer
209 views

Where should I put units and items in a squad-combat ECS-based game?

So I'm working on a game where squads of varied units would explore, fight, trade and build on an overworld map. Combat would be automated more or less, and happen on the overworld. Basically, ...
Hypergardens's user avatar
5 votes
1 answer
5k views

Dealing with more complex entities in an ECS architecture

Preamble: I'm working on a level editor for my engine, which uses an ECS architecture. I have around a dozen component types so far, mostly dealing with graphics, like lighting components, model, and ...
Yattabyte's user avatar
  • 1,043
2 votes
1 answer
636 views

Pass data down to components

In the game I have, I'm using an architecture close to what I've seen of Unity components : Basically, the universe implements the game loop, entities implement and ...
user avatar
0 votes
2 answers
268 views

How to: Duplicating and updating component data in systems

I am new to game development. Coming across the ECS (entity-component system) pattern I generally quite liked the idea. I have implemented the current version of my engine using the OOP style approach....
Adrian Albert Koch's user avatar
4 votes
2 answers
1k views

Appropriate Cache Friendly Associative Container For An Entity Component System

The intro to this problem is a bit of a long one so my apologies in advance. In short I am asking for suggestion as to what type of collection I should use to store data for a particular part of my ...
Ryoku's user avatar
  • 187
0 votes
1 answer
104 views

Guidelines for determining what should be a component?

Background: So I'm developing my first 2d C++ fighting game (for learning purposes) and I have a setup where I have 'components' which are really just data holders with maybe some simple utility ...
Jason's user avatar
  • 423
1 vote
0 answers
196 views

Communication in an entity-component through public variables or public member functions [closed]

I am currently coding my own ECS to get a deeper understanding of how such an engine works. I am currently putting together systems. I am aware that there is no right answer to my question as there ...
Martin Sand's user avatar
2 votes
1 answer
792 views

Component based architecture in TypeScript

I'm doing a game using Phaser with TypeScript. I want to implement a component based architecture for Actors. What I'm trying to achieve is this: ...
Guilherme Recchi Cardozo's user avatar
2 votes
1 answer
2k views

ECS - Components inside components?

Reading up on ECS, I've tried to implement a simple 'game', if you can call it that. Basic concepts : You have planets(entity), they produce gold. (gold is a component inside planet) Planets can ...
Patrick's user avatar
  • 163
0 votes
1 answer
80 views

Changing the current state of an entity in the middle of an update step or wait for the end?

Let's say that I use a behaviour component that holds a function call to be called every update step assigned to an entity. Inside that function call I'm changing the active state for the entity to ...
FrameBuffer's user avatar
6 votes
2 answers
6k 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 ...
csisy's user avatar
  • 375
3 votes
1 answer
729 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 ...
CaptainTid's user avatar
0 votes
1 answer
768 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 ...
Anonymous Entity's user avatar

15 30 50 per page