Actor Retains Deleted Rules

JelJel Member Posts: 319
edited November -1 in Working with GS (Mac)
I recently went back to an old project to try and figure out why it was using some much memory on the device. After reducing image sizes, double checking my optimisation on actors, etc it turned out to be a background that was causing the problem.

I had used the Prototype background with a lot of rules in each scene and then in the scenes where some of the rules where not needed I deleted them. Anyway after creating a new blank (no rules) background for each scene and then copy and pasting the rules the memory use was cut in half !

Has anyone else experienced the same thing ?

Comments

  • hrsmediahrsmedia Member Posts: 522
    Yea I have noticed this before. If I have an instance of an actor in a scene and delete the rules, it will use the rules of the prototype actor anyway.
  • UtopianGamesUtopianGames Member Posts: 5,692
    0.9 is a bit buggy when i copy and paste a lot of the time code is missing.

    So what your saying is you can delete all the code from the actor in the scene and it will use the original and cut memory?

    I'm struggling with total memory atm and have spent all morning deleting the spawn and or destroy actors...i got fps to steady 60 now but total memory is still an issue and goes up every level i play so by the time im at level 30 its well over 30 mb.

    Darren.
  • gazjmgazjm Member Posts: 578
    I also noticed this on deleted rules. I found a workaround was instead or leaving it blank, just put a blank rule or timer etc in there. That seems to stop it accessing the prototype!
  • JelJel Member Posts: 319
    utopiangames said:
    0.9 is a bit buggy when i copy and paste a lot of the time code is missing.

    So what your saying is you can delete all the code from the actor in the scene and it will use the original and cut memory?

    I'm struggling with total memory atm and have spent all morning deleting the spawn and or destroy actors...i got fps to steady 60 now but total memory is still an issue and goes up every level i play so by the time im at level 30 its well over 30 mb.

    Darren.

    I don't think it's 0.9 as the game was developed in 0.8.9 and the memory usage was the same in both.

    Interms of memory, my scene went from a whopping 84mb to 43mb on an iPhone 4 and 64mb (crashed a lot) to 36mb on a 2gen iPod Touch. The scene was a very simple opening scene just had some hi res images but after creating a new actor with just the rules I needed I got the above result.

    It might have something to do with "Revert to Prototype" always linking back to the original rules even when there not being used.
  • hrsmediahrsmedia Member Posts: 522
    Yea I had this issue in 0.8.9

    I have not really ran into memory usage issues unless I use really large images and lots of actors. I try to use as few actors as possible in my projects and use instances of the actors, I found this dramatically reduces load times anyway.
Sign In or Register to comment.