GS Slowing down with random, non-repeating images
Hello,
I've made a game in which the player has to recognize U.S. Presidents from displayed pictures. I only want each president to be displayed once. My current solution uses 44 boolean attributes and disables each picture after it is used once. This works fine for about thirty seconds or so. But then the game starts to slow down unacceptably once fewer and fewer presidents are available. I realize that the Obj-C solution to this is a mutable array and removeObjectAtIndex, but that's not an option yet in GameSalad. Is there another GS method that wouldn't be so slow?
Thanks,
Eli
I've made a game in which the player has to recognize U.S. Presidents from displayed pictures. I only want each president to be displayed once. My current solution uses 44 boolean attributes and disables each picture after it is used once. This works fine for about thirty seconds or so. But then the game starts to slow down unacceptably once fewer and fewer presidents are available. I realize that the Obj-C solution to this is a mutable array and removeObjectAtIndex, but that's not an option yet in GameSalad. Is there another GS method that wouldn't be so slow?
Thanks,
Eli
Comments
My recommendation is find a way to use smaller image dimensions. If the full screen back ground is the same and you just have a presidents face slapped on to 44 copies of that back ground then separate them and have one background actor and then 44 separate images of the faces with smaller image dimensions.
Hope that helps get you on the right track of finding your issues.
Cheers
Aaron
Do you use a random number generator that produces a number then checks whether than number has been used before (ie: has it's 'been used' attribute switched to true) ?
seems to speed up the flow and mayhap take the old image out of RAM
MH