XNA Creators Club Online
Page 2 of 2 (35 items) < Previous 1 2
Sort Posts: Previous Next

Dream Build Play - Engine Question

Last post 06-25-2007 12:14 AM by jwatte. 34 replies.
  • 06-19-2007 2:11 AM In reply to

    Re: Dream Build Play - Engine Question

    Hi Mitch,

    Thank-you for your helpful reply.  If I understand correctly, unstated but implied competition rules include the following criteria:

    1) all user-developed or referenced assembles (except those existing in .NET) must originate from C# code and use the XNA framework
    2) unmanaged code or interop is disallowed for both Windows and XBOX game submissions.
    3) compilaton of C++ code using /CLR:pure into MSIL is considered native code and thus disallowed.

    Here is another question -- we own a source code license to SpeedTree, and our license grants complete use of the source including modification and integration.  SpeedTree and SpeedGrass are an industry standard for the XBOX360 and Windows.  Is it allowed and if so, in what form?

    Thanks!
  • 06-19-2007 5:47 PM In reply to

    Re: Dream Build Play - Engine Question

    Once compiled, a managed assembly is a managed assembly. There is no practical way for anyone to determine the source language of any compiled assembly. So if it is not an official, stated rule that you must use C#, and there's no way for anyone to tell if you did or not, then... Ah, nevermind, I'm just going to get in trouble for this post.

    Although all managed assemblies are created equal, some contain IL instructions that aren't supported by the CLR on Xbox 360, and some have dependencies that can not run on Xbox 360. Some languages are more likely to use non-portable IL than others. Just try to remember that if you infer anything I might have unintentionally implied in my earlier comments.

    Regarding your source license, if you are allowed to modify it, then I would imagine porting it to C# is covered under that. Regardless of your license or industry standards, native interop is not available to managed games on Xbox 360.

    If you're going after the grand prize to win an XBLA contract, it won't do you any good to use stuff that won't run on Xbox 360.

    PS: I haven't read the rules myself, but if they do say to use C# then don't try to dance around it -- just do it!

    Stephen Styrchak | XNA Game Studio Developer
  • 06-20-2007 2:53 AM In reply to

    Re: Dream Build Play - Engine Question

    Hmm... And what if my game builds fine with the XBox360 target? Is this enough to tell it complies with standards required by the XBox360 CLR? I ask because I do not have an XBox...

    Pawel

  • 06-20-2007 3:22 AM In reply to

    Re: Dream Build Play - Engine Question

    DaCoder:

    Hmm... And what if my game builds fine with the XBox360 target? Is this enough to tell it complies with standards required by the XBox360 CLR? I ask because I do not have an XBox...

    Pawel



    If you stick to C# then yes, if it compiles, it will run on the Compact CLR (the 360 .NET is the Compact edition). However if you emite IL instructions yourself (the API doesn't exist on the 360 but you can save out assemblies in for example a content pipline) or you use a different compiler (non C#) no guarentees.

    Known languages i've tried
    C++ CLI /pure (ONLY /safe doesn't)
    C#
    Lua (Using XNua)
    F#

    Deano
  • 06-20-2007 4:28 AM In reply to

    Re: Dream Build Play - Engine Question

    That is not true in all cases. I have seen several cases where code compiles but does not run on the 360, generating an invalid method call exception. One such case is the (type here).TryParse() which doesn't exist on the 360, but compiles none-the-less. I have also run into similar issues with calling .BeginInvoke(...) on a delegate.
    John Sedlak Xna/DirectX MVP
    Focused Games | My Blog
  • 06-20-2007 1:51 PM In reply to

    Re: Dream Build Play - Engine Question

    John, are you saying you compiled something like Int32.TryParse("1", out i); against the Xbox 360 framework?

    Are you sure? I just tried it, and it doesn't work for me. That method isn't in the Xbox 360 framework, as you said, so the only way you would be able to get it to compile is if you referenced the wrong mscorlib.dll from your project.

    If you compiled against assemblies that aren't present at runtime, that is neither a compiler, nor a language, nor a compatibility issue.

    Stephen Styrchak | XNA Game Studio Developer
  • 06-20-2007 2:23 PM In reply to

    Re: Dream Build Play - Engine Question

    Hmm, you know... that is probably what I am doing. I keep forgetting that I am using Visual Studio Pro instead of Express. :(
    John Sedlak Xna/DirectX MVP
    Focused Games | My Blog
  • 06-20-2007 5:15 PM In reply to

    Re: Dream Build Play - Engine Question

    Regarding SpeedTree: I believe you only can use SpeedTree to enter the competition if you have the right to show the SpeedTree code to the Microsoft Judges. I believe you don't have that right; thus, you can't use it to enter the competition.

    If you want to release your game to the public in source code, then entering the competition doesn't matter, because Microsoft gets a non-exclusive license -- you keep your own rights, too, except you can't exclude any use from Microsoft.

    compilaton of C++ code using /CLR:pure into MSIL is considered native code and thus disallowed


    Now, suppose I disassemble that assembly using Reflect.NET, and generate compiable C# code, and re-compile it -- then it would, technically, qualify. I must try doing that sometime just to see whether it's actually doable :-) I wouldn't recommend anyone do it, though, as it seems a little bit high-maintenance for an competition like this.


    Edit: looking at that path, I believe it can be done, but it'll be annoying, because you have to work around a number of native runtime support functions that call out to native DLLs. Starting with operator new. Still, it might be an interesting project, especially if you could automate it, to translate well-behaved C++ to C#.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 06-24-2007 9:16 PM In reply to

    Re: Dream Build Play - Engine Question

    jwatte:
    Regarding SpeedTree: I believe you only can use SpeedTree to enter the competition if you have the right to show the SpeedTree code to the Microsoft Judges. I believe you don't have that right; thus, you can't use it to enter the competition.


    We would need to execute a non-disclosure agreement between Microsoft and Interactive Data Visualization.   Is there a contact at Microsoft who can facilitate this? 

    Edit: looking at that path, I believe it can be done, but it'll be annoying, because you have to work arousnd a number of native runtime support functions that call out to native DLLs. Starting with operator new. Still, it might be an interesting project, especially if you could automate it, to translate well-behaved C++ to C#.


    If the purpose of this competition and XNA development is to build compelling games for MS Windows and the XBOX360 platform, it is unclear to me why there is emphasis on use of a particular managed language, as each language has its use.
  • 06-25-2007 12:14 AM In reply to

    Re: Dream Build Play - Engine Question

    First, I don't think Microsoft would sign an NDA for purposes of accepting a submission to this competition.

    Second, I believe the goal of the competition is to showcase XNA GSE. They're going to get a bunch of interesting games to choose from, so whether you apply within the rules, or stay out, probably isn't going to matter too much to them.

    If your game is that good, however, you might want to talk to the XBLA team about publishing there.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
Page 2 of 2 (35 items) < Previous 1 2 Previous Next