Spawn actor or change image

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello,
In my game I had many actors with rules:
When touch is pressed, destroy this actor and spawn actor XXX.
To decrease game engine RAM usage I changed these actors to one actor with rules:
When touch is pressed, change attribute game.NextFrame to (game.NextFrame+1)%10
When game.NextFrame=1, change image to X.
When game.NextFrame=2, change image to X2.
etc.

Game engine RAM usage was lower, but I noticed that images RAM usage increased. Is that normal?
Changing image takes more RAM than spawning other actor with that image?

Thank you.

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    I am not sure, but I can imagine that if you change image, the previous image stays in the ram.

    If you destroy an actor, it will be deleted from the memory too.

    I think, I don't have to explain further :-)
Sign In or Register to comment.