Suggestion: 'On Layout Load Complete'

0 favourites
  • 14 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hey there,

    Lately I've been working with some layouts that have a relatively large amount of graphics. Using webGL layout loading, each layout takes about a second or so to load up. It's rather jarring to have the game freeze up completely, so I've been trying to think of a way to have some sort of loading screen. I've ran into two problems which (I think) can't be solved in the current state of C2:

    1. There's no way to tell when the layout's been loaded.

    2. There's no way to have a loading screen, as the runtime just goes to 0fps when loading the next layout.

    Am I missing something? Or is this something C2 could use?

  • I think layout-by-layout loading should fix this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Whiteclaws what do you mean? Layout-by-layout already exists, in fact it's the cause of the problem...

  • 'On start of layout' is 'On layout load complete'. Events can't run while it's busy loading, so such an event would be redundant, since the first thing that happens when it's ready is it triggers 'On start of layout'.

    It might be possible to mitigate the problem with asynchronous texture loading, but WebGL doesn't support it yet AFAIK, plus it might be fairly difficult to work in to the engine (currently all existing projects assume no events fire during loading, so we'd have to be careful not to break anything).

    There's the good old-fashioned workaround which people came up with in the Classic days: for one tick before changing layout, quickly bring up a loading screen. Then the previous layout is displaying "loading..." while the next layout loads up.

  • There's the good old-fashioned workaround which people came up with in the Classic days: for one tick before changing layout, quickly bring up a loading screen. Then the previous layout is displaying "loading..." while the next layout loads up.

    This is what I do, works great :)

  • Yeah, I suppose I can do that.

  • I was wondering is it possible to have an animation running while the next layout is being loaded, to get an animated "loading" sprite.

    Also, I'm getting a noticeable delay, especially in cocoonjs, while changing menus within a layout, because the game needs to destroy the previous menu elements and create the submenu elements.

    I tried creating the loading graphic the same way as I did with the pre-layout change loading, but it failed to create the sprite before the menu change.

  • Totally agree with KFC about the animation. This is one of those things that doesn't seem too important but it really is.

  • I would love to be able to set a loader screen for those times when the assets are large and the layout vastly different.

  • An easy way around this would be to have a loading screen layout that just consists of an image (still or animated), and an event On start of layout -> Go to layout (level x). Then, instead of jumping straight into your game level from the start screen or wherever, go to the loading screen layout.

  • GeometriX currently, the game freezes while loading, so I don't see how this would allow an animated image.

  • Exactly, the game doesn't render anything while loading the next layout so GeometriX's suggestion wouldn't accomplish anything, as far as I know.

    We would need to be able to keep the current layout running while loading the next layout, something like turning it into a loader layout.

  • Oh, righto good point. It would definitely work with a static image though, if you just set it to say "loading..." or something.

    Not a solution to your problem, but possibly an acceptable substitute for now, at least. (Most loading screens I've seen are static anyway).

  • GeometriX really? almost 100% of loading screens I know aren't static. It shows the user that the game hasn't crashed and indicates progress.

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