Experimental cap to C2 converter

This forum is currently in read-only mode.
  • Experimental cap to C2 converter alpha

    It takes a cap file saved in 0.99.96 or later and try's to convert as much as possible to a Construct 2 (build 30) project. There are many differences between Construct 0.x and Construct 2, so only features common to both can be converted. Anything else will just be ignored.

    It's alpha because I haven't tested it with that many cap files, so there is probably many unsupported cases that will cause a crash.

    Objects converted:

    Sprite, Text and Mouse&Keyboard.

    Download:

    http://dl.dropbox.com/u/5426011/utility/capConverterAlpha1.zip

  • B-E-A-U-TIFUL! You're the man and now the always needed

    <img src="http://tvrefill.com/wp-content/uploads/2010/07/awesome.jpg">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I must say, you're quite the Dude, Rojo.

  • Very cool. Rojo is a true asset to the community.

  • Really sorry for reawaking this thread, but I thought it might end up being useful for someone someday to know that this converter doesn't appear to work anymore. Not for me with the free version of C2 anyway.

    Too bad, it sounded great.

  • Hi,

    This worked only with a very early version of c2, and even then it didn't too much other that convert over layouts with sprites, tiledbg and text objects as I recall. It didn't do events, however I was able to convert some of the events in an unreleased version. To get it working with c2 now I'd have to reexamine the capx file format, update my capreader python lib to yield decoded events from cap files more easily, and add a table to help conversions from one event to another.

    The main issue is that c2 doesn't have some features of cc and some things work differently. I was initially waiting for more feature parity to update but I may not since this is something that will take a lot of tedious work for little benefit. However for the most part cc events are like c2 events so it's simple enough to as a user make events like the other.

    I may eventually update the capreader library some more. It provides a way to access the contents of caps which could be useful for making another exporter or IDE for cc. But then again it may be simpler still to start from scratch...

    Anyways to sumerize: an update is unlikely however you can manually convert over most projects.

    -cheers

  • Yeah, anyway I never expected it could ever be possible to just plain convert from CC to C2, so just the fact that you made it possible - for a bit anyway - is already something big.

    As quite a few other people too I think, the way I code my projetcs have evolved over time too, so that would also be a good reason to start from scratch again when creating a game in C2 that I had a previous version made with CC.

    Thanks for the reply anyway.

  • Any chance of a C2 to CC converter?

  • Nesteris

    I've thought about it but it has the same issue as converting from CC to C2. They're much too different so it would require more coding than I have time for.

  • Just gonna throw out that a few of us are still stuck in CC big projects, so anything that can help free things down the road would be appreciated. Even if it is just breaking a cap up into a bunch of images and stuff.

    Granted, I think those of us (... it might just be me and Konjak at this point?) who are stuck this deep probably have the capability to sorta... brutally export stuff in a sloppy manner through construct itself, but just being able to get graphics and layouts into C2 would do wonders for the possibility of porting large-as-fuck projects.

  • kayin

    Looks like I haven't touched this since before C2 had instance variables. I've got a few other projects I need to work but I'll add this one to the list. Layouts with common object types (sprite, tiledbg, text..) along with variables, textures and animations should be doable. Partial support for behaviors could be done for ones with equivalents in both CC and C2. I probably won't have enough time to convert events over, simply because some behave differently in C2 than CC and some even don't have any C2 equivalents. Although adding all the CC events as comments around empty events could prove useful for porting.

    For now you can just export all the graphics from cap files with a tool I made before here:

  • That would be rad. Obviously, Construct Classic, as things get larger, is becoming much more of a horrible monstrosity to work with.

    One things with events that could be useful (but maybe too hard to actually do? I dunno how events look in CC source) is converting code to comments? It would at least streamline the process of trying to go through, rebuilding stuff. All the non event stuff would go a long way though. While transcribing everything over would be tedious, it kinda can't be helped anyways since stuff is going to have to get changed anyways. But still, thousands of tiny tiles. ;_;

  • kayin

    Converting the events over is not so much hard as it is tedious and very time consuming. I wouldn't be concerned with the source code, instead I'd be looking how events are stored in the cap files. I already have that info and can access it with the capreader library I made. The catch is none of the condition or action names are stored, only indexes. Those indexes can be used to get the names from the plugins but I haven't done anything for that yet.

    Once past the technical stuff we then have the events, some of which can be converted over directly. Others have different behavior in c2, and others have no equivalent at all in c2, such as attributes. In those cases it becomes very hard to solve. It would either require generating more events in c2 to get it to do the same thing or write a custom c2 plugin to handle those events. Neither of which sound appealing or easy to do. So instead if we spit out all the events as text in comments it would at least give you an outline where you can insert events and handle different behavior on a case by case basis.

  • Just gonna throw out that a few of us are still stuck in CC big projects, so anything that can help free things down the road would be appreciated. Even if it is just breaking a cap up into a bunch of images and stuff.

    Granted, I think those of us (... it might just be me and Konjak at this point?) who are stuck this deep probably have the capability to sorta... brutally export stuff in a sloppy manner through construct itself, but just being able to get graphics and layouts into C2 would do wonders for the possibility of porting large-as-fuck projects.

    Me and Davio are still stuck with it for towerclimb too

  • Oh hey my friend made me play that at some point and I had no idea it was a CC Game or a Davio game. Was quite fun. But yes, one day we will all be free.

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