Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 in XNA. So should I use this stuff? Should my Entity class extend game component/drawable game component? I'm sure it will be quicker just to port my AS3 code, but I thought this built-in stuff may have some advantages?

UPDATE: I decided not to use them. It doesn't seem that they are meant to be used in the way I described.

share|improve this question
up vote 4 down vote accepted

I suppose it depends entirely on how you want to do things. I can say that most of the XNA tutorials and examples I've seen use them sparingly. Typically I see the built in GameComponent/DrawableComponent types being used as the base class for services, and then those services call customized draw/update methods on the child-objects they manage.

The main advantage you get from them is that if you add them to the Game.Components collection, the game will call their update, draw, and initialize methods during that phase of the game's cycle. You can get the same effect by just putting your own code into the Game's overrides for those methods and managing object collections yourself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.