Wiki

Case Status
Log In

Wiki

 
Home ยป Samples»M2H Jump Game»M2H Jump Game, Platforms destr…
Index
Navigation
Community Wiki

M2H Jump Game, Platforms destroyer

Delete bottom platforms as we move up

this Fsm is very simple, it simply detects  platforms and destroy them. We don't need them anymore as they are at the bottom of the screen, below the gameOver trigger. Not destroying them would create a memory leak, and as the user progress higher and higher the number of platforms would grow and eventually start affecting framerate. In this particular example, It's unlikely to have any noticeable effect in this particular example ( tho on mobile you would definitely have measurable performance drop if the user really starts to score high). This is always a good practice to stay aware of these kind of leaks, leaks are not just happening in scripts... If you had several types of platforms, with different textures, this would start to have a very noticeable effect, because texture would have to be kept in memory, etc etc.

Tags:

Last modified on 5/9/2012 4:00 AM by User.

  • RSS Feed