No announcement yet.

Popular TypeScript Game Engine Phaser is already integrated in VS2013

  • Filter
  • Time
  • Show
Clear All
new posts

  • Popular TypeScript Game Engine Phaser is already integrated in VS2013

    (TypeScript noob here)

    Phaser is a JavaScript game engine which provides TypeScript reference files.

    Is there a way to automatically generate the C# class, annotated with ObjectLiteral, to be used in t=Script.Call<T> ?
    I mean, leveraging the provided TypeScript reference files.

    Note about the title of this post:
    The title of the post is not clear. By "TypeScript game engine" I meant that one can use it easily with TypeScript in Visual Studio.
    By "integrated" I meant that there is a Visual Studio extension but it does not help very much with the setup.
    However, it is easy to setup manually the game engine in Visual Studio 2015 and 2013.
    Last edited by gavi; 2015-08-30 @ 10:07 PM.

  • #2
    Hello gavi! Welcome to Bridge.NET forums!

    So, we're talking about a JavaScript game engine that already has TypeScript binding/definition files and can be fully explored on Visual Studio?

    For Bridge, we would need to build the framework support, stubbing out all the library's classes/methods. Much like the TypeScript definition file was probably once written.

    We are working on a useful guide on building a framework support for any library. Like a kick-starter to implementing support to any (including your own) JavaScript library. We also are writing library support for popular libraries as much as we can.


    • #3
      There is a good chance we will be able to automatically create the C# binding files for Bridge, by parsing the .d.ts files for the library. This functionality should be available soon. Just a little more testing to complete.

      Would be interesting to use this library as a trial run.


      • #4
        Thank you.
        I am glad to hear that you are working on a guide and also on some automatic binding from .d.ts to C# to link many libraries to C#.

        My understanding is that Phaser is the most popular 2D/3D game engine that binds well with TypeScript. The developer is very determined to providing .d.ts files also for future version of the game engine.

        I tested it in VS2015 with Apache Cordova and the initial tests shows that it is compatible, so one could create either Web Games, or native Apps with the same Bridge.Net C# code.
        Being able to use C# to create such Web and native iOS/Android mini games, might make Bridge.Net useful to C# indie game developers.

        the TypeScript files are in the TypeScript folder.
        the HTML needs a reference to phaser.js which is located in the build folder.


        • #5
          I am glad to hear that you are working on a guide
          I've seen a draft of that guide fabricio.murta is working on. It looks cool! I really hope it will be published as soon as possible and you'll be able to start working on Phaser.


          • #6
            Has this feature been launched yet? All my searching are bringing me to this and one other thread about this feature being requested.


            • #7
              Another related discussion to the TypeScript -> C# generator:



              • #8
                The Knowledge Base Building A Definition Library article has been published. If you look for implementing Bridge support for 3rd party JavaScript framework (Phaser in this case), reading this article is a nice start point.
                Last edited by Daniil; 2015-11-20 @ 05:50 AM.


                • #9
                  We have created Retyped to parse TypeScript .d.ts files and create a C# binding library for Bridge projects.

                  Currently, Phaser is not supported, but if you open an Issue, we'll try our best to add Phaser support to Retyped.