7
votes
Should components in Entity Component System pattern have logic?
I was considering voting to close this question as opinion-based, but I think there are a couple of misunderstandings about Entity-Component Systems and Data-Oriented Design here that are worth ...
5
votes
Accepted
Appropriate Cache Friendly Associative Container For An Entity Component System
Do the simplest thing that works, especially early on.
If you've ever seen videos of triple-A titles in alpha, you'll know how slow / buggy they are. This is normal; in fact, it's desirable. And it's ...
3
votes
Accepted
Should fields in components in an ECS use polymorphism?
feels like I'm violating the ECS rule
There is no ECS police that will come and put you in ECS Jail. This is your architecture, you set it up how it fits your needs.
having any functionality in ...
2
votes
Appropriate Cache Friendly Associative Container For An Entity Component System
ArcaneEngineer's advice is good, particularly for early development (to an extent - once you configure your engine to work a particular way, it can be significantly hard to rework it later).
For ...
2
votes
Accepted
Load large quantities of data in Unity3D
TL;DR
Use metrics to find what's a performance problem, don't just guess what it is.
TL
As you're accessing it via a web interface, the datastore at the back end is irrelevant. The performance ...
2
votes
Implementing Runescape-style stat-based conditional buffs within an ECS
Here's one way to approach it.
First throw all your base stats into one component as follows:
...
1
vote
Tilemap collision in Pure ECS?
When you have pure tile-based yes-or-no walkability, then there are a lot of optimizations you can do because:
Tiles never move
Tiles always have the same size
Tiles are always found at coordinates ...
1
vote
Design pattern for turn based strategy game in C++
First things first: If this is your first game and you dont plan to expand on it (except maybe for Neural Network Learing), then use your learned OOD. There is nothing wrong in doing it a certain way. ...
1
vote
Accepted
Using polymorphism in an Entity-Component System without sacrificing data-oriented design
The way I approached this was to use a constexpr string-hash which I apply to my components at compile-time to assign each of them a unique id. I essentially do this with the use of a macro where I ...
1
vote
ECS: is it beneficial to manage the data organisation of components before updating a system?
It's great that you have taken the time to think about a couple of ways to accomplish this.
Unfortunately, there is no way to tell what's the best approach before you try it with actual data in an ...
1
vote
Accepted
ECS: is it beneficial to manage the data organisation of components before updating a system?
It's difficult to say which way is best, since we don't know how prone your setup is to cache misses without this.
I think I remember Jonathan Blow describing doing this type of sort-before-update on ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
data-oriented × 21c++ × 10
entity-system × 6
component-based × 6
design-patterns × 4
entity-component-system × 4
architecture × 3
unity × 2
optimization × 2
data-structure × 2
entity-component × 2
logic × 2
c# × 1
java × 1
collision-detection × 1
physics × 1
android × 1
game-design × 1
box2d × 1
tilemap × 1
gui × 1
software-engineering × 1
c × 1
physics-engine × 1
memory-efficiency × 1