Why my game is lagging ??

0 favourites
  • 7 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • I have created a small game where user have to park a car over a parking spot. I have used same layout for levels and used to create objects using events depending on level number. But after I play few levels (like 4-5), my game starts lagging. If I still go on playing, it lags by almost double. Where can be the problem ?

  • Without seeing it, who can say?

    My suggestion would be to run it in Debug mode and check the number of objects being created, memory used, cpu used etc. It may give you a clue as to what is causing the slowdown.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi,

    try tips on performance tutorial ... and the best is to take look to your event sheet script

  • Thanks guys... The thing I noticed that the lag is coming only on browser but not mobile browser.. Any guesses here??

    I have made 2-3 games before this, but didn't faced this issue (they were very small games though).

    zenox98: Thanx.. So stupid I am, this slipped out of my mind completely, even though it was right in front of me.. thanx for reminding me of that.

    matrixreal: I have read that I am following it closely, Not even once I am using Every Tick event and so on.. Thanx for the comment..

    Well, completely off-topic question here.. I am currently using Scale inner for scaling issue, But I just read somewhere that there is a tag called viewpoint in html5 which scale the game screen to mobile screen size, and hence no need of scale inner scaling. But it is not working in my project. Am I missing something ??

  • yes the problem is when you use a lot of every tick

    if you use set x to self.x or moving or set angle dont forget to add *60*dt it will help you a lot

    and for scale ad view point , i wonder if you explain or give and exemple !!!

  • matrixreal: Thanx for the tip. I will keep that in mind.

    About next point, my mistake, it is 'viewport' tag, and not 'viewpoint'..

    I was searching the web for my issue and i found this tag. I posted the link below. It will help you understand better than I can.

    developer.mozilla.org/en/docs/M ... t_meta_tag

    EDIT: well, looks like I can't post link. If you could just search 'html5 viewport tag' in google, you will get more info. Above link is the first link from the search.

  • matrixreal: Thanx for the tip. I will keep that in mind.

    About next point, my mistake, it is 'viewport' tag, and not 'viewpoint'..

    I was searching the web for my issue and i found this tag. I posted the link below. It will help you understand better than I can.

    https://developer.mozilla.org/en/docs/M ... t_meta_tag

    EDIT: well, looks like I can't post link. If you could just search 'html5 viewport tag' in google, you will get more info. Above link is the first link from the search.

    if you use level system

    i suggest to you to use different layout because on every start of new layout that will refresh memory and cpu usage

    <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

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