Linked Questions

1
vote
0answers
469 views

Nested Entities in Entity Component Systems (ECS) [duplicate]

Say I have an entity that has these components: -Transformation -Visual Imagine that these components can nest: If I have a parent transformation component, a child transformation relies on the ...
50
votes
3answers
16k views

In an Entity-Component-System Engine, How do I deal with groups of dependent entities?

After going over a few game design patterns, I have settle with Entity-Component-System (ES System) for my game engine. I've reading articles (mainly T=Machine) and review some source code and I ...
25
votes
4answers
28k views

Are there existing FOSS component-based frameworks? [closed]

The component based game programming paradigm is becoming much more popular. I was wondering, are there any projects out there that offer a reusable component framework? In any language, I guess I don'...
16
votes
3answers
6k views

Why is it a bad idea to store methods in Entities and Components? (Along with some other Entity System questions.)

This is a followup to this question, which I answered, but this one tackles with a much more specific subject. This answer helped me understand Entity Systems even better than the article. I've read ...
10
votes
4answers
10k views

How to make a game without OOP? [closed]

I am currenty studying game development and practicing making games. I use a lot of OOP in my games. For example, each missile that is shot is an instance of a ...
11
votes
4answers
12k views

Entity System and rendering

Okey, what I know so far; The entity contains a component(data-storage) which holds information like; - Texture/sprite - Shader - etc And then I have a renderer system which draws all this. But ...
10
votes
2answers
4k views

When/where to update components

Instead of my usual inheritance heavy game engines I'm toying with a more component based approach. However I have a hard time justifying where to let the components do their thing. Say I have a ...
8
votes
5answers
7k views

How can I efficiently implement a bitmask larger than 64-bits for component existence checks?

In my ECS implementation, I use bit-wise operations (as described and illustrated in this thread) to tell an entity what type of components it currently consists of. So my ...
12
votes
3answers
3k views

Grouping entities of the same component set into linear memory

We start from the basic systems-components-entities approach. Let's create assemblages (term derived from this article) merely out of information about types of components. It is done dynamically at ...
6
votes
6answers
6k views

Logic in Entity Components Systems

I'm making a game that uses an Entity/Component architecture basically a port of Artemis's framework to c++,the problem arises when I try to make a PlayerControllerComponent, my original idea was this....
5
votes
4answers
4k views

Should each Entity have its own update and render methods?

First, the questions: Should each Entity (which are classes like Character, Tree, Enemy) have its own update() and render() methods? If that's the case, then should I use Interfaces like "Renderable" ...
5
votes
4answers
2k views

Inheritance Hierarchy and Design — avoiding multiple inheritance

I am working on a 3D game, and need some advice about how to best design and structure my code so that I achieve what I'm going for without using bad practices like multiple inheritance. Basically ...
3
votes
3answers
4k views

Rendering order in an Entity System

Say I use a basic ES approach, and also inside Systems I hold lists of all entities that Systems are required to process. How do I maintain this list of entities in desired rendering order, i.e. for ...
4
votes
3answers
3k views

Visitor-pattern vs inheritance for rendering

I have a game engine that currently uses inheritance to provide a generic interface to do rendering: class renderable { public: void render(); }; Each class ...
7
votes
4answers
5k views

Retrieving components from game objects (entities)

Using C# and XNA 4, I've made the decision to go for an entity-component based design for my game after reading such posts as this and this, but I'm now struggling to find how to retrieve components ...
2
votes
2answers
1k views

Can I remove the systems from a component entity system?

After reading a lot about entity-component based engines, I feel like there is no real definition for this kind of engine. Reading this question, and the linked articles, made me think a lot. I do not ...
10
votes
3answers
1k views

How should I model an economy-based game in code?

I'd like to create an economy game based on an ancient civilization. I'm not sure how to design it. If I were working on a smaller game, like a copy of "Space Invaders," I'd have no problem ...
9
votes
2answers
1k views

Many sources of movement in an entity system

I'm fairly new to the idea of entity systems, having read a bunch of stuff (most usefully, this great blog and this answer). Though I'm having a little trouble understanding how something as simple ...
6
votes
3answers
740 views

How to start with more complex games? [closed]

I'm a new game developer and I have already finished Pong, Breakout and Snake. I want to start with strategy games, where do I read up on that? What ideas should I wrap my head around? I like games ...
1
vote
1answer
2k views

What is the component for the AI system in a component-based entity implementation?

In order to wrap my head around component-based systems, I started making my own little framework. Unfortunately I am not completely sure how systems are supposed to be used in some specific cases. ...
4
votes
1answer
1k views

Should components have sub-components in a component-based system like Artemis?

I am designing a game using Artemis, although this is more of philosophical question about component-based design in general. Let's say I have non-primitive data which applies to a given component (a ...
2
votes
3answers
2k views

Issues with ECS performance

I'm currently implementing ECS in "classic" sense, as defined by this wonderful post, where we have Entities, Components and Systems. And I'm having a serious (for me) performance issues. They come ...
5
votes
1answer
1k views

Entity component system - where did attributes and behaviors come from?

I recently spent quite some time understanding and building a component-based system. I got stuck on a few problems and after searching for quite some time ran across this answer which is talking ...
3
votes
2answers
678 views

How would the entity system handle dependent components?

Currently, I am learning about entity-component-systems, and I have a question concerning the components. How would the systems handle dependent components? For example, In a 2D game, I have a game ...
1
vote
2answers
2k views

How can I correctly use an unordered_multimap as entity and component storage?

The Setup I've made a few games (more like animations) using the Object Oriented method with base classes for objects that extend them, and objects that extend those, and found I couldn't wrap my ...
3
votes
4answers
380 views

Sprite and Physics components or sub-components?

I'm taking my first dive into creating a very simple entity framework. The key concepts (classes) are: Entity (has 0+ components, can return components by type) <...
3
votes
1answer
1k views

Component-based object, traversal?

I'm working on a small C++ component based game engine, as such... Object Foo might extend GameObject and x number of component ...
2
votes
1answer
732 views

Different kinds of movement in component based entity system

I am writing a pong clone with a component based entity system. But I am having trouble with the different kinds of movement in the game. The problem is the following: My paddles will just move up ...
2
votes
2answers
395 views

What are the advantages of having component logic in a “system” versus the component itself?

For the past few days I've been trying to make my first game. I did some research on usual development practices and patterns and I settled on a composition system where the different components ...
3
votes
1answer
1k views

ECS how to access multiple components (not the same one) in a system?

I'm implementing a basic entity component system from http://entity-systems.wikidot.com/rdbms-with-code-in-systems#java in C++, but I don't quite understand how I could do multiple components (not the ...
2
votes
1answer
596 views

Questions about the details of implementing a component-based entity system [closed]

I started reading about component-based entities, and overall it seems like a good idea, but many of it seems to skip over a lot of details and not give many real examples, so there are things that ...
0
votes
2answers
786 views

How can I cast a std::shared_ptr<Component> to the correct derived 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 ...
0
votes
1answer
55 views

How to efficiently organize different game zones with different functionality?

For now I have a list of basic data class like position in game world, dimensions, type and stuff like that, but since I am starting to implement their functionality it seems kind of a bad pattern, I ...