Experimental cap to C2 converter

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Fri May 01, 2015 6:25 am

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.
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Fri May 01, 2015 4:56 pm

@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:
viewtopic.php?f=168&t=60472&p=520808&hilit=images#p520808
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Sun May 03, 2015 1:40 am

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. ;_;
Last edited by kayin on Sun May 03, 2015 5:07 am, edited 1 time in total.
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Sun May 03, 2015 4:40 am

@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.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Tue May 05, 2015 6:04 pm

kayin wrote: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 :P
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Wed May 06, 2015 10:05 am

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. :(
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Previous

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests