is this normal? lag spike after spawn sprite...

0 favourites
  • 3 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • It's a top-down shooter game and I try to spawn an enemy suddenly there is laggy within a second. just the enemy part. but when I spawn bullet there is nothing happened. no lag at all.

    after I try using debug then I view the collision tick. on the start layout, it was 700(~25/tick) - 1500(~35/tick)...

    then when I try to spawn an enemy object (just one) it suddenly rises to 400000(~8000/tick)...

    anyone can help me with this?

    object count on layout: 76

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • make sure the object is already in the layout. if you don't want it there on the start of layout, use the Destroy Action in OnStartofLayout.

    Objects that are on the layout will be preloaded into memory. If you create and object that is not on the layout (but elsewhere in the project) it will work, but you may have some jank when you call the Create

  • That spike in collision checks is not normal. Check in the Debug Mode - make sure that only one instance of enemy is spawned (not thousands for example).

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