A lot of transitions at the same time

Hi everyone.
I am using a lot of transition when my score system is activated, because i need to show a lot of images at diferente times, like 1 second this image, 2 second other image 3 second other image, and will making visible an image per second, it is like 7 seconds, 7 images, i use a table to create the images like image = {} and then image {1} -transition1,image {2}-transition2.

and when this transition start run, my default memoryUsage is 0.30… and when i use my score system with this transitions my memoryUsage is during this seconds that is running the transitions, 0,60…/0.50… and when the transitions will over, the memory usage back to 0.30.

It can cause some problems or issues,lags,bugs etc?
and i maybe can use?

Thanks [import]uid: 26056 topic_id: 21791 reply_id: 321791[/import]

I don’t think more number of transitions lead to memory leaks.

I once had an application which ran more than 1000 transitions at a point of time. I had no issues.

Just my 2 cents!

[import]uid: 64174 topic_id: 21791 reply_id: 86545[/import]

If your memory usage isn’t dropping back to where it should be chances are you aren’t properly removing all images you spawned for the transition. Is that a possibility? Something isn’t getting cleaned up. [import]uid: 52491 topic_id: 21791 reply_id: 86564[/import]

I declare the images on top of the code and use some transitions at a site further down the code, I can not remove the objects, I can only get the object visible or not, because if I remove the object he is not longer appears and the user can go the score, but can replay and the game continues to run normally, and when the user go to score this animation will appear, the objects will be visible on the animation, and when the user replay the game this objects will be invisible.but it will accumulate memory, each time that user go to score and the transition run and then he replay the game, how i can clean this memory if the user replay the game each time? [import]uid: 26056 topic_id: 21791 reply_id: 86575[/import]

It sounds like “the user go score” means a gameover screen, is that right? If so, are you using Director or Storyboard?

The images should be removed when the scene changes and then respawned when you play again if using either Director or Storyboard; if you don’t remove them they will continue to take up memory whether or not they are visible because they will still exist. [import]uid: 52491 topic_id: 21791 reply_id: 86632[/import]

try using spritesheet [import]uid: 7911 topic_id: 21791 reply_id: 86639[/import]

yeh is it Peach, i cant use director, because i when the user is playing some objects and things, are on a random position and then if the user collides with the goal, the game appear an score imagem over the gameplay, and the user cant see the gameplay because the image of score is full screen, and then if the user click on the replay button, the score background dissapear and appear again the normal gameplay, with the position of objects in the same place where they stayed before going to the gameplay. It is why that i dont use the director :confused: but imagine this example, the user run the level and the gameplay start, and then he win the level and go to the score, but he dont like the result, and then click on replay and can play again, with the same position of the objects that stayed before he went to score, and he repeat this a lot of times, the transitions will increase all the time the memory, because each time that the user go to scre, it run a lot of transitions.
Really need some help to keep going on my project

Thank a lot [import]uid: 26056 topic_id: 21791 reply_id: 86745[/import]

I am afraid I am having some trouble understanding what exactly is happening.

What transitions are happening when the user “goes to score”? Are you moving objects back to their starting points? [import]uid: 52491 topic_id: 21791 reply_id: 86778[/import]

when the user go to score, the game show the score background, some stars, time, scores, buttons etc, and some of this stars,time,scores (elements of score) will have a transition, when the user reach the goal, i only do, score background.isVisible = true and score background:toFront(), and do the same with the elements of score, and all elements and score background have transitions.

I said that i cant use director because i am playing a level, and choose some positions to my objects etc, and then when i reach the goal will appear the score system but, i can go back to the game, by the replay button, and need to have the objects on the same place before they were going to score, and it happens if i use this type of score system, because when the user reach the goal, i only put the score images over the gameplay images, and if he press replay i just put the score images behind the gameplay images. [import]uid: 26056 topic_id: 21791 reply_id: 86825[/import]

Ah right, OK, so you spawn absolutely everything for all of it at once, the menu, game, “score”, etc, yes?

If so you may want to spawn the score stuff when the user actually gets gameover (or reaches the goal, or whatever) rather than loading it all at once.

Are you loading images/objects for multiple levels too, or just one? [import]uid: 52491 topic_id: 21791 reply_id: 86858[/import]

perhaps you need to spend a little time using director. it should work just pause the game and use director popups for the score screen. and by using groups you could insert objects into group then transition the group instead of each object or insert ur objects into a table then use 1 transition it gets a new object from the table every second until all objects are used
you may need to post some code so we can see what your doing or at lease a video so we can get a better idea of what your trying to do [import]uid: 7911 topic_id: 21791 reply_id: 86889[/import]

Yeh i really need to use director on my score and pause system, it is the key, how can i do some like that?, running my gameplay and when i touch on my pause button, will appear the images etc of the pause system over the gameplay images. Can show me a simples example? or tutorials, docs to starting learn about that
Thanks a lot for both :slight_smile: [import]uid: 26056 topic_id: 21791 reply_id: 86908[/import]