Flash11 Stage3D Book Chapter 10

Adobe Flash 11 Stage3D (Molehill) Game Programming
Beginner’s Guide: Chapter 10 Demo

“3… 2… 1… ACTION!”

In chapter ten we finish our action shooter game. We add a title screen, design a level, add dynamic lighting, handle in-game events like bullets hitting their targets, health, explosions and much more. The final product of the project we built step-by-step in the book is a fully playable 3d game with all the little extras.

Click the viewport above and use the keyboard to control your ship.

Here’s an excerpt from the chapter introduction:

You’ve reached the final boss battle. Level 10.

The final step in our grand adventure is to polish our game. To evolve it from tech demo to a real, finished, playable game that has a beginning, a middle and an end.

This final stages in the life-cycle of a game’s development can take the most time and effort. The good news is that you are already armed with all the skills required in order to complete it. We don’t need to learn anything radically new or challenging: from here on in the primary challenge is the commitment to quality and the time it takes to get the job done.

Polish is labor intensive busywork. None of it is particularly difficult, but it all adds up. Therefore, don’t expect this final stretch in the project to breeze by: it will take longer than you expect. Why? Polish and quality assurance is where the true soul of a game takes shape. It is where you design levels, boss battles, menus, and tweak the game mechanics.

You might decide to speed up the player’s movements, or ask friends to play a sample level and react to their feedback. You might want to create more content, or revise old content. You might spend weeks polishing, adding new art, tweaking particle systems, adding a few more effects and composing music. This process can go on forever, so it is a good idea to allow yourself to cut features as often as you add new ones.

In this final chapter, we are going to finish up the example “bullet-hell” arcade shooter game that we’ve been working on. Because there is a lot of work that could be done on the art side of things or in gameplay programming that is very basic and not necessarily related to Molehill, we will gloss over a few sections rather than spelling everything out.
You are about to continue the adventure on your own. The training wheels are off.

In chapter ten we upgraded our engine to provide a fully playable game. All the little extras are there. We upgraded the render loop, improved the GUI, added game events like collision detection and fleshed out the game with a detailed level filled with new kinds of decorations and enemies. There is a title screen, a playable game, score, combos, enemies, bullets, explosion, AI, collision, lighting and more. There is a beginning, middle and end.

Learn how to program a Flash 11 3d game in my new book:
Adobe Flash 11 Stage3D (Molehill) Game Programming Beginner’s Guide

View the other demos from the book:
Chapter One – introduction
Chapter Two – terminology
Chapter Three – basic quad
Chapter Four – basic agal shaders
Chapter Five – mesh parser
Chapter Six – render states
Chapter Seven – inputs and timers
Chapter Eight – particle system
Chapter Nine – game actor classes
Chapter Ten – the final game demo

About Breakdance McFunkypants

Also known as Chris K, an Indie Game Developer based in Victoria Canada. A lifelong coder and hardcore gamer, he grew up part of the old-school “demoscene” BBS culture and spent his youth in shady arcades. (twitter.com/McFunkypants)
This entry was posted in 3d, AS3, Book, Coding, Flash, Flash11, Game, Molehill, Stage3D. Bookmark the permalink.

11 Responses to Flash11 Stage3D Book Chapter 10

  1. Umut- Twitter:
    says:

    Hey, I’ve bought the book and have been reading / applying the examples for a few days now.

    My problem was I was having only 24 FPS whatever I did. Finnaly I found out I could change frame rate by adding “stage.frameRate = 60;” line in init function.

    I use Flash Builder 4.5 and I think the problem might be flash builder compiler having a default framerate as 24 while other compilers don’t. You might want to add this as a note in your book.

    And great book for a newbie like me by the way!! :)

  2. meganic says:

    Hi from a french guy , I bought your book a few days ago… not so bad ^^ :)
    I think it will help me for my own flash 3D engine…

    But I have a problem with your game.. :
    hardware acceleration seems not to be activated and my ‘bread toaster’ is at 100%, it’s unplayable…it’s like it’s using software emulation..whereas hardware acceleration is checked !
    (my ‘personal’ video card is a radeon 9550..)
    I had same problem with one of your book chapter example wich displayed me a warning text telling me that I hadn’t gpu acceleration enabled (but it was actually checked too) ..and that..on my ‘office’ video card wich is far away better (some kind of nvidia..I don’t remember…)
    Anybody else with same problem?
    Thanks!

    • Bonjour! The first thing you should check is what it says in the small white text at the bottom of the game. If the word “software” is there then your video card is not able to process pixel shader 2.0 and it is running in software emulation. Secondly, ensure you update your drivers to the latest version – it won’\t work if your drivers are older than 2010. Finally, check this page out: http://www.mcfunkypants.com/2011/flash11-stage3d-tutorial-handling-init-errors/ and see if it gives more explanations. Your radeon 9550 sound like it should work great with 60fps and less than 10% cpu use, so double check your drivers, etc.

      The list of old graphics cards that do NOT work with Flash 11
      From (http://kb2.adobe.com/cps/921/cpsid_92103.html)

      All Platforms
      Any GPU that doesn’t support Pixel Shader version 2.x or above
      Intel GMAs that DON’T support Pixel Shader 2.x: 740, i752, IEG, IEG2, GMA 900, GMA 950, GMA 3000, GMA 3100, GMA 3150
      Chrome VIA Chipset

      Windows
      Any graphics driver older than January 1, 2009
      NVIDIA driver 8.17.11.9621
      NVIDIA driver 8.17.11.8267
      Any Intel GMA driver before X.X.10.2021

      Macintosh
      All Intel GMAs
      ATI Radeon X1600
      ATI Radeon 2400
      Firefox 3.6 and earlier
      Mac OS X 10.5 or earlier

      Good luck! If you solve the problem, please let me know!

  3. meganic says:

    OK thanks…I’m updating my drivers.I will let you know if it solved..or not^^

  4. meganic says:

    Hum…
    ” it is highly recommended to update your drivers as it is likely to fix any software fallbacks you experience. If you still get software fallback after updating your drivers, then your chipset is likely to be unsupported.”

    I think I’m concerned by the end…
    After drivers update + reboot :
    First try: flash crashed + blue screen…
    Second try : go back to software

    Hopping that office gpu is less ‘capricious’….
    Regards

  5. Pingback: Flash11 Stage3D Book Chapter 7 | Indie Game Developer Breakdance McFunkypants

  6. Pingback: Flash11 Stage3D Book Chapter 3 | Indie Game Developer Breakdance McFunkypants

  7. Zutty says:

    Awesome tutorial, thank you very much.

    May I suggest you turn off the tag cloud on this page, as it causes the demo to run dog-slow. I get a consistent 55-60 fps if I resize my window so I cant see the tag cloud, but if they are both in view it runs at about 8fps :(

    This is on Vista x64 with Firefox 8.

  8. Pingback: 30+ Gift Ideas for Browser App and Browser Game Developers | Flash Video Traning Source

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>