1
\$\begingroup\$

I have an XNA game for WINDOWS which I want to work on XBOX also.

I've designed the game so that when I want to connect it to an XBOX, all I have to do is supply a different input class,

And I would do that by checking with the preprocessor macros and checking if it's windows or xbox.

But then, when I tried to do Create a copy of this project for XBOX in VisualStudio, it created several new projects (the real XNA project and some of it's dependencies), and it complained about things not working for C# 3.0 and that I should use C# 4.0 instead, which I didn't find out how to do either.

What's the correct way to make both WINDOWS and XBOX versions of an XNA game?

And also, how do I really run the game on XBOX? I haven't found a good tutorial on how I do that... also I don't have an XboxLive membership so if there's a hacky way to do that, it's better

\$\endgroup\$
2
  • \$\begingroup\$ What version XNA and what version of the dotNet are you using in the original project? \$\endgroup\$
    – Felsir
    Aug 27, 2016 at 16:46
  • \$\begingroup\$ Xna 4, dotnet 4 \$\endgroup\$ Aug 27, 2016 at 20:11

1 Answer 1

-1
\$\begingroup\$

If you've already supplied the input methods, then this code should work (change in Program.cs)

#if XBOX
static void Main (string[] args)
{
    using (Game1 game = new Game1())
    {
        game.Run();
    }
}
#endif

When you open a new project, the #if says WINDOWS || XBOX, but, if you just want an Xbox game, then change it to Xbox only.

\$\endgroup\$
1
  • \$\begingroup\$ I've left the project already, but for the sake of the answer, the problem is not about allowing only XBOX. It's about how to check the game in XBOX when I don't have xbox GOLD, and also compiling the game correctly for XBOX. \$\endgroup\$ Dec 4, 2016 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .