NoticEmpire's Recent Forum Activity

  • Beyondgodd I am also having this issue. In addition, manually setting an object cost doesn't appear to work either. Having tilemap duplicates and manually setting tiles to ones that aren't walkable or have different preset costs is a functional workaround afaik, but it's really unfortunate that a plugin this well known has such basic issues.

    Could anyone using the C3 version report if that's the case still?

  • Does anyone know how to only paste the visible portion of a sprite using paster? For example, if half is obscured by a sprite with a higher z index I only want to paste the portion visible.

    Tagged:

  • Now that I have fixed the issue I'll just explain what I think happened in case some random person down the line is still using this old and deprecated engine and magically ends up doing the same thing I did.

    There were three causes to an increase in CPU usage over time, all of which were unrelated to increasing object counts, array size, text size, larger loops, etc.

    1. Looping audio will cause an increase in CPU usage over time if there has previously been a non-looping audio played on that tag. This can be fixed by unloading the audio file for the non-looping audio.

    This will be put under the "Engine" category in the debugger.

    2. Setting the volume of an audio tag under the same conditions as the previous cause will also cause an increase in CPU usage over time.

    This will be put in the "Events" category in the debugger.

    3. The "Magicam" plugin will cause an increase in CPU usage each time it is told to follow an object it is already following. This is barely noticeable, but telling it to follow something every tick will build this up over time. This buildup is reset on a layout change, at least in the case of local cameras.

    This will be put under the "Engine" category in the debugger.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Amazing. Apparently unloading the previously played audio file was enough to fix it. No clue why or how but it does. Engine increase is fixed, now all that's left is the wacky audio event sheet stuff.

  • Looking into it more and I think I have found more information about the causes.

    The event sheet increase ONLY occurs for positioned audio, using not positioned audio causes no increase over time. This might have to do with my custom audio system, I need to test stuff more.

    The engine increase occurs when I play an audio file that isn't looped but then play a file with a similar file name afterwards that IS looped, again I need to test more.

    If this rings anyone's bells about similar issues people have had in the past please let me know.

  • No worries, you've been doing this for quite a while after all.

    Yes, it is in a loop but the loop does not increase in size. The text I'm using tokenat on is not increasing in length either.

    It is what it is, I'm sure I'll find a fix sooner or later.

    At the moment I'm trying to see if setting the volume of a tag with analyzer effects on it could be the cause, as the analyzing is engine stuff probably, and the volume change action could be getting harder and harder as the audio repeats itself maybe? I got no clue tbh.

  • I was looking through potential causes and I noticed that a certain event sheet also used more CPU over time alongside the engine. I eventually managed to isolate it to this group:

    (As for why this causes an increase over time, I have no clue as neither arrays change in size. Disabling the audio actions is enough to fix it, so it isn't the conditions at least.)

    Yet even with this disabled, the engine cpu usage still increases over time. Reloading the layout resets the increase in engine cpu usage (as well as the increase caused by the event sheet).

    Also, the engine increase still occurs even when timescale is set to zero.

    Any ideas on fixing either the event sheet increase or engine increase would be much appreciated!

  • It's also worth mentioning that this occurs even when the timescale is set to zero.

  • Hello, I've been going through my game optimizing a bunch of stuff and I've realized that if the game is left open for several hours, its engine usage ramps up drastically despite no change in the number of sprites on screen, effects, etc. I know that certain problems with code can affect the engine use but I'm unaware of what the vast majority of these are.

    Any tips or things to look out for? I'm at a loss as to what I need to do to fix this.

    Tagged:

  • Audio.PlaybackTime seems to give incorrect values when the the audio's playback rate is changed (in my testing this was done via timescale, although I don't doubt the effect could be replicated with set playback rate).

    While the rate in which it increases will speed up on higher timescales, it consistently falls short and is not usable due to the inaccuracy.

    For example, Audio X has a duration of 120 seconds. Audio.Duration("X") returns 120. At a timescale of 1, X will finish when Audio.PlaybackTime("X") is 120. However, if the timescale is changed to 20, X will finish when Audio.PlaybackTime("X") is 102, although Audio.Duration("X") will remain correct and unchanged.

    Is there a way to get accurate playback times without using Audio.PlaybackTime, which take into account changes in timescale? Maybe something with JS?

  • Many thanks!

  • Interesting. I'll take a look at it if my implementation becomes too resource intensive. Can't seem to find it though, do you have a link?

NoticEmpire's avatar

NoticEmpire

Member since 23 Aug, 2018

None one is following NoticEmpire yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies