Lags during gameplay

MichalChMichalCh Member, PRO Posts: 115
edited March 2015 in Working with GS (Mac)

Hello

Does anyone else has an issue like me? I have a game where the main actor "flies" up high. The game has 1 000 000 Y and normal X resolution (portrait). Near the main actor is the second actor "spawner" and it spawns actors in front, while actors in back are being destroyed if hero position Y is greater than 800. And after about 2 min on iPhone 4s, iPad 2, Samsung Galaxy S3 the game starts to lag, and then getting worse. I made actor counter (actor spawns increase global variable +1, when destroyed global variable -1) to check if there are unwanted actors behind background or whatever but there isn't any. I'm using 32 bit .png images. When I made them 24 bit there were white backgrounds instead of transparency (ofc). There isn't ANY complex coding included. Not even music yet.
Anyone having any thoughts?

What I did so far:
deleting actors when postion +800 < main.character position Y
switched off "preload art"
decreased the speed of animation actors (enemies)

Edited:
I'm also using around 10 actors on not scrollable layer
to display score. I've changed "contrain" self image to score
to change self image to score whenever the score has changed

Comments

Sign In or Register to comment.