Worried about increasing preview times.

0 favourites
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • 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.

  • 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.

  • 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.

  • 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.

  • 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...

  • 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.

  • 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*

  • 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.

  • 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.

  • 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!

  • Ashley

    I ran some tests with a stopwatch.


    (I start the timer when I hit the preview button in C2 and stop it when I see the game running).

    NW.js - 10.5 - took about 4 to 5 seconds to see the loading bar and another 40 seconds of loading. Total ~ 45 seconds

    Firefox - most of the time did not even show a loading bar and sometimes brought up a script dialog box. Overall times were around 21 to 35 seconds depending on what it was in the mood for. Total ~ 21 to 35 seconds

    Chrome - slightly faster than NW at about 3 to 4 seconds to bring up the load bar, and maybe 30 seconds to load. Total ~ 34 seconds

    Note: I usually close the game before running a new preview, because it only saved a couple seconds leaving it running.


    NW.js - 10.5 very smooth 60fps and very low cpu usage around 2%

    Firefox very unpredictable loading, but fine afterwords, pretty smooth 60fps and slightly higher cpu usage around 11%

    Chrome smooth at windowed size, but garbage fps when maximized, cpu usage around 6%

    Project details:

    Game type: Isometric with pre-rendered 3d animations. Uses pathfinding and mouse click movement (like Age of Empires or Baldur's Gate)

    Stats: (shown either at status bar at bottom of project or in-game)

    approx download: 26.8

    memory use 146 (around 113 in game)

    events: 908

    object count (in game): 196

    very minimal particle effects

    very minimal webgl effects

    Note: I have not yet created any audio for this game yet. It does feature quite a few detailed animations being that it is isometric and needs to have different directions animated. The levels are very small, and there will only be 2 or 4 characters on screen at most.

    My PC:


    gtx 680 superclocked

    16gb ram

    standard 7200rpm hdd

    win 7 pro

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • DrewMelton

    You really, really, really need an ssd.

    With a system that powerful I'd be surprised if that wasn't your bottleneck.

  • DrewMelton

    You really, really, really need an ssd.

    With a system that powerful I'd be surprised if that wasn't your bottleneck.

    Yeah, it's been on my list of things to get. I just haven't gotten around to it. If everyone here thinks it will speed up times considerably enough to warrant the price and effort, then I'll make it my next purchase.

    If it's just 5 seconds or so saved, then it may not be worth it. I have a ton of stuff installed on this computer, so if I have to reinstall the full OS just to make use of it, I may not feel like doing it unless it's really worth it.

  • DrewMelton

    Know anybody with a similar pc who has an ssd? Could always do a test run first.

    I know what you mean about OS migration though...I had to do that about a year ago, and I'm just getting to where everything is configured right again...

    If you do get one, btw, I'd recommend one with power loss protection. A spendy option is an intel 730; a more reasonable one is a Crucial MX100, which is what I have.

  • I can vouch for SSD. I got one a few months ago. No jokes 10 times performance increase. Photoshop loads in a second. PC boots in under 3 seconds. Haven't had a single software crash of any kind.

    When they say its the single best upgrade you can do for your pc, it is the truth. I am just sorry I didn't do it ages ago

    Got the samsung with 10 year warrenty. And samsung magician keeps this drive purring.

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