Framerate problem (SOLVED)

Hello,

I am currently evaluating Defold for developping a game. For now my project is really small and I basically copy/pasted the follow_script example on the website.

My problem is that the animations are displayed way too fast.

With “vsync on” and “frame cap = 0” in game.project, I get less worse results but it is still not satisfying.

Here is my go.animate call:

go.animate(".", “position”, go.PLAYBACK_ONCE_FORWARD, pos, go.EASING_LINEAR, 30, 0, landed)

In the tutorial, the duration value is set at 0.5. I had to input a value of 30 to avoid a teleport and actually see a real animation similar to the tutorial’s one.

But worse, I have a looping animation on the sprite itself taking 6 frames. I set the fps at 1. The animation plays so fast that it’s like flickering or flashing. And whatever the settings I tried (vsync on/of - various frame caps), the result is always the same.

Can you please help me to fix this?

Happy to help, but please first share your system spec. Windows, Linux, macOs? Which version? What kind of display do you have connected? What kind of graphics card+driver?

I appreciate your answer. Here are some more details.

CPU: i7-7700K @ 4.20Ghz
RAM: 16 Gb
OS: Win10 Home version 1903 build 18362.900
GPU: Nvidia geforce GTX 1080 (latest drivers)
Monitor asus MG248 at 60hz.

Found it!

Nvidia settings -> Manage 3D settings (sic!) -> Vertical sync -> “On”

We have decided to do a re-take on this whole thing with vsync etc and see what we can do to provide a fool-proof solution to this.

3 Likes

As I start to work with Defold, I think the manual is not enough. Every beginner could take advantage of a “Defold Best Practices” document. I indeed feel that I have to solve problems that others ran into, and I am wasting a lot of time doing so. The vsync issue could have been mentioned in such a document.

What I love in defold is the simple unzip-install, the message based protocol, the graphical interface, and the amazing one-button-export to whatever! And all for free!

1 Like