Enemy Spawn Casuing Lag?

0 favourites
  • 5 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • My friend yesterday posted a similar post, and I am suffering from a similar problem. I read somewhere that you should reduce your game lag by not playing animations too often. Now the way I have my enemy spawning is as follows....

    I created a family and placed 5 different types of enemies within that family group. I have that every random 1,2 seconds a random enemy is selected and spawned. Could the game be running slow because of this. I tried previously having a single sprite and making 5 different animations within the sprite and coded that it should randomly select an animation to spawn but my game was still freezing.

    I feel like the game is lagging a lot due to the constant enemy spawn every 1,2 seconds. But it is important in my game and I need it.

    Any ideas? thank you!

  • Creating obejct every second or so should not make your game lagg. I made bullets spawning a lot faster than that with 2 animations without any lagg.

    Do you have any oncreate with foreach? Are you sure that you are just spawning exactly one obejct?

    Can you share your capx so we can have a look?

  • Borgi I don't have a high enough rating to PM you. so my I will PM you the capx through my friends account (account name: zikdot)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you please resend it as a capx (File -> Save as single file) some files are missing, and I can not open it

  • ohhh okay just realised. doing it now

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