Nate Pacyga - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Nate Pacyga

Description:

We have done a number of small games with prototypes for larger games for Flash and consoles ... http://www.newgrounds.com/portal/view/480006 ... – PowerPoint PPT presentation

Number of Views:232
Avg rating:3.0/5.0
Slides: 18
Provided by: natep
Category:

less

Transcript and Presenter's Notes

Title: Nate Pacyga


1
Nate Pacyga
  • Applied Flash Architecture

2
Background
  • Flash / Flex programmer for 6 years
  • Try Catch Games started in September
  • TCG is a indie / casual game company
  • We have done a number of small games with
    prototypes for larger games for Flash and
    consoles
  • I play video games as much as I can!!!

3
What I would like to cover
  • Touch on Brads framework (the best I can)
  • From which I want to encourage all of you to
    investigate your owns systems and processes to
    see what works best for you
  • MVC
  • The way(s) I personally use it, since everyone
    seems to have their own interpretation of it
  • Use it as a methodology
  • Using MVC with a State Manager for switching out
    views
  • Having the views communicate back to the
    Moderator
  • Moderator / Mediator
  • When you are working with simpler games/apps the
    Moderator is the glue that pieces it all
    together
  • In the case of my simple MVC example I use a
    Moderator as the point where all things shoot
    events back to
  • Factory
  • Usually a static method that returns an object
    based on parameters
  • Great for abstracting out object creation
  • How assets are accessed in the case of Brads
    framework using simple factory examples
  • Go through some simple examples of this with
    Simon
  • State Managers
  • Having a base class for views and managing view
    states with enter and exit methods
  • Using simple states for the game pieces, instead
    of a state machine
  • Managers / Dictionaries

4
I am no authority
  • Consult the experts constantly, like these books
  • Make mistakes and learn!
  • I hope this sparks creativity with building your
    own systems and making Flash that much more of a
    respected enterprise platform
  • Ask questions at any time, this is a discussion

5
Lets get started, but first
  • Before we get rollin lets break up the monotony
    with a cool game
  • Closure
  • http//www.newgrounds.com/portal/view/480006
  • Uses Pixel Bender and Flash 10, probably one of
    the best uses for it so far as I know

6
Jump in!
  • Simple Simon
  • What does this thing do?
  • Switching views
  • States of pieces
  • How things are getting on the screen using Brads
    framework

7
MVC
  • Typically when you are dealing with MVC you are
    doing something like the above
  • 1 User interacts
  • 2 View tells controller to handle input
  • 3 Controller changes model state
  • 4 Model tells view to update
  • 5 View reads information from model and updates

8
How I am modifying MVC
  • 1 View handles user input
  • 2 View dispatches event to Simon
  • 3 Simon tells controller
  • 4 Controller takes action and modifies the
    Model
  • 5 Controller dispatches an event if game logic
    dictates
  • 6 Simon tells View to update

9
Brads Framework
  • Main Dont really think about much here, its a
    black box and its meant to be
  • Screen Manager Used for managing the different
    screens. In this case we really just care about
    the GamPlay screen.
  • GamePlay Simple point of entry to kick off the
    game

10
Moderator - Simon
  • Simon The main class of the Simple Simon game
    and the moderator of the program
  • SimonController
  • ViewStateManager changeView
  • UI
  • Handlers

11
Model and Controller
  • SimonController
  • Game logic
  • Color playback
  • Checks player entry
  • Model
  • Singleton
  • Holds application state that anyone can tap into.
    In this case only the controller does

12
Creating Views
  • BaseSimonView
  • Three views based off this base
  • Ability to switch views at any time because of
    the event driven view system

13
State Manager for Views
  • Main
  • StateManager instantiation and changeView
    method
  • ViewStateManager
  • setState method
  • revert method
  • ViewState
  • Any view extends this
  • Attach transitions in the view to enter and exit
    methods
  • I believe Brads Screen Management uses this idea
    as well

14
Pieces
  • Pieces changing state setState
  • Time delay on internal state changes
  • Pieces getting assets through a factory
  • Assets in the FLA
  • Accessing assets through Linkage Factory

15
Managers and Dictionaries
  • Not used in this game
  • But I want to cover it anyways
  • Manager
  • Having one point of entry to an object so that
    there is only one reference. When that reference
    is destroyed the object is marked for garage
    collection.
  • Having a destroy method on all objects

16
Q A
  • Resources
  • Books
  • Advanced ActionScript 3 with Design Patterns
  • ActionScript 3.0 Design Patterns
  • Applications Programming in Smalltalk How to use
    Model-View-Controller by Steve Burbeck
  • Websites
  • Flash Game Blogs
  • 8bitrocket.com
  • Gamepoetry.com
  • Blog.trycatchgames.com (code will be here soon)
  • Extra time and nothing to talk about?
  • Time deltas
  • Embedding assets (Bumble Tales)
  • Sound frequency
  • Fantastic Contraption
  • Monetizing Flash Games

17
Thanks!
  • Thanks to
  • Danny Patterson
  • Brad Bollinger
  • Dave Schroeder
  • All the other speakers and you! ?
Write a Comment
User Comments (0)
About PowerShow.com