xna for PC and gamepad

Started by
1 comment, last by matheszabi 14 years, 1 month ago
Hi, I wish (to try) to make a mmorpg game ( like many other exist already). I wish to make the client free, even open source, the server side not, it will contain non public code. I wish to earn money from selling various items used in game. Better swords, armor and so on. As I know I can use the Microsoft XNA Game Studio 3.1 with C# Express Edition 2008 for this scope. So: just PC platform not XBox or anything else. My first question it is legal this for client development? -how about the server development the C# Express 2008? And a technical question: Here is a tutorial: http://msdn.microsoft.com/en-us/library/bb975644.aspx Download GoingBeyond4_Tutorial_Sample.zip. Downloaded and started to "play" on PC. I couldn't because I haven't a game pad. I went to shop and bought one: Canyon CNG-GP2. Installed the driver, and at control panel made a test. It works fine. I have restarted my PC, after start again the Microsoft XNA Game Studio 3.1 debug, I still see I can't play. in the code: protected void UpdateInput() { // Get the game pad state. GamePadState currentState = GamePad.GetState(PlayerIndex.One); if (currentState.IsConnected) { .... } else { Console.WriteLine("Not connected the gamepad:" + currentState); } ..... } And at output I see: "Not connected the gamepad:{IsConnected:False}" - and at windows control panel I can test my game pad...works perfectly. What to do? :)
Advertisement
As far as I know there are no restrictions on using XNA GS or C# Express for commercial PC development. But as always if you're really concerned you should consult a lawyer.

The XNA GamePad class only works for devices supporting XInput, which is really just the Xbox 360 controller. I'd recommend getting one since that's what most of your customers would use. For other gamepads, you can use DirectInput. SlimDX has a DirectInput wrapper, or you can use something like this.
namespace Microsoft.Xna.Framework.Input
{
// Summary:
// Allows retrieval of user interaction with an Xbox 360 Controller and setting
// of controller vibration motors. Reference page contains links to related
// code samples.
public static class GamePad


Now I see :) Thanks for help. Trying with the recomandated library...

This topic is closed to new replies.

Advertisement