Questions tagged [component-based]

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 together and allowing specialized objects to inherit from general ones, component based design relies on composition rather than inheritance.

293 questions
27
votes
4 answers

Are there existing FOSS component-based frameworks?

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't care about that. It's not for my own project,…
Tesserex
  • 2,294
  • 3
  • 19
  • 26
10
votes
2 answers

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 simple entity that has a list of components. Of course…
Roy T.
  • 10,208
  • 34
  • 56
6
votes
3 answers

How should I manage my game objects and components?

By far, the biggest problem that has always dawned on my when programming games is how to structure my code. It just becomes an incredible mess, after a while. The reason for that is because I have no idea how different classes should interact with…
Xeon06
  • 1,162
  • 2
  • 12
  • 13
5
votes
2 answers

Component based game design and sharing mesh data

Lets say you make a game engine, and you have several GameObjects and every GameObject have a list of components that you can add or remove. Lets say there is a MeshComponent who has vertices, normals etc. If several GameObjects have the same…
Merni
  • 247
  • 1
  • 5
3
votes
1 answer

Trouble Using Component Base Pattern

I am trying to use a component based pattern on my new project. The last projects I did the old fashioned way. Base class and derive from that until your brain hurts. This time I wanted to do it on a new way with a component approach. Component Base…
Ello
  • 316
  • 3
  • 8
3
votes
2 answers

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 object entity that has the following…
Poon Wu
  • 39
  • 1
3
votes
4 answers

Reusing entities across screens: game data vs. object modelling

I'm working on a 2D RPG. I currently have a MainWorldScreen which has a Player entity, and some MapObjects that he can collide against. The player has a few components (sprite, keyboard input) etc. that implement specific logic for it to work in the…
ashes999
  • 11,261
  • 9
  • 59
  • 95
0
votes
1 answer

Where can I find an open source component-based game?

Check that link: Evolve Your Hierarchy I'm interested in that kind of game development, and the theory looks nice! But I want taking a look in the source code of some game developed following that methodology. It will be good if it's simplistic (or…
Click Ok
  • 671
  • 1
  • 5
  • 8