Custom loaders and nw.js

  • Right. I'm aware that I can't use a custom loader layout for a game that gets exported as a nw.js app (I discovered this after spending ages making a nice one, grrr). The exported nw.js app shows the default C2 loading bar for several seconds instead, THEN goes to the custom screen for a split second, and then loads the game proper.

    I'm aware that I can change the image and the loading bar colour on the C2 loading screen, but is that really all I can do? Are there any more options for nw.js games? I'd really like a nice, classy loading screen for my game, and it seems like I'm just stuck with variations on the Construct 2 defaults. Am I missing something?

    Seriously, what can I change? If I set the loader to display percentage only... can I do any CSS stuff to change the look of that text? ANY ideas for ways I can customise my loader would be really helpful, thank you :)

  • Loader layouts are just for preloading assets, and the preloader(the one with the bar), is for associated script loading. Since its all available to load locally you won't see them much anyway.

    I would suggest making a switching layout where you display the custom loader, and then go to whatever the target layout is. Just save the number of the target layout in a global, and use it in the switcher.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Loader layouts are just for preloading assets, and the preloader(the one with the bar), is for associated script loading. Since its all available to load locally you won't see them much anyway.

    Thanks for the reply! Ah, but with even a medium-sized C2 game you do end up seeing the default loader for several seconds as I described. I'm not looking for a way to load between layouts - I want to beautify that initial load. Any ideas?

  • About all you can do to the preloader is change the background via a few changes to the exported index.html.

    There are a few threads on the forum on doing that.

    preloader background site:scirra.com

    Or do a bit of condensing of events, as thats the most likely reason for a long load time for the preloader.

  • Yes, I've been fiddling about with c2runtime.js to see what custom effects I can do all evening... I've figured out how to customise or remove the loader bar, change the display size and font of the percentage text (although I haven't figured out how to use a unique, non-web-safe font), and implement a custom (static) splash screen...

    Anybody know how to do anything even better?!

    EDIT: I got all excited for a minute when I thought I might be able to replace the C2 loader logo with an animated GIF! I replaced it, but the gif doesn't animate. Poooo. Anyone know why??

  • If you have a loader layout, you can just turn off the default loader.

  • Actually no - if I set the loader to Nothing, my exported nw.js app sits on a black screen for several seconds, then shows the custom loader for a split second, and then loads the game :(

    EDIT: This would make me think that the loader layout might be too big, but I designed it to be as small and efficient as possible - it contains 9 events and less than 16kb of image data. So... why doesn't it show up properly?

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