1
votes

I am thinking about making the platformer starter kit distributed by Microsoft XNA studio; into a local platformer game.

I'm trying to figure out how to add another player in the game so that there are two players.

Has anyone done this before or know how to do this?

thanks

1
Does 'Local' mean on the local network, or on the same computer? - Hannesh

1 Answers

0
votes

You would need to have a second player object that you would track separately from the first player object. Then you would need to respond to controls from the second controller, or a separate set of keyboard input than the first player object.

To get the controls for the second player (using the Xbox 360 controller) you could use:

GamePad.GetState(1); // 1 is the index, so it refers to player 2.

MSDN