RaptorWingGames's Forum Posts

  • I thought garbage collection was handled by Construct also, but after someone suggested looking at it I gave it another shot.

    My auto runner was plagued by a periodic jank I couldn’t correct no matter what I did. I had a lot of little instances in my game of objects being created or destroyed every few seconds. I also had a lot of sprites I preloaded off-screen then destroyed. I modified my code so the game would load everything it needed to use immediately, and then instead of ever destroying anything, it reuses the same objects over and over. My problem appears to have been garbage collection stutters as the game adjusted itself to each creation and destruction; now the issue has completely vanished.

    That got me wondering about what other little tips people might have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got some great help on this board the other day. Suggestions about lerp and garbage collection made a big difference in improving performance in my mobile game. I was curious if anyone else has any optimization tricks or things they tend to look at/adjust when getting a game ready for mobile in 2018.

  • Thanks a lot. I’ll look into garbage collection and try implementing lerp to see if there’s an improvement.

  • I appreciate the reponse. I’ve occasionally wondered if it has anything to do with the bullet behavior and delta time, since the framerate drop itself is so miniscule (60 to 59 and back), but just enough to cause things to skip forward in order to catch up. The game itself runs extremely smooth except for those random hitches. I tried using minimum framerate or timescaling to smooth out any delta time issues, but the stuttering still occurred, albeit less frequently. I also attempted (and failed) to come up with an alternative way to move things smoothly that wouldn’t be so visibly affected during delta-time hiccups.

    I’m hoping that I can find some way to minimize or even bypass whatever aspect is causing trouble.

  • I am having trouble with an auto-runner I’ve been working on, and I was hoping that someone here might be able to help. I have background layers, coins, and enemies moving in one direction with bullet behavior, passing by a running-in-place player character to simulate movement. The framerate is almost constantly 60, with the occasional brief drop to 59, but I still get annoying stutters. There’s no clear logic behind when the stutters occur, either: I’ve stripped the game down to its most basic, with minimal code and almost no memory usage, yet there they are. I don't think that it's my code or my assets to blame because I see the exact same lurching effect take place in the auto-runner template that came with Construct, like a brief jank or screen tear.

    I have all of my sprites pre-loaded into memory, and I’ve experienced the problem on multiple systems/browsers. It’s obvious (and annoying) enough that I’m worried that it’ll be game ruining if I try to sell it anyplace. Otherwise I am very pleased with Construct 2 and 3. If anyone has ideas about how to eliminate it, I’d be grateful.