How do I avoid this problem: my game gets slower and slower

0 favourites
  • 11 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • I uploaded my files to a free webhosting to test it. At the computer (PC) runs normal but online, it starts to get slower as the person plays, reaching the point where everything is so slow that the player can't barely move.

    Yes I used the "destroy outside layout" for every item that can go outside the layout, and still it gets slower.

    I also pasted outside the layout the items that I want to appear, like the buttons when the platform is mobile. I pasted those outside the window.

    I've followed other advices, trying to reduce transparencies and else. Not sure what else could be causing this. Maybe it has something to do with the timer?

    should I remove it, or maybe set times as delta time? not sure how or if that would help.

    I'd appreciate any help.

  • What does the browser console say?

    Have you ran your program in debug? Is there a cascade on number of objects being created?

    Many reasons this could happen, but without providing a .capx or a link to the exported project, it will be difficult to offer meaningful help.

  • Run in debug. See what's bloating.

    It might be good for all of us if you find out.

  • infinite loop?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every tick and loops can "eat" performance.

  • thank you very much for the tips, I will check them out. My game is at it's just the first 3 levels but the first one runs fine in the PC, but very slow in the web. Will try to check what you suggest. Thanks a lot for your advices.

  • it says I can't post the link

    but I solved the problem! thanks to your advices, the debug showed me that it was creating the buttons hundreds/thousands times because I specified:

    system -- is on mobile device (event) -- system: create object leftbutton on layer HUD at (600,414)

    system -- X is no mobile device --- destroy

    so with these lines it was creating, and creating, and creating and creating the same button and when I checked the debug window it was showing 1, 50, 400, 1000 items for the same button. How can I publish the link here so you can see how the game is running so fine now?

  • To publish a link, just put a space or 2 between the url parts, or possible use the 'code' tag.

  • Thanks zenox98 my link is www dot digram dot net / juego

  • I'm making a platform game, mario bros style. I'd be glad if you decide to play with it, it's just the first 3 levels (I have worked hard on it since I'm making the design and all, and fixing all problems that arise) but so far it's working as it should.

  • I'm going to make a total of 15 levels but so far I just made 3. There will be many different environments so I need to create backgrounds and monsters for each level.

    Level 3 is still in progress, I'm planning to add monsters flying also, or maybe the character will get the cappacity of floating in mid-air for some seconds. But I'm not sure if I should keep every ability for the next level, or just have 1 ability per level. For example level 2 gave the character double jump ability. Not sure if that should be present in level 3, or just discard double jump and add a new ability, if that would be more interesting for the player. But at the end he will have too many abilities? and for that reason the game will become very heavy?

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