Long Compile/Preview Time

New releases and general discussions.

Post » Tue Oct 22, 2013 4:04 pm

You are correct, I recall Ashley stating that an include in CC just pastes a copy of the events when compiling, meaning it compiles multiple copies of the included event sheet. I don't have any other ideas how to improve things, though.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Tue Oct 22, 2013 4:09 pm

@robit_studios

Hmm, the game shouldn't be compiling after it's exported though, does it take a while to open the exported EXE too then?

Also, I don't believe there is a way to load event sheets sadly, but you could use Python scripts to do things (this is going to sacrifice in-game performance vs. the startup performance though).

The level editor seems the best way to go, as you could use one layout to load all the objects. If you'd like to see a way of loading all objects (and even graphics) from files you can grab the engine source to my Alpha version of I Had Hope (extra plugins needed are also on the download page): http://ihadhope.blogspot.ca/p/download.html

As an extra option, you could make a mini "loading game/exe" that runs and when the other game opens you can close the loading game (I know of opening files from CC, not sure how to handle the closing though).

Hope that helps!
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Oct 22, 2013 4:41 pm

I don't know what's happening as the EXE loads, but, not only is the export time significantly reduced, but the EXE load time goes from about 53 seconds to 3 seconds.

Also the EXE file size went from 88MB to 38MB.

Again, I did not remove any anything. I simply pointed all the layouts to a blank event sheet.

I really wish I could find a solution for this - it seems too simple.


@JayJay thanks for the link to your level editor - i'll check it out.

@Arima I didn't know that was what was happening until today. It seems like a fairly inefficient way to do things. I guess that's why they started over with C2. robit_studios2013-10-22 16:44:22
B
20
S
5
G
3
Posts: 65
Reputation: 3,764

Post » Tue Oct 22, 2013 5:05 pm

It's an architectural flaw in Classic. Including an event sheet literally means "copy and paste the entire event sheet's events here". So if you have 100 levels each including a common sheet, the common sheet is exported 100 times in duplicate. So if the common sheet has 500 events, in this case it exports (and generates on every preview) 50,000 events.

There is no chance of this being fixed in Classic, but it's fixed in C2, where we have a proper include system where an include references the same sheet rather than duplicating it. This keeps previews, exports and load times fast.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Oct 22, 2013 5:24 pm

@Ashley Thanks for taking the time to respond, even though it's disappointing to hear. I'm a big fan of C2 - I've been a supporter from early on but it was still too fresh in development when I started my game a year and a half ago. Switching over now would be difficult to justify.

Do you think there's any way, using Python, to get a layout to choose which sheet it's referencing at runtime? If it's an architectural flaw, there's probably not, though.

Looks like my best solution will be a level editor and just have one layout that runs everything - it's a lot of work, but it'd still be a lot easier than porting everything to C2.
B
20
S
5
G
3
Posts: 65
Reputation: 3,764

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests