简体   繁体   中英

XNA game will not run in VMWare

For a few months I was using my laptop to help me test the networking in my XNA PC game. I've sold my laptop to my roommate who is moving to China to teach English so now I do not have it to help me test the networking/multiplayer in my game. I've set up VMWare on my PC with a copy of Windows 7 x64 to try and use that to help me test. I've got it set up with its own ip but when I try to run my game it immediately crashes giving me the following problem signatures:

Problem Event Name: CLR20r3
Problem Signature 01:   forlorn forest.exe
Problem Signature 02:   1.0.0.0
Problem Signature 03:   54703780
Problem Signature 04:   Microsoft.Xna.Framework.Game
Problem Signature 05:   4.0.0.0
Problem Signature 06:   4e6012e7
Problem Signature 07:   129
Problem Signature 08:   60
Problem Signature 09:   AQRZ5UNGVPAAKLRWFFK35BWUV213BMTN

I've tried looking into a bit and seems as though it may have something to do with the graphics device. Some people mention a "NoSuitableGraphicsDeviceException" exception. The VMWare display properties show as:

1. Generic Non-PnP Monitor

and the adapter information chip type:

VMWare Virtual SVGA 3D Graphics Adapter

Has anyone run into any problems running an XNA application in VMWare or know what this problem may be that I'm running into trying to run my game in it?

VM's don't like games. VMs by their very nature do not like to run graphics-intensive operations and will always be slower than playing on a physical machine. Thus, this will not work.

However, there is a way to do what you are trying to do, as I have done it many a time: simply play two instances of the game on the same computer! First, I launch the game with Visual Studio. Then, I open the directory where the game build is located and launch it. As long as you have the network configured correctly, there should not be any problems.

VMs don't play games. You'll have this problem with any DirectX based program (not just XNA). There are experimental features in some VMs, like VirtualBox, to enable DirectX/OpenGL, but I have had precious little luck with them.

I would suggest creating a "test" game that isn't graphical, but performs all the networking functions and creates the expected messages. That way, you can run it in the VM without running into this.

Of course, just using a laptop or other cheap computer as your second machine works just as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM