XNA Creators Club Online
Page 3 of 4 (82 items) < Previous 1 2 3 4 Next >
Sort Posts: Previous Next

XNA and PC Gaming - When is MS going to address the problems?

Last post 03-12-2008 11:53 AM by The ZMan. 81 replies.
  • 09-24-2007 11:22 AM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    If you use XNA then you use DX - its one of the documented requirements for XNA...

    All of these things are possible - its absolutely a solvable problem but its too hard for most people and its something that every single use of XNA GS (and managed DirectX back in the day) wants to do so it makes sense for MS to make it as easy as possible.


    The ZBuffer - News and information for XNA and Managed DirectX
  • 09-24-2007 6:24 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Be nice if Microsoft would just start bundling the latest version of the .Net framework and DirectX together. It would be a good solution I think. Then we can just simply include the XNA framework, install it and inform the user to "ensure you have installed the latest Windows Updates available from Microsoft.".

  • 09-24-2007 6:49 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Scionwest:

    Be nice if Microsoft would just start bundling the latest version of the .Net framework and DirectX together. It would be a good solution I think. Then we can just simply include the XNA framework, install it and inform the user to "ensure you have installed the latest Windows Updates available from Microsoft.".

    Not a good idea. They're two totally separate technologies. You don't bundle them together just so we can have it easier. A better solution would be to have some kind of script that can download and install the necessary pieces silently as part of a game installation. All the player needs to see if the game installing, not the pieces. It would be great to see Windows Update allow this though.

    Jim Perry

    Here's what I'm up to.

  • 10-01-2007 10:27 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Hi, I was a little bored over the weekend, and took a shot at this. File available here: http://xnamatrix.com/xnareq.php

    First of all, I needed to check whether or not people had .NET 2.0 installed. I search around and came up with this unique directory: C:\Windows\Microsoft.NET\Framework\v2.0.50727\

    So I used NSIS to create an installer which checks for this directory's existence. If the directory does not exist, I use wget to download the file, and NSIS to subsequently execute it. Then, I combine it with my previous xna requirements checker app that I wrote a few months ago (http://xnamatrix.com/xnareq.php) to check for DX/XNA.

    First, I check the graphics card for pixel shader 1.1 or above. I also give a warning if it's below 2.0 (since a lot of xna stuff requires 2.0), but it will return as a success anyway.

    For the DX portion, I queried a webpage (http://www.xnamatrix.com/xnari/dx_required.txt) for a list that I can update at any time, such as when a new version is released. Similarly, I did the XNA portion using another web file (http://www.xnamatrix.com/xnari/xna_required.txt), and I also did a check for version number of the assemblies. In this case, it's checking for 1.1 and above (i'm assuming that 1.1 means 1.0 refresh, since my current assemblies are at 1.1.x).

    Once I determine which technologies I need to update, I download the redistributables and execute and install them. Finally, everything is locally stored on the client's computer until he or she uninstalls my program (XNARI). The client can always re-run my program to check for any new updates.

    The final size of this program is about 400k (the bulk of which is wget.exe), and it will only download what is necessary to install all the prereqs.

    Please try it out at let me know if anything breaks. Also, I'm wondering about the legalities of all this. I included the xna license agreement in my installer, but i'm a coder, not a lawyer, so i'm not sure what i should do. And if anybody has any better methods/ideas, i'd love to hear them.
  • 10-01-2007 10:33 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Looks good for DirectX and XNA, but checking for that folder for .NET is probably going to break. That folder appears to use a version for the name so as soon as they update it, there's a chance the folder will change names. Beyond that, are you checking in the drive where Windows is installed? A user may have installed Windows into a different drive than C (or installed .NET into another drive if that's possible). But otherwise it seems to work.

    Everything seems legal enough. You're just looking for some basic things and then bringing down the redistributables from the internet. But, like you, I'm no lawyer and my advice is worth what you paid for it.

    NickGravelyn -- Microsoft XNA MVP
    Blog | XNA wiki | My Projects
    Write an Article, Win a Zune!
  • 10-01-2007 10:37 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Actually, if you go back a directory (C:\Windows\Microsoft.NET\Framework), you'll see that all of the previous versions are in there. For example, i have v1.0.3705, v1.1.4322, v2.0.50727, and v3.0 all there. I guess if needed to be safer, i can change that into a web-based updatable string too. As for the drive, I use whichever drive they installed my program into. So as long as they're executing the file where they are going to run xna, then it should be fine.
  • 10-01-2007 10:53 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    As long as you do not ship or download files from inside the .Net, DirectX, or XNA redistributables (i.e. you only use the CAB files) then you are fine from a EULA point of view. I don't even think you need to include the license.

    However the real issue here is that you are using detection methods that Microsoft do not document and relying on files on a web server which may not exist at some point in the future or may not have 100% uptime etc. Also what happens if I choose not to install XNA in Program Files? On my 64 bit machine it goes in '/Program Files (x86)' by default

    So while it might be a great workaround at the moment it really doesn't have the stability that a proper solution from Microsoft would have.

    When you say 'firstly I check for the graphics card' - how are you doing that before you have checked for DirectX and/or XNA framework. A quick look at your app suggests to me that you are relying on Microsoft.DirectX.Direct3D to already exist so that you can check this... there is no guarentee of this existing. The managed DirectX assemblies are not considered a core part of Windows so that file could well be missing until after you have checked for DirectX.

    This might help with official ways to detect .Net http://blogs.msdn.com/astebner/archive/2004/09/18/231253.aspx

    However there is no official way to detect DirectX... you are on your own there.

    And finally - your checking app throws a bad image excpetion on 64 bit machines... drop me an email if you don't know how to fix that.

    The best way to test apps like yours is to use virtual PC/VMware. Install a totally clean windows XP and make a  snapshot then run your checker.. if it fails you can restore back to the snapshot and try again.

     


    The ZBuffer - News and information for XNA and Managed DirectX
  • 10-01-2007 11:50 PM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Thanks for the tips/suggestions! Using that link as a guide, I updated the code to use a registry key check instead of directory existence: HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install

    Along the same lines, I found a key for XNA: "HKLM\SOFTWARE\Microsoft\Framework\1.0\NativeLibraryPath". Do you think I should use that instead of checking for the actual file? I also switched the logic order to install directx before checking for a graphics card. I didn't want to install unnecessary things, but I didn't think about the case where the client doesn't have directx installed.

    Lastly, I don't know how to fix a bad image exception, or even what that is. Do I have to compile a specific x64 version of the application?
  • 10-02-2007 12:02 AM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    You need to change your compilation to x86 instead of AnyCPU.

    If you compile to AnyCPU then a x64 app will JIT compile to x64 code, however XNA and ManagedDirectX only have x86 assemblies so when the x64 EXE tries to load the x86 assembly you get that error

    If you compile as x86 then it will run in x86 mode on x64 boxes and will load the x86 assemblies just fine.

    >Along the same lines, I found a key for XNA: "HKLM\SOFTWARE\Microsoft\Framework\1.0\NativeLibraryPath". Do
    >you think I should use that instead of checking for the actual file?

    Who knows... unless you can find it documented on an MS blog or in MSDN then its not likely you can always rely on it. However are you sure that is for the XNA framework - seems odd that it would be in a registry path without XNA in it somewhere.

     

     

     


    The ZBuffer - News and information for XNA and Managed DirectX
  • 10-02-2007 12:10 AM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    Sorry, I made a typo. It should have been HKLM\SOFTWARE\Microsoft\Xna\Framework\1.0\NativeLibraryPath
  • 10-02-2007 2:58 AM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    If your going to release a game for PC don't use XNA.. Use the other ton of tools available free such as Direct X 10 or OpenGL.  You can also buy or download a pretty good Game engine very easily...

    I use XNA strictly for XBOX 360 prototyping.    And  it works quite well..

    Just my two cents...

  • 10-02-2007 8:11 AM In reply to

    Re: XNA and PC Gaming - When is MS going to address the problems?

    splitline:
    If your going to release a game for PC don't use XNA.. Use the other ton of tools available free such as Direct X 10 or OpenGL. 

    Why? Why would I use something that makes game development take longer for no real benefit that restricts me to the PC?

    Jim Perry

    Here's what I'm up to.

  • 10-04-2007 1:00 AM In reply to