Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (loading, sponsor, intro, menu, gameplay, etc...). This method works but has some problems... For instance, it is not easy to implement transitions between the different screens in the game.

How do you do this? Do you know of some better way?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

The most flexible way is to skip the keyframes altogether and implement your states (and transitions) in code. You could have a basic GameState class that inherits from MovieClip and can therefore be applied to MovieClips in your Library.

This wikipedia article might help you understand the concept of a State-Machine. Also have a look at the following question: Game State 'Stack'?

share|improve this answer
1  
+1 @miguelSantirso - as bummzack says, forget keyframes and instead think of stacking DisplayObjects on top of other DisplayObjects, hiding and showing the layers as necessary. Your menu will be on top of your game container etc. You might want to also think about using an engine like the PushButton engine to help organise and structure everything. –  Allan Feb 23 '11 at 7:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.