This project is read-only.

Adding XNA components

Sep 28, 2010 at 4:23 PM

We're starting to work on getting network going for our game now and we tried adding the GamerServiceComponent by doing:

this = class inheriting from Application


this.XnaComponents.Add(new GamerServiceComponent(*THIS IS WHERE IT WANTS AN XNA GAME CLASS*);


The problem is that the class that inerhits from the XNA game class called XNAGameAppWrapper and it's very much unreachable from the Application class.

Sep 28, 2010 at 4:25 PM


The Application class has an explicit cast to Game,


Game game = (Game)application;


Sep 28, 2010 at 5:13 PM

Well for people looking for answers regarding this.


Override the property called protected internal virtual bool ApplicationRequiresGamerServices { get { return false; } } in the Application class in your class

that inherits from application.


Implement it as something like public override bool ApplicationRequiresGamerServices { get { return true; } }


This way further down the line GamerServices will be created in the lower xna-logic parts of XEN.


and onwards we go to network perfection! :)