Bundle Windows App has bad performance and FPS drops

Hi there!

I have noticed some strange behaviour. When I run my project from the editor, the project runs fine.

When I bundle my project and run with the “full screen” option, I get decent performance. Alas, when I run it in windowed mode, performance degrades a lot, the animation becomes jittery and the game stutters.

Same thing happens with the simple project I built from tutorial.

Is anyone else experiencing similar issues?

(My game is aimed at Windows/Linux/Mac, and a working windowed mode would be kind of important to me)

Edit:
I am experiencing this issue too with the vanilla Platformer tutorial, on Windows 7 and Linux

Thank you for reporting this. We have a lot of the team away at GDC next week but I’ll try to look into it and see if I can reproduce this.

Great, thanks! Let me know if there is anything else I can do to help you root this out.

Update: When defold updated itself to Version 1.2.76, this issue stopped happening to me on OSX. It remains on Windows 7 and linux.

Have you checked variable_dt in game.project?

Yup. Both with and without.

Strange. I will let @Andreas_Tadic and @sven answer this one.

Hi,

  1. Can you ensure you have vsync enabled in your drivers control panel? The use of swap interval may be overridden by external, driver-specific configuration. This might cause the symptoms you describe, considering it’s only happening in windowed (desktop) mode were vsync is handled differently.

  2. Could you please provide a web profiler capture from windowed mode? See the “Web profiler” section at http://www.defold.com/manuals/debugging/ on how to do this.

Hi Andreas,

  1. I got vsync enabled.
    Now that you say it, it might be an issue with my graphics driver. I tried another game (Super Meat Boy) in windowed mode and it runs fine, but a single case might no be significant.

  2. I couldn’t connect from either Mozilla or Chrome to the localhost address. But it looks like an issue in my environment, I’ll give it a try again in a while.

As for #2: You can’t run the webprofiler when in release mode. This means that you can’t use the web profiler in a desktop build created using Project->Bundle->Windows App since they are currently always release builds. You have to run from within Defold to use the web profiler (or a non-release bundled mobile app). It’s possible to bundle a debug build for desktop, but that has to be done from the command line.

@britzl, thanks for the heads up. I’ll try to make a build from the command line. That’s bob, right?

@Andreas_Tadic To clarify what I said in the topic, this issue doesn’t happen to me when I start it from defold editor in windowed mode. Only for a release, started by double clicking the built .exe.

Yes, you have to use bob.jar to bundle from the command line. It should be as easy as:

java -jar bob.jar build
java -jar bob.jar -platform x86-win32 -debug bundle

1 Like

So, I tried building with bob, and running a debug build. Still got the frame drops. From the looks of the web profiler, more time was spent on Physics.StepSimulation and less in GameEngine.Frame, when comparing windows to Mac.

However, I updated to 1.77, and the issue is no longer present. Go figure.

1 Like

im experiencing jittering on windows build too (in windowed mode) game built in editor has no performance issues.