Enemy Spawn Casuing Lag?

Get help using Construct 2

Post » Thu Sep 03, 2015 2:39 am

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!
B
3
Posts: 36
Reputation: 253

Post » Thu Sep 03, 2015 7:45 am

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?
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Thu Sep 03, 2015 1:44 pm

@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)
B
3
Posts: 36
Reputation: 253

Post » Thu Sep 03, 2015 6:17 pm

Can you please resend it as a capx (File -> Save as single file) some files are missing, and I can not open it
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Thu Sep 03, 2015 8:13 pm

ohhh okay just realised. doing it now
B
8
S
2
Posts: 146
Reputation: 1,132


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests