Revert to older Defold version? (SOLVED)

#1

After updating this morning, two issues were added to all of my projects:

(1) Using Monarch, I preload each screen before showing them in order to avoid the black 1-frame flicker when transitioning between screens. This no longer works. Perhaps it has something to do with the collection proxy note in the latest release notes.

(2) I’m getting a 1- or 2-frame lag every 2/3 second or so. This didn’t happen before. Simply executing a go.animate or manually moving an object linearly displays this issue pretty clearly.

Is there a simple way to revert to an older version of the engine after hitting the “Update” button in the editor? I’m running the latest 1.2.169.

0 Likes

#2

Try: https://defold.com/manuals/install/#install-an-old-version

1 Like

#3

Thanks, hopefully I’m not the only one with these problems.

0 Likes

#4

Are you using the master version of Monarch or a specific version?

0 Likes

#5

I use the master branch of Monarch.

0 Likes

#6

There was just an update, you may want to try an older version of it as well

Try this one https://github.com/britzl/monarch/archive/3.1.0.zip

0 Likes

#7

Yeah, I saw that update. Looks useful, but I already implemented those features in my own wrapper module. I’ll revert back on that as well.

0 Likes

#8

It looks like the Monarch issue was indeed caused by the latest Defold engine update, however the periodic lag spike was actually caused by unchecking the “v-sync” box and setting FPS limit to 60. This is something that has confused me for a long time, and I continue to get differing answers on it: in what situations would I use v-sync over FPS clamping and vice versa?

0 Likes

#9

I’d like to help you fix this. I’m sure it can be solved in Monarch. Can you share a small example where this can be seen.

This was unexpected. Can you share a repro of this?

0 Likes

#10

This was unexpected. Can you share a repro of this?

This problem was solved by moving to v-sync instead of clamping FPS at 60. I wonder if the stutter behavior would carry from one person to another?

I’d like to help you fix this. I’m sure it can be solved in Monarch. Can you share a small example where this can be seen.

I will try to whip up an example of this using the latest Defold and Monarch versions.

2 Likes

#11

@britzl It has been a while! I completed a super simple example project for showcasing that 1-frame black flicker I get with transitioning between Monarch screens, as described in the first post in this thread.

Here’s a link to the Git repository: https://github.com/gymratgames/monarch-example

Left clicking anywhere on the window will load the next screen using monarch.show(), while right clicking will load the next screen using monarch.preload() then monarch.show(). Preloading lessens the black flicker, however still occurs.

Let me know if I messed something up or if I just don’t understand something. This is a problem I’ve been ignoring a while, but it’s about time for me to address it. Thanks!

0 Likes

#12

The standard flow of a Monarch screen transition from A to B is that two flows of execution start at the same time (two coroutines): one to hide A and one to show B.

HIDE A

  • Notify transition listeners that A is about to be hidden
  • Release input focus on A
  • Notify focus listeners that A lost focus
  • Start ShowOut (ie hide) transition on A
  • Unload A
  • Notify transition listeners that A has been hidden

The above happens as fast as possible. The only delay you have is the time it takes to transition the screen. In your case there is no transition so it will all happen in a single frame.

SHOW B

  • Notify transition listeners that B is about to shown
  • Load B
  • Start ShowIn (ie show) transition on B
  • Acquire input focus on B
  • Notify focus listeners that B gained focus
  • Notify transition listeners that B has been shown

The above also happens as fast as possible. BUT there is a problem here and that is that it takes at least one frame to load and enable the proxy for B.

In your case this means that A is unloaded in a single frame but B is not loaded and visible until one frame later. So for at least one frame there is no screen visible at all, and that is why it flickers.

The solution? Either add a transition/delay on A or preload B. If B is preloaded there is no delay in showing B. You can preload a screen by checking the Preload checkbox on the screen script. Keep in mind though that the resources for B will be kept in memory at all times with this solution.

2 Likes

Monarch, Rendercam, and GUI Problems
#13

Thanks for your help. Really appreciate it!

0 Likes