Feature suggestion: Merge projects

Discussion and feedback on Construct 2

Post » Wed Jun 12, 2013 3:01 am

@bsimser I believe a 3rd party merge utility would certainly be appreciated.
B
37
S
9
G
5
Posts: 437
Reputation: 6,094

Post » Wed Jun 12, 2013 5:03 am

[QUOTE=czar] @bsimser I believe a 3rd party merge utility would certainly be appreciated. [/QUOTE]

I have some spare cycles as I'm trying to put together some games (and trying to get things in for the Windows 8 competition).

I built a quick and dirty reader for the .uistate and the c2project xml file (.caproj) and can merge basic objects right now (sprites with animations, mouse, platform). For an hour or so of work it's crude but works. I think I would need to build my own classes for each plugin and behavior type.

I'll plug away on this for a couple of days and put the code up on github and we'll see where it goes from there.

Thanks for the inspiration!
B
17
S
5
G
2
Posts: 39
Reputation: 1,846

Post » Wed Jun 12, 2013 8:40 am

That's very cool of you.
B
45
S
11
G
4
Posts: 517
Reputation: 7,393

Post » Wed Jun 12, 2013 12:51 pm

I would point out it should not be necessary to merge projects if you work with source control tools like SVN. These are free, professional grade tools that merge as you work, as well as providing a host of really unmissable features (rollback, revision logs, diffs etc.) You really shouldn't be working on two separate .capx files and then try to merge them later; source control is vastly superior and the feature set enormously better than anything we're likely to ever add to Construct 2 itself.
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,506

Post » Wed Jun 12, 2013 10:38 pm

While Source Control is good for large projects and multiple people working on one, I think the flexibility you would get with a Modular Object+EventSheet export/import function would be far more useful in creating behavior example/templates.

I see it essentially being a mini-capx that is limited and can't be opened without the import command.

edit: typos oh godThndr2013-06-14 20:50:13
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Fri Jun 14, 2013 1:07 pm

Like @Thundr said SVN is fine but it's a lot of merging and manual effort to do something like bring in elements from one project to another.

I think I get what the intent is here and it's not about project file merging it's really "there's a sprite and a background and a layout I want from project1 that I want to use in project2" and how do I get it?

Will post code shortly that will do this for you.

Thanks.
B
17
S
5
G
2
Posts: 39
Reputation: 1,846

Post » Thu Jun 20, 2013 8:36 am

@bsimser +1

I have had a few situations where I wanted to combine layouts and events. SVN wouldn't be ideal for those situations. And manually copy pasting has to date been frustrating to say the least.
B
37
S
9
G
5
Posts: 437
Reputation: 6,094

Post » Thu Jun 20, 2013 2:02 pm

Agreed. The other problem with SVN merge is that it's not smart. If you copy a layout it doesn't know to copy the event sheet that's associated with it. Or a sprite with the animations. It only operates at a file level generally.

Just a quick update I'll post my first cut of the tool on github this weekend (RealLife 1.0 has got in the way this week).

Thanks.
B
17
S
5
G
2
Posts: 39
Reputation: 1,846

Post » Thu Jun 20, 2013 5:31 pm

I wasn't aware of the fact that caproj files were just xml. Thanks to this info I can now copy sprites from one file to another. :)

@bsimser
such a tool would be appreciated indeed.
B
12
S
3
G
2
Posts: 7
Reputation: 2,354

Post » Mon Jun 24, 2013 1:22 pm

Hi guys,

Just a note that I haven't posted the code yet. I live in a town named High River in Alberta, Canada and the town was flooded out last Friday. We're doing fine but living in our trailer right now as the own is on military lockdown and I have limited access to internet.

Thanks
B
17
S
5
G
2
Posts: 39
Reputation: 1,846

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 23 guests