Code

This forum is currently in read-only mode.
From the Asset Store
5 levels with simple coding Source-code (.c3p) + HTML5 Exported
  • Hey! I have a question. Is there any way I can compile .cap file into a c++ code? Waiting for answers.

  • Hey! I have a question. Is there any way I can compile .cap file into a c++ code? Waiting for answers.

    If you download the source code for Construct, and look at the code that is generated for each condition and action you use (along with the objects in the layout editor), you should be able to piece together the pure C++ code.

    That said, it's a lot of work, and probably will be less optimised than the exported exe from Construct itself

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey! I have a question. Is there any way I can compile .cap file into a c++ code? Waiting for answers.

    Nope

  • If you download the source code for Construct, and look at the code that is generated for each condition and action you use (along with the objects in the layout editor)

    Wait... that can be done? I wasn't aware of that. Could you show us how?

  • > If you download the source code for Construct, and look at the code that is generated for each condition and action you use (along with the objects in the layout editor)

    >

    Wait... that can be done? I wasn't aware of that. Could you show us how?

    I haven't grabbed a copy of the source yet, but I think it can be done, yeah.

    Since the whole thing is open source, you just find the code used during compiling of a cap to exe, and stitch it together manually (then fill in the data your cap tells it to). Unfortunately this would require replacing of the parameters and values of each subroutine with the hardcoded information you store in the cap file itself.

    In effect, you have to run the code "inside your head" to find what executes when in the final program, and then you write the code just for your game. It's alot of effort, but maybe a program can interpret Construct conditions/actions and generate the C++ automatically someday.

    If I get time to toy around with the source, I'll try and see if it's possible, but that probably won't be until late August though I think

  • Oh, I see. I thought you meant there was a way to somehow directly expose the code running the events. It would've been a cool way to see what makes our event codes tick.

    The Express Game Maker exposes the C# code for xna inside of another program window while you're creating. I always thought that was cool to see how what you're doing with the events and stuff playing out in C#.

  • Oh, I see. I thought you meant there was a way to somehow directly expose the code running the events. It would've been a cool way to see what makes our event codes tick.

    The Express Game Maker exposes the C# code for xna inside of another program window while you're creating. I always thought that was cool to see how what you're doing with the events and stuff playing out in C#.

    Ah yeah, that would be cool. Thanks for telling me about that program though, it looks pretty cool

  • it would probably take less effort to write the code in c++ then to trace back all everything through construct source and stitch it together that way.

  • Since the whole thing is open source, you just find the code used during compiling of a cap to exe, and stitch it together manually

    Even though construct is labeled open source i have found there is actually quite a few official plugins and behaviors that have code which is not available.

    That is just official things and there is then 3rd party plugins which are closed source so you would also have to make your own versions of those plugins or avoid the use of any plugins other than the ones available the SVN.

    Technically it is possible though but as lucid says it would probably just be better to write new code. I am guessing some people making games will use programs like construct to make quick prototypes for games before coding them.

  • Even though construct is labeled open source i have found there is actually quite a few official plugins and behaviors that have code which is not available.

    That is just official things and there is then 3rd party plugins which are closed source so you would also have to make your own versions of those plugins or avoid the use of any plugins other than the ones available the SVN.

    Technically it is possible though but as lucid says it would probably just be better to write new code. I am guessing some people making games will use programs like construct to make quick prototypes for games before coding them.

    Yeah, it's not really a good solution at all. That said, if someone really needed to try and convert their game into C++, I think this would be the only way to do it at the moment.

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