Worried about increasing preview times.

Discussion and feedback on Construct 2

Post » Mon Jun 08, 2015 11:25 pm

It's kinda been discussed before but is there anything I can do to decrease the time it takes to preview my game? The larger it gets, the longer it takes to preview. An older project of mine used Tiled and sprite objects acting as tiles, and my preview times took over 10 seconds despite everything being on a very fast SSD. I'm just worried the same thing is gonna happen with our current game farther down the road even though we're using the tilemap object now. Testing small tweaks and such is already annoying with ~4 second preview times.

At least it's not as bad a GM or Stencyl - those can take upwards of 30 seconds to preview! However, MMF2.5's preview is practically instant even on giant levels with lots and lots of objects.
Last edited by Tokinsom on Tue Jun 09, 2015 9:45 pm, edited 3 times in total.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Jun 09, 2015 12:05 am

I thought it was entirely CPU-dependent and had very little to do with hdd speed. I believe disabling audio pre-loading may make a difference if you have a lot of audio in the game yet.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Tue Jun 09, 2015 12:20 am

Hm. Disabling audio pre-loading and even deleting all audio files doesn't make any difference here. Previewing with NW.js btw.

My CPU is a 2.5GHz Intel Core i7 4710HQ. The game I referred to with the 10+ second preview times was on my desktop with a 3.5ghz i5 2500k . Both have preeeeeetty fast SSD's so...eh.
Last edited by Tokinsom on Tue Jun 09, 2015 2:54 am, edited 3 times in total.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Jun 09, 2015 12:22 am

My game takes about 45 seconds to preview to node-webkit. I have a standard HDD and a i5-3550 at 3.30ghz. I have no audio at all yet, but I do have a bunch of animation frames. I haven't even added everything I want yet.

I'm probably going to make a watered-down version with minimal animation frames to create some code or make small changes and then just copy and paste it over to the full project.
B
75
S
30
G
35
Posts: 340
Reputation: 22,896

Post » Tue Jun 09, 2015 12:24 am

DrewMelton wrote:My game takes about 45 seconds to preview to node-webkit.

That's insane.

@Ashley Please tell me there's something we can do about this...
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Jun 09, 2015 2:18 am

Preload audio does make a huge difference previewing on android if you have more than a couple short sfx, due to chrome's sluggish audio decoding. Firefox for android is quicker, though audio heavy games still take way too long if you preload everything.

My current project is mobile orientated; on my desktop it loads in about 5 seconds from when I hit preview, and when the game is playable. That's with audio preload on.

I assume previewing creates temp files on the disk, so I imagine ssd vs hdd could make a big difference.
Last edited by TiAm on Tue Jun 09, 2015 6:30 pm, edited 1 time in total.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jun 09, 2015 2:48 am

Well sprite frames/images are the main culprit so maybe something can be done to better optimize them for previewing..?

*crosses fingers for live-editing in C3*
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Jun 09, 2015 6:44 am

I believe cache is off in preview as it caused a number of issues awhile back. Either ashley fixed that issue cause I haven't noticed any lingering sprites etc. Or it is still switched off. This means you are downloading game fresh each time. Yes, you aren't downloading, but you are moving files to temp etc etc etc.

I don't know the process, but I think node preview might have to build the game each time during preview.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Tue Jun 09, 2015 10:54 am

Is the long preview time specific to NW.js? If it's a lot quicker in the Chrome browser then perhaps there is something specific to the NW.js preview mode that needs speeding up. If Chrome is the same speed then I guess we need general improvements, but these might need architectural changes to implement, which would mean leaving it till C3.

I'm also not quite clear where it is taking a long time. There are two phases to previewing a project:
1) generating the preview - the C2 editor indicates what it's doing in the status bar, and if it takes a long time, a progress bar appears in the C2 editor window
2) loading the preview in the browser - currently running a new preview reloads the page so everything is thrown away and then the game is "downloaded" (copied or decoded directly from RAM or local files) in to the browser in preview mode. If this takes a long time then it shows a progress bar in the browser (or NW.js window).

If you can indicate which area is taking up the time then I could consider what kind of improvements need to be made.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Tue Jun 09, 2015 4:12 pm

@Ashley The initial preview on NW.js appears to take ~1 second longer than Chrome. Subsequent previews (reloading the existing preview) take the same time.

Generating the preview is fairly quick; 2.5 seconds and the game window is there.
Loading the preview (with percentage or progress bar in the game window) is what takes the longest, at about 4.5 seconds.

So all in all it takes about 7 seconds for a fresh preview.

Approx. download = 17.7mb | Memory use = 7.2mb

C3 will probably be out by the time this becomes a real problem (for my team, at least) but if it's not too much trouble I think any preview optimizations will be appreciated!
Last edited by Tokinsom on Tue Jun 09, 2015 6:26 pm, edited 2 times in total.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Artpunk and 7 guests