go to layout and restart layout

0 favourites
  • 6 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hello. I need guidance :)

    Here is the problem. Whenever I use System-go to layout or System-restart layout my experiment gets terribly slow and instantly unusable.

    Gaming - experiment - If actor dies and I just want to restart scene I use system restart layout. Is this the right approach because in my case I cannot use it. If I go from game scene to main menu it is soo slow as if 2 instances were running in the background (for example). God forbid if I return from main menu to game scene...

    Its a rookie one:)

    byebye

    mox

    p.s. another example: if I start game scene from C2 it works beautifully, but from main menu - on sprite click go to layout it is terribly laggy and some more intensive AI functions do not even execute ...

  • Think it would be easier to help you if you could post the code.

  • As above ^^ It's a hard one to visualize without the code.

    Are there any variables or arrays that you forgot to reset at the start of the layout?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you have an logic keying off of global variable or arrays as stated, these need to be dealt with before the restart. Especially if your on start of layout does anything with them..

  • Thx people! I know this was a broad question and cannot be commented further upon without code. I was just wondering if it is the correct approach. Thx and will try to find my runaway code :)

    byebye

  • ok people.

    By bugtracking and selectively disabling sections of code found the problem. At start of layout I randomly created lots of objects (instances) , some with further pathfinding logic... When layout restarts I assumed layout code simply restarted ("with cleanup") but that doesnt seem to be the case. I added at the end of event sheet: destroy all objects and voila: FPS nicely at 55 to 60 on every restart (actually I use go to layout).

    Thx people!

    btw: what is the difference between: layout1: go to layout 1 or layout1: restart layout. ?

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