Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
80 views

Why does GameComponent have an Initialize() method?

I'm not sure if this exact question has been asked before, but all I could find were questions about how to work with GameComponent, or why something wasn't working. I understand that you overload ...
4
votes
1answer
93 views

Odd Behaviour XNA Game Component

Inside of my main class file I am initializing a number of game components which are used to represent game scenes i.e. main menu and game. I am initilizing each component inside of XNAs LoadContent ...
1
vote
0answers
49 views

Can I switch off scenery elements on a 3D model?

I am using a 3D asset that has flat scenery elements (3D island with 2D bushes). [1] Having encountered a number of problems with this scenery [2] I want to deactive it (not visible, not collidable, ...
1
vote
1answer
87 views

How can I resolve component types in a way that supports adding new types relatively easily?

I am trying to build an Entity Component System for an interactive application developed using C++ and OpenGL. My question is quite simple. In my GameObject class I have a collection of Components. I ...
1
vote
1answer
196 views

When to use GameComponents?

I know what it is and I'm using it as a frame counter for example. But when should I use it? Does it make sense to say "I make all the input handling happen in a gamecomponent"? Is it flexible enough ...
1
vote
1answer
692 views

component Initialization in component-based game architectures

I'm develping a 2d game (in XNA) and i've gone slightly towards a component-based approach, where i have a main game object (container) that holds different components. When implementing the needed ...
1
vote
4answers
736 views

Which is the way to pass parameters in a drawableGameComponent in XNA 4.0?

I have a small demo and I want to create a class that draws messages in screen like fps rate. I am reading a XNA book and they comment about GameComponents. I have created a class that inherits ...
1
vote
1answer
347 views

What's the recommended way of doing a HUD for an android game?

Basically the question is in the title. I'm creating a RTS game and I will need buttons like attack move / attack ground, etc. I am not using any engine. When people do games in OpenGL for android ...
6
votes
1answer
1k views

Designing generic render/graphics component in C++?

I'm trying to learn more about Component Entity systems. So I decided to write a Tetris clone. I'm using the "style" of component-entity system where the Entity is just a bag of Components, the ...
1
vote
1answer
209 views

How to add several GameComponents of the same type?

in order to load 3D-meshes to my project i created a BasicModel class. I made it a DrawableGameComponent so I can override methods like Draw & LoadContent. Plus I have access to the GraphicsDevice ...
2
votes
3answers
439 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. ...
9
votes
4answers
2k views

What technique should I use to facilitate communication between XNA GameComponents (or between components of any type in a game)?

I'm starting out on my first 'proper' game project, and I've inevitably hit a block trying to decide how game components in XNA should communicate. From previous (Java) GUI programming events, ...
2
votes
2answers
2k views

How do I get access to the SpriteBatch service in my Sprite class using XNA?

I have the following Sprite class (leaving out everything that doesn't pertain to my question): public class Sprite { public Texture2D Texture { get; set; } public Vector2 Position { get; ...
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 ...
5
votes
3answers
4k views

When should a bullet texture be loaded in XNA?

I'm making a SpaceWar!-esque game using XNA. I want to limit my ships to 5 active bullets at any time. I have a Bullet DrawableGameComponent and a Ship DrawableGameComponent. My Ship has an array of 5 ...
17
votes
4answers
9k views

What are the cons of using DrawableGameComponent for every instance of a game object?

I've read in many places that DrawableGameComponents should be saved for things like "levels" or some kind of managers instead of using them, for example, for characters or tiles (Like this guy says ...
7
votes
1answer
1k views

In XNA, should I use the built-in game component classes?

I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff ...