Designing the structure of a Flash game – AS3 version – Part 2
I added some new features to Designing the structure of a Flash game – AS3 version game template and wanted to share the result with you.
Now the diagram is a little more complex, and it still lacks of some important features such as savegames and high scores.
Let’s look at the new diagram (if you want a fancy diagram like the one on this post, made in a couple of minutes without installing any software, visit Gliffy):

Now the player can select levels. The script does not check for already completed levels and there isn’t any “congratulations” screen if you complete the game.
Both features will be added later.
Also, there is some room for optimization, and I will try to optimize the template as much as I can because it’s going to be my template for all future AS3 games.
Here it is:
I am not posting the source code this time because files become to be quite a lot, and all work with the same concepts as seen on Designing the structure of a Flash game – AS3 version.
But you can obviously download the source code and feel free to complete it.
They can be easily customized to meet the unique requirements of your project.
















(7 votes, average: 3.86 out of 5)









This post has 10 comments
RJ
In my opinion, you should be able to get back to the main menu once you leave it to play.
I think the level select screen should have a “Back to menu” button
Snurre
Yeah, it definitely should :) but I think he will be adding this at some point :D
Snurre
you guys gotta check this out.. contets of doign the best SWF with only 25 lines of code :D http://www.25lines.com/?page_id=139
Krystian Majewski
You should upload that sample as a game on Kongregate and Newgrounds. It might be not so much now but after implementing a couple of archievements you might get a few additional hits. ;-)
Xodus
Well, you can see from the diagram how often one visits the level select screen, as compared to the splash screen or even the game itself, though its now taking into account the time spent on each screen, the level select screen is the best place for ads because you visit it so often.
Xodus
srry, now is not
Debi K
Thanks for the plug and use of Gliffy. Glad it was a quick study and provided good examples for your readers! debik at gliffy dot com
Nathan
Xodus has a point, the most viewed screen in this example would be the Win/Lose Screen.
@Snurre, cool, but irrelevant. This might be better posted in the forums.
Designing the structure of a Flash game - AS3 version - Part 3 : Emanuele Feronato
[...] game structure is getting more and more complete… now, according to the comments to Designing the structure of a Flash game – AS3 version – Part 2, you are able to return to main menu from level selection screen, level passed screen, and level [...]
Criando a estrutura de um jogo em flash – 2ª parte « Tentativa de Programação
[...] É que tem fluído bem então sigamos com o baile! Nessa segunda parte, continuando com o site do Feronato, foi mudado o design inicial, acrescentando mais telas e fazendo um looping FOR para definir [...]