I’m developing a game with FlashPunk and I am doing well so far (although i can’t really even draw a circle on the screen using AS3).
I wanted to know if these are the most efficient ways to do certain things:
- Should I handle user Input in the Game World (there is only one world) or in the player class itself or even in the main class. I handle it in the Game World.
- How should I make a piece of code only execute if some time elapsed, currently I make a uint counter variable and increment it every frame and then I check if the counter is let’s say 180 or larger (3 seconds since the game is 60 fps), if so, the code gets executed and I assign the counter to 0. Also I can’t use FP.elapsed since I’m using a fixed timestep.
- Should I play music as a regular sound effect or is there some “special” class for doing that.