Monday, April 22, 2019

actionscript 3 - How should I manage game levels in a flash games?


I am still learning and I am trying to design the game levels for my first game (a platformer).


I have some straightforward questions because I feel I am on the wrong way.


Should each level have its own class ?


The way I am trying to do this is, when one finishes the first level I set all variables to null that belong to that class, unregister all events and remove all children from the stage, call a second level constructor, without declaring any variable, new level2(); and set a static var to true "in order to save" that progress in case one wants to play that level again.


However I see the code becomes messy, I run into issues, and memory management concerns arise.


I searched for help all over the internet but I can't find any tutorial that explain it in details, so I'm trying out many ways of achieving what I want, but now I am really in need of some advices to not get lost.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...