Skip to content

Postal Worker 10

Wow – 20% of the way through the project. Scary stuff.

Tonight I got the first version of the ContextManager up and running. Right now the KranzkyEngine has the following structure:

  • KranzkySingleton
  • KranzkyEngine < KranzkySingleton
    • Initialise the AirPlay framework
    • Hook into iPhone events
    • Run the main loop
      • Call KranzkyContextManager to update and render
  • KranzkyContextManager < KranzkySingleton
    • Manage the list of known KranzkyContext objects
    • Manage the list of currently running KranzkyContext objects
    • Handle overlaying one KranzkyContext on another
    • Handle transitioning from one KranzkyContext to another
  • KranzkyContext
    • Handle state transitions (ready -> waiting -> starting -> running -> stopping -> stopped

The “HelloKranzky” sample game looks like this:

  • GameContext < KranzkyContext
    • Implement update and render
  • HelloKranzky
    • Add the GameContext to the KranzkyEngine
    • Then tell the KranzkyEngine to start at the GameContext
    • Then call Kranzky::Engine::instance()->main()

This is all very cool. The next step will be to implement a bunch of different contexts to represent all of the different states of PostalWorker, and to hook them up to implement the click-through storyboard that I mentioned previously (and which I was hoping to have done by this update). I’ll likely find a few bugs in the implementation so far, as the storyboard will make use of stacked contexts with transitions as they start and stop. But that’s all good!

One Trackback/Pingback

  1. Sonic 4, 2D is Cool Yet Again | WeCharts.com on Wednesday, February 10, 2010 at 23:04

    [...] Postal Worker 10 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*