Linked Questions

31 votes
4 answers

What is the correct object-orientated approach to class design in game development?

I'm in the midst of developing a 2D sprite-based game for Windows 7 Phone, using XNA. The training and tutorials available for it are pretty helpful, but the problem I face is that each of them ...
Josh E's user avatar
  • 537
6 votes
3 answers

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 ...
Bill's user avatar
  • 1,072
12 votes
2 answers

When/how to use GameService, GameComponent, Initialize()?

So I've finally got around to playing around with XNA and have been toying around with making a 2D game (I have a bunch of art assets from a friend who developed it on iOS) A lot of things seem to be ...
Setheron's user avatar
  • 596
2 votes
1 answer

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 ...
t0rb's user avatar
  • 211
1 vote
4 answers

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 ...
Oscar Foley's user avatar
3 votes
3 answers

2D XNA game Camera issue

I'm currently making a 2D Worm-clone in XNA, and have regrets about the way I've made my camera. I declare my camera in my Main class and the camera follows the player. In my draw I then begin my ...
Benixo's user avatar
  • 669
3 votes
1 answer

new graphicsdevice returning null

I tried to make a collision box visible (for testing) with spriteBatch.Draw(with a blank texture) in my TileSprite class. I ...
Jelle's user avatar
  • 331
4 votes
1 answer

How would I handle input with a Game Component?

I am currently having problems from finding my way into the component-oriented XNA design. I read an overview over the general design pattern and googled a lot of XNA examples. However, they seem to ...
aufziehvogel's user avatar
2 votes
1 answer

XNA GameServices vs. public static

I am just starting learning XNA for developing Windows Phone games. I am stumbling accross different sample codes featuring different approaches on handling things. A question for the experts... or ...
Christian's user avatar
5 votes
1 answer

Should the networking of my game be a component or a service? [closed]

I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that ...
aalcutt's user avatar
  • 213
1 vote
1 answer

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 ...
チーズパン's user avatar