Bad performances with intensive text update

0 favourites
  • 5 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • Hello,

    i did a counter for a game (WebGL) and i need to show milliseconds every ticks but it seem there is a huge performance hit when a text object is updated every ticks especially when trying to show fast changing values such as milliseconds in real time, the huge performance hit happen only when showing milliseconds, i bet Construct 2 is doing some king of optimization which prevent the text to be redrawn or something like this so it do not happen with slow changing values.

    The game lose almost half fps on Firefox when doing this, however on Chrome it seem the performance hit is very negligible.

    Example:

    • Create a text object
    • Update it every ticks with "time" value
    • Monitor "cpuutiisation" value with "time" value and with "int(time%60)"

    In my game (on Firefox) the result is:

    • CPU Utilisation-> 0.20 with "time" value
    • CPU Utilisation-> 0.80 with "int(time%60)" value

    Can it be improved or is there a workaround?

  • Can you share a .capx? Sometimes settings in your project you haven't described affect the problem.

  • dl.dropbox.com/u/64479453/timer.capx

    This display a simple timer "min:sec:ms", in Firefox press space to switch the display to "min:sec" and watch out the CPU utilisation between both.

    Made a blank loop as well so the cpu utilisation is an approximation of the cpu use in my game.

    Result here:

    ~0.80 for m:s:ms

    ~0.35 for m:s

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any ideas? Might just be Firefox js performance but it is a bit strange as performances are almost the same as Chrome without intensve text update.

  • Did further tests on an EEEPC, the game is running at 12 fps with a timer milliseconds displayed every frames, without it run at around 28 and it is on Chrome, i don't have anything much going on than just the constant text update...

    Is constant text update really that bad?

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