IamBMF

Okay, so I finished my first game using XNA Game Studio Express, it has been only a few days since I installed it, and it has been quite easy, having experience at making games. Now, I want to show this game to my friends, so I send it to a couple of them (both of them have XNA Game Studio Express installed), and it works great.

Now I want to show it to some other friends, these who do not know what making games is about, these who do not have XNA Game Studio Express.

I ensure they follow these instructions, from the manual:

Sharing a Windows game

On Windows you need to distribute your game executable and any content required by your game. In addition you need to ensure that the user has the following redistributables installed:

* .NET Framework 2.0
* DirectX 9.0c
* XNA Framework

But still, when they try to open the game, this error (probably badly translated) pops up:
"The aplication found an error and must close"

They do have the .NET Framework 2.0 (dloaded it twice, til it said "do you want to repair it"), DirectX 9.0c and the XNA Framework 1.0.

I don't know what could be the cause of the problem, please help!

Thanks in advance.

-BMF



Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

dczraptor

Make sure they have a graphics card that supports XNA. You need at least 1.1. Check here: http://en.wikipedia.org/wiki/List_of_computer_games_that_require_Pixel_Shader#Graphic_chipsets_with_pixel_shader_support

Also, make sure they have the LATEST DirectX. There are multiple version of 9.0c, so make them run this: http://www.microsoft.com/downloads/details.aspx familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en






Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Okay, I checked, one of the guys who can't play it has the following graphics card:
NVIDIA Geforce 4 MX440

From what I can see on that wiki link (very helpful one, thanks!) that one isn't good enough.

So that must be the cause

Isn't XNA a bit exigent on graphic cards I'm afraid most of my friends won't have a good enough one to play my game...




Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

dczraptor

Unfortunately, there's no good workaround. XNA needs shader support, even for a strictly 2D game. That's just how it is, sorry. A new card that's xna-compatible only costs around $50, so that may be an option. Reference support is out of the question because it makes the game unplayable.

If you really must show off to your friends, you might want to check out Managed DirectX, which can support older graphics card, but it's also harder to write code for compared to XNA.






Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Aw.. now I tried it with a fried who has everything installed, and a graphics card that theoretically supports XNA.. and it's still showing the error. What could I do Anything I could check
He has everything installed, and everything up to date.




Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

Jim Perry

"theoretically"

A couple of suggestions:

  • Put code in your game that logs messages to a file as the initialization of the game is done. That way you'll see exactly where the problem is. Make sure the first line of code that is executed is an entry in the log that says something like "Game starting". That way you can be sure that at least your code is getting reached.
  • Make sure you have error handling code in place wherever an exception could be thrown.
  • Usually if you get an error like this you get the option to see the dump of all the info that the game has at the time of the error. Have your friend send you this information.

If the log doesn't end up with any entries, it's more than likely a hardware issue. Tell your friend to spend the $50 to get a better video card.






Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

waruwaru

IamBMF wrote:
Aw.. now I tried it with a fried who has everything installed, and a graphics card that theoretically supports XNA.. and it's still showing the error. What could I do Anything I could check
He has everything installed, and everything up to date.

Run your game in debug on your friends' machine may show you some unhandled exceptions...






Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

Stephen Styrchak - MSFT

I recommend you add some exception handling code to your game. If you are using the default project setup, add a try...catch statement in your Program.cs file around the Game object creation and invocation. The error you are seeing is caused by an unhandled exception that is crashing your game.

By catching the exception, you can do something like write out the exception to a log file, or display it in a System.Windows.Forms.MessageBox, or otherwise display a more informative error message for your user. For example, if the exception is because the user's graphics card is incompatible, then you should display a friendly dialog that explains what the problem is.

For starters, you just want to catch the exception and display what it is (call ToString() on the exception) so that you can figure out what's crashing.

--Stephen





Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Okay I've tried it with 3 more people that definately have great graphics cards, and installed everything too.

This is the "error signature" that of the error users get:

EventType : clr20r3 P1 : mentalagility.exe P2 : 1.0.0.0
P3 : 45c66166 P4 : microsoft.xna.framework.game P5 : 1.0.0.0
P6 : 455fb259 P7 : 128 P8 : 4 P9 : system.typeinitialization

Then there's this long module-divided information, that I cannot understand. It has 44 modules, the last one being "apphelp.dll".

Here you have some of that information (screenshot), 3 first modules, in case it's useful:

http://bmf.veloren.com/Error1(1).PNG

And the game can be found at (in case it's useful I'd be willing to share my source code too):

http://bmf.veloren.com/files/MentalAgility.rar

About catching exceptions, I've never done such, and am a bit clueless about what code to add to 'catch the expression and show it', could you please give me an example

Thanks for all the replies.





Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

dczraptor

try{

// Load graphics device and set parameters here

}

catch // if there is an error, the code will go to here, otherwise it will skip the catch block

{

// Print error message

}






Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Sorry but what exactly should I place on that "print error message" zone




Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

Stephen Styrchak - MSFT

I suggest you use something like the code below in your Program.cs file. It will catch any unhandled exception in your game's main thread and display the callstack. You will need to add a reference to the System.Windows.Forms assembly from your project in order to get this to work (right-click on the References folder in the Solution Explorer).

/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (Game1 game = new Game1())
{
try
{
game.Run();
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show(e.ToString());
}
}
}
--Stephen




Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Thank you so much, at least now it gives some understandable information.

First error they get:
http://bmf.veloren.com/files/BSOD.PNG

So... that DLL is missing I guess that should come with the XNA Framework They installed it today.. downloaded it from here:
http://www.microsoft.com/downloads/details.aspx familyid=2E136A1F-F187-478C-9DA5-AAEB0904782B&displaylang=en

Is the link outdated or something

Okay, so I sent them this file (I do have it), and now it threw another error:
http://bmf.veloren.com/files/BSOD2.PNG

Hope this is coming to its end,

eager to read a reply from another helpful mate!

Thanks you all.





Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

dczraptor

d3dx9_31.dll comes with directx i believe, so that may mean directx wasn't installed properly. Make sure they updated directx to it latest version, december 2006. That may get rid of your second error too.




Re: XNA Game Studio Express Unable to share a windows game - Followed the instructions on the manual

IamBMF

Aha!

That solved it! Thanks guys!

The problem was that I was unaware about the fact that there were different versions of DirectX 9.0c, so since their 'dxdiag' info said they had DirectX 9.0c I assumed this was the latest version.

Now they downloaded this latest one and it works. =)

Wow, XNA requires all up-to-date!

Thanks again!