How do I figure out whats causing lag?

0 favourites
  • 7 posts
From the Asset Store
Cause some serious sonic mayhem with Iconic Film Trailer.
  • Hello all!

    I have spent 2 roughly years working on my project and i have noticed just recently (now that im almost finished ) that it is now starting to stutter lag here and there within the game, and then it would fade out. whats even more baffling is that if i reboot the game the problem doesn't seem to occur anymore.

    at the moment i have 60 layouts with over 9300 events and 100's of objects of course.

    each layout has roughly 100 to at most 300 objects

    and i highly doubt its my PC its on a higher end. and everytime i try debugging the problem never occurs, only in standard preview and on node webkit.

    any thoughts and suggestions would be so appreciated right now!!!

  • That's was a lot of events and layouts, which ofc doesn't make it easier

    But some obvious things to check. Is number of collisions, amount of objects being created running wild due to a bug. A bit harder to track is unnecessary updating of objects.

    Think that's the best I can come up with, Its not easy to help debug such a big game

  • Also check for redundancy, if things are getting run every tick that doesn't have to. I think Next Penelope is the same or beyond that in objects and stuff going on and runs smoothly. First before cutting back objects. Check to make sure there are things that could be condensed. When viewing some people event sheets I see them do things multiple times that could of been done in one run through.

  • Thanks guys for the help, i'll give those a shot and hope for the best! =]

  • AngelRave also test in other browser the latest versions of Chrome/NodeWebkit you have a bug the causes lag/stutter/jittering it you search the forums (chrome issues) you can find threads about it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello all!

    I have spent 2 roughly years working on my project and i have noticed just recently (now that im almost finished ) that it is now starting to stutter lag here and there within the game, and then it would fade out. whats even more baffling is that if i reboot the game the problem doesn't seem to occur anymore.

    at the moment i have 60 layouts with over 9300 events and 100's of objects of course.

    each layout has roughly 100 to at most 300 objects

    and i highly doubt its my PC its on a higher end. and everytime i try debugging the problem never occurs, only in standard preview and on node webkit.

    any thoughts and suggestions would be so appreciated right now!!!

    well one potential problem that can cause lagging or fps draining, is your cache that got to big , u may have a save condition that those automatically save everything in the scene so as many actors info etc u have in that scene the bigger the cache will be and the slower ur pc /browser will perform, if ur fps rate is to low under 40 i bet it is or around 40 , in order to increase it, try not using everytick on text objects, that will dramatically reduce ur fps if u have everytick text objects updates , like score, life , points , etc, maybe u want to move them to update when a mob is killed or something else happens.

    another good way of increasing ur fps ..(dont use webgl effects) try keep ur game as much 'native" as possible, and at 100+objects on screen shouldnt bee so much dramatical fps drop , maybe u have some saving , tick event u miss out, if ur pc still lags after u close ur browser is that ur cache in ur computer maybe full try erase ur temp folder , prefetch, and the temp from c:/users/urusername/appdata/and check all folders there for temp <--- this is where all ur info cache files are saved and over saved and i think ur hdd might be having a huge temp file since u working on that thing for 2 years i bet thats ur issue

    and since u have alot of actors and enemys with animations try compresing ur png files, jpeg files as much as possible, bigger sized file reduced in file is first loaded in original size so if u have a 1000x1000 background but u need to cover only 860x640 then id create it exactly at that size, if ur png files are big then the loading time will be big and performance and fps rate will drop alot, made a game a long time back , and as simple and dumb can sound the compresion png , and the everytick text object usage , turns out that they actually matter ... alot... i did a debug mode run and did exactly those steps on a huge game im talking about rpg type, and from 36 fps rate i had went up at almost 56-60 u having the last part of project to cover up thats called "optimization" so do that and try again and a possible pc virus scan

    P.s if ur using custom plugins, that are in progress and not completed and u added them in a old version of construct and then u updated construct 2 u might have a issue on that part also, try reinstall c2 clean out and also the plugins check for their last version, hope it helped you

  • I found out what was the problem!

    as it turned out i had a

    EveryTick Set listener object. once that was removed the lag was completely gone! thanks everyone for the tips and help!

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