bryanedds

Initially, I rejected the GameComponent framework in XNA. Becuase much of my low-level logic like collision and physics are compartmentalized outside of the game objects that use them, I couldn't understand how the GameComponent interface would allow me to work in this way.

But then I read about how the Game.Services functionality allows you to place the compartmentalized functionality into "globally" accessible list.

http://jsedlak.org/node/12

Now I'm refactoring my 2.5D game engine to use the GameComponent framework. I should be done in a few hours. Hopefully the refactoring will go without a hitch (it usually does in C# for some reason).

Still, I'm leery of inheriting GameComponent all over the place. Implementation inheritance gives me the creeps nowadays. Perhaps I'll just implement IGameComponent and IUpdatable instead.

Maybe this will help someone having the same problem as me.




Re: XNA Game Studio Express Doing things the XNA way

bryanedds

I do have one question though. When the visual component portion of GSE is reintroduced, will we have control over the order in which Services are initialized Currently, some of my Services rely on other Services to be initialized before them. This is because some Services use other Services whose actual type isn't known until run-time.




Re: XNA Game Studio Express Doing things the XNA way

Jim Perry

I believe you could do this in beta 1, but you had to tweak the code that was generated by the visual component to do so; it wasn't very intuitive. I would hope there'd be an list of the services and they'll initialize in the order they're added to the list or the order which you rearrange them to.




Re: XNA Game Studio Express Doing things the XNA way

Kurt Jaegers

Actually, I really doubt you will see are turn of the Designer for XNA projects. It didn't really make much sense to have them since there wasn't actually a "visual" component to any of them.

In beta 1 to change the order things got initialized you did indeed have to go into the code for the designer and reorder things the way you wanted them.