Chad Carter

Chad Carter kewlniss
MVP Logo

Niner since 2012


  • Running PHP on .NET Core with Peachpie

    Having a C# class inherit from a PHP class?  My mind is officially blown.

  • Introducing Microsoft MakeCode for Minecraft

    Just wanted to add that the site specifically says it is available to Homeschoolers. After trying to get Microsoft Support to even understand what a Homeschool was, there was no path forward. I've submitted feedback to the link Seth shared. I'm glad this was made and it will make a big impact on those students who are getting access to it. We just need a way to make it actually available for homeschoolers like the site says it is.

  • C++ and DirectX for Metro Style Games

    Metro doesn't use the .NET Framework.  It uses WinRT. WinRT is native. In managed languages there is a projection which makes the API look correct in managed code. Another projection makes it look right in JavaScript.

    The sample you mention says XNA isn't supported.  It doesn't say C# isn't supported.

    Metro apps can be written with C#/JavaScript/C++ and VB.NET all in the same app.  This is done by creating WinRT components.

    Since C# isn't a scripting language it needs to be compiled before it can run. Folks that have used C# as a scripting language in a C++ game engine have used Code Access Security to keep the script from doing bad things.  However, Metro apps all have to pass certification which means that code must be compiled up front.  So if you are creating C# scripts and can compile those before hand I would think you could make it work in Metro.  But you definitely can't have .cs files on the machine where users could create mods to your game by changing the .cs file and have your game compile them on the fly.

    If you can precompile the scripts then you can actually make your scripts WinRT components.

    There are 4 requirements for WinRT components.

    (Note: These 4 requirements are only needed on the public types and members in your component)

    1. API signatures must use only Windows Runtime types
    2. Structs can only have public data fields
    3. All types must be sealed
    4. Only supports system provided generic types.

    VS has a project you can use to create a WinRT component.

    I'm still getting my head around all things Metro, so take my information with a grain of salt.  Hopefully someone from Microsoft can provide better information.

    Assuming you can precompile your scripts and ship them as precompiled WinRT components you should be fine.  If that doesn't fit with the game you are making, then it may be that you need to stick to a Desktop game.

    It shouldn't take a lot to test this out.

    Good luck!

    Chad Carter