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 ...

learn more… | top users | synonyms

3
votes
3answers
590 views

State Changes in a Component Based Architecture [closed]

I'm currently working on a game and using the naive component based architecture thingie (Entities are a bag of components, entity.Update() calls Update on each updateable component), while the ...
4
votes
1answer
270 views

Using heavyweight ORM implementation for light based games

I'm just about to engulf myself in an MVC-based/Component architecture in C#, using MySQL's connector/Net for the data storage, and probably some NHibernate/FluentNHibernate Object-relational-mapping ...
13
votes
6answers
4k views

Game Components, Game Managers and Object Properties

I'm trying to get my head around component based entity design. My first step was to create various components that could be added to an object. For every component type i had a manager, which would ...
0
votes
3answers
180 views

How should I actually enforce the effects of components?

I asked a question about implementing components here: Am I on the right track with this component architecture? But I had more questions I'd like to ask. What's the best way to actually enforce ...
9
votes
1answer
913 views

Am I on the right track with this component architecture?

I've recently decided to revamp my game architecture to get rid of deep class hierarchies and replace them with configurable components. The first hierarchy I'm replacing is the Item hierarchy and I ...
3
votes
3answers
683 views

Why large builder classes rather than separate clases in component-based entity systems?

I was reading about component-based entity systems and I was wondering why there is usually a large EntityBuilder class with methods like CreatePlayer(), CreateEnemySpaceship(), and CreatePowerup(), ...
2
votes
3answers
441 views

Need some advice on designing components

So after reading about components for a bit I want to make a very simple spaceshooter game that uses components and systems. However, I'm a bit confused on how much scope each component should have. ...
10
votes
5answers
3k views

How to properly handle collision in a component-based game?

Trying to wrap my head around the ways to properly handle collision in a game designed around components. I see many examples have some sort of PhysicsComponent that gets added to the entity's list ...
1
vote
2answers
723 views

Should game services be global? (XNA)

If one wants to use services, they can use the ones built in to XNA (Game.Services) and pass around the Game object to everything that needs to either query for a service or add a service. ...
0
votes
1answer
581 views

Is an entity/component system appropriate for this geometry handling system?

I'm working on a Component/Entity-System based game engine atm. And I have this little dilemma. I have simple geometrical structures which might be downloaded or created in game at some point. These ...
31
votes
2answers
10k views

Entity/Component Systems in C++, How do I discover types and construct components?

I'm working on an entity component system in C++ that I hope to follow the style of Artemis (http://piemaster.net/2011/07/entity-component-artemis/) in that components are mostly data bags and it's ...
12
votes
5answers
794 views

Why place entity config outside of scripts?

I've seen a lot of games that define the entity components in script files, but when they configure each entity and specify what components it has, they use some other file format (like XML). Why do ...
11
votes
4answers
455 views

How forcefully should a single-player engine reject invalid data?

In a single-player game, when trying to build an entity out of components specified in external scripts, what do you think is more desirable to happen when one of the components is ill-formed: ...
1
vote
2answers
219 views

Searching a map fewer times

... or better yet, removing the need to search the map altogether. I'm either looking for suggestions on how to optimize my code, or a change in design. In my component-based entity system, the ...
1
vote
1answer
1k views

Some practical issues with component-based game object systems

I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate and now I have come to the engine architecture. I intend to use ...
1
vote
3answers
1k views

XNA Entity Component Design: Lost on how to include Sprite Animation

I've been reading about Entity Component design and thought it's pretty neat. I've been trying to write a quick 2D engine in XNA. I think I've laid the proper groundwork for registering and updating ...
9
votes
3answers
4k views

Component entity system - Updates and call orders

In order to get components to be able to update every frame (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component. Other components ...
5
votes
2answers
1k views

Checking for Weapon Collision in a 2D overhead RPG game

I'm starting development on a 2D overhead RPG game, and am wondering what the best approach for handling weapon collision and dealing damage to enemies is. I'm currently using a basic ...
22
votes
4answers
2k views

Appropriate level of granularity for component-based architecture

I'm working on a game with a component-based architecture. An Entity owns a set of Component instances, each of which has a set of Slot instances with which to store, send, and receive values. Factory ...
-6
votes
2answers
680 views

Component-based entities without IDs?

I'd like to know if someone has found a way to build a component-based entity system in their game(s) without using IDs. I find that IDs tend to do away with one of the major (possible) advantages of ...
7
votes
3answers
784 views

Overriding component behavior

I was thinking of how to implement overriding of behaviors in a component based entity system. A concrete example, an entity has a heath component that can be damaged, healed, killed etc. The entity ...
25
votes
5answers
2k views

Doing powerups in a component-based system

I'm just starting really getting my head around component based design. I don't know what the "right" way to do this is. Here's the scenario. The player can equip a shield. The the shield is drawn ...
17
votes
2answers
3k views

How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
0
votes
1answer
262 views

Combination of DLL/Plugins with Object/Components

I worked on a personal game project (learning) for about the last year or so off and on in Ogre3D. Now that I am starting a new project, I want to avoid the Class Heirarchy for objects and having all ...
7
votes
3answers
2k views

Role of an entity state in a component based system?

Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what ...
5
votes
4answers
867 views

Drawbacks of using reflection for a component based system at loading-time

I'm coding a little casual game in Java using Slick2D. This game use a lot of different "objects", managed in a composite way. So, firearms, furniture in the map, NPC and player character will be ...
4
votes
2answers
618 views

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, ...
21
votes
6answers
5k views

What designs are there for a component based entity system that are user friendly but still flexible?

I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
7
votes
3answers
1k views

Component based entity system API naming problems

My engine uses a component-based entity system internally, and I want to bind it to Lua for scripting. Now, I want to save people who write scripts for it typing work. In C++, to set the position of ...
16
votes
2answers
6k views

Designing a component based game

I'm writing a shooter (like 1942, classic 2D graphics) and I'd like to use a component based approch. So far I thought about the following design: Each game element (airship, projectile, powerup, ...
6
votes
4answers
1k views

MVC or Components, or both?

I'm an experienced developer but recently I've been wanting to get into game programming but as you know game development is an entirely different beast from most other forms of programming (perhaps ...
6
votes
2answers
847 views

How to write reuseable components for pygame

Is there a recommended way to write reuseable components for pygame? Simple example would be a FPS counter. Should I write a class which has an init, update and draw method and call them from inside a ...
6
votes
3answers
7k views

Using components in the XNA Game State Management example?

In the game state management example at the App Hub, they say that if you want to use components in the example you can extend the GameScreen to host other components inside itself. I'm having a ...
14
votes
4answers
3k views

Open source component-based game or engines?

I've read some about component-based game design but am still having some trouble figure out how exactly you'd go about implementing it. Are there any good examples of component-based games or game ...
5
votes
3answers
1k views

Managing game objects/components

Good day everyone, 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 ...
-1
votes
1answer
1k views

Code Structure / Level Design: Plants vs Zombies game level dissection

I am interested in learning the class structure of Plants vs Zombies, particularly level design; for those who haven't played it - this video contains nice play-through: ...
18
votes
4answers
4k views

How to implement behavior in a component-based game architecture?

I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture. Say I have a following player character that can ...
5
votes
6answers
2k views

How to implement a component based system for items in a web game

Reading several other questions and answers on using a component based system to define items I want to use one for the items and spells in a web game written in PHP. I'm just stuck on the ...
9
votes
3answers
2k views

Creating Entity as an aggregation

I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ The ultimate concept ...
6
votes
1answer
3k views

Entity system in Lua, communication with C++ and level editor. Need advice

I have a 2D basic editor written in Qt, and I'm in the process of adding entities. I want the editor to be able to receive RTTI information from entities to change properties, create some logic being ...
3
votes
1answer
838 views

Fundamental physics component(s) in component-based game engine

What are the "smallest" physics components in your component-based game engine? Would it make sense to create something like Positionable, Rotatable, Movable, Collidable and combine them the way you ...
20
votes
4answers
7k views

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 ...
18
votes
6answers
4k views

Would it be better to use XML/JSON/Text or a database to store game content?

I'm considering how to implement a component-based game, as that seems to be the hot thing and I like the idea of such a flexible design. One of the features of such a design is that adding new ...
37
votes
6answers
11k views

Component-based game object systems in practice

Let's see history of success. Which popular games (and game engines) were built using component-based game object system? Each answer should contain: Game Title (one per answer) Author / Company ...
6
votes
2answers
2k views

How are components properly instantiated and used in XNA 4.0?

I am creating a simple input component to hold on to actions and key states, and a short history of the last ten or so states. The idea is that everything that is interested in input will ask this ...
11
votes
1answer
2k views

Register Game Object Components in Game Subsystems? (Component-based Game Object design)

I'm creating a component-based game object system. Some tips: GameObject is simply a list of Components. There are GameSubsystems. For example, rendering, physics etc. Each GameSubsystem contains ...
13
votes
4answers
3k views

How can I design an effective game object interaction scheme with a component-based architecture?

This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D ...
19
votes
2answers
2k views

Component-Based System online resources

I've been considering moving to a more component-based approach in my games. Does anyone else have any decent reference material or sample implementations that would help make this transition a little ...