Bug Issue: Periodic Lag Spike on Windows (Most Likely Caused by Rendering)


Pages: 1

Akemi

  • Junior Stencyler
January 27, 2020, 10:55:19 am
  When testing a compiled game on Windows,  if any motion occurs for an extended period of time, the game will drop from 60 fps to anywhere between 10 and 30 fps for a bit less than a  second, causing a huge stutter. This generally occurs when the fps monitor has almost drawn a line all the way across itself. Motion (so far, in my tests) counts as anything between a physicsless actor with an eight-way movement behaviour being moved around, an actor with basic platformer physics (can collide with tiles, and affected by gravity) being moved by a very simple "left as number - right as number" movement code, or even a physicsless actor being spun. Strangely enough, an animation does not seem to affect the framerate in any way. This only seems to occur on Windows, though I have not tested mobile platforms, or Mac.

  I believe that this is an issue with the renderer, as during an hxscout session, OpenFL's "Context3D" renderer always seemed to have the highest count. I could be wrong, however, which I'm willing to believe. I highly doubt that it's my programming at fault, as I've run into the issue with a very simple motion behaviour as the only code in the game, and it still remains a problem, even if the only thing in the game is a rotating actor with an event to tell it to spin when it is created.

  This occurs on the latest public build, as well as the latest private build (b10495).
« Last Edit: January 27, 2020, 10:57:02 am by Akemi »


Akemi

  • Junior Stencyler
January 31, 2020, 12:10:48 pm
  I've now tested this on fresh installs of b10468 (latest public build). In both the 64-bit and the 32-bit versions, the results are the same.

  (Removing the 3.5 tag, since I don't think that 3.5 is the same thing as 4.0.2.)
  • Version changed from Stencyl 3.5 to (none)
« Last Edit: January 31, 2020, 12:12:06 pm by Akemi »


Akemi

  • Junior Stencyler
February 10, 2020, 05:30:00 pm
  A workaround for this, though slightly hacky, is running  "openfl.system.System.gc();" every second. This seems to bring the game down to 59 fps, but the spike doesn't occur, so it's a tradeoff.


Issue updated by Justin - Yesterday at 01:18:26 am
  • Tags added: performance


Pages: 1

Details

  • Reported
    January 27, 2020, 10:55:19 am
  • Updated
    Yesterday at 01:18:26 am

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine

Tags