The starLiGHT.Engine uses the concept of logical players to solve the following problem:

The XBox is capable of handling four XBox-Controllers at once. These controllers are numbered from one to four which is equal to the port each controller is connected to. If there's more than one controller connected to the XBox there's a little problem: The InputManager and your game are not able to know which controller the player is using. If he always picks up the controller connected to port one everything is fine and this is how many games handle input. The starLiGHT.Engine will assist you to make it better by using the concept of logical players.


How is this working?

It is very easy. At the beginning of your game after initializing the InputManager the starLiGHT.Engine is monitoring all connected controllers. The first controller which has a button pressed will be mapped to the first logical player (LogicalPlayerIndex.One). The second will become logical player two and so on. After this mapping process you are able to ask the engine for input handling for a specified logical player very easily.

This concept is showcased in the XBox version of the starLiGHT.Sandbox.InputManager.

Last edited Dec 15, 2010 at 7:38 AM by Glatzemann, version 1

Comments

No comments yet.