How do I find the code for my Construct game?

0 favourites
  • 3 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I'm more of a C# person (using Windows 10), and I was wondering if there's a way I can access a Construct project's code?

    I've tried opening it in Notepad and Visual Studio Code, but it's coming up with weird, non-English symbols and stuff - I researched and I believe it encrypted or something.

    I'd like to be able to convert the JS code into C# for me to analyse.

    I did try copying the blocks from the Event Sheet and pasting into Notepad, which does appear in JS code, but I don't know how I'd implement that into C#, and create a proper working C# game project, or maybe even using the C# MonoGame template??

    As well as that, I've tried Exporting the project as HTML(5 is it??) but there's quite a few files for me to open, and I can't see where the code for the actual game begins in any of them.

    I know this is a strange query, but I'd appreciate any help or solutions! :)

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'd like to be able to convert the JS code into C# for me to analyse.

    This is a bad idea. Compiled code will be very different from the original project code (events), and will be heavily obfuscated. You will not be able to make any sense of it.

    And Construct visual programming language is pretty unique, it won't translate into any traditional programming language.

    Your C# experience will definitely come handy, but don't waste your time trying to convert C3 code into C#. Just study a few tutorials and examples and try to create a simple game.

  • The c3p file is just a zip file with all the games source as jsons of the events and such.

    The exported project packs all the game into a data json, and the runtime and plugins are minified together.

    Most porting services go the route of generating code from the source, but I think at least one just makes their own runtime which uses the same exported data json. But even if they have tools that automate most of it I think they deal with things case by case since construct is heavily tied to html5 tech.

    In short there is nothing readable that will show how events equate to JavaScript. You’re better off just writing equivalent code from reading the events manually.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)