Dead Panic Developer Blog

  • Randomness in Games: Less Random Is Mo Better

    While coding the "survival" mode for Dead Panic I encountered a common situation - I had to generate random waves of enemies to confront the player. This is a straightforward exercise, right? Pick a random enemy type, a random position at the screen's edge, and launch them at the player. Hmmn, that looks more like zombies popping off of an assembly line, not proper scary waves. Okay, randomize the timing too - wait a few seconds between zombies. Hmmn again. Now we're getting some...

  • Why Use MVC for Games? A Q&A Session

    Q: Why should I use the Model-View-Controller pattern when writing games?

    A: I'm glad you asked. I'll leave a general explanation of Model-View-Controller to Wikipedia, and just concentrate on how it benefits your game project. MVC makes your game easier to write, easier to understand, and easier to update in the future.

    Q: Design patterns are just a bunch of fanboy...

  • A Simple Observer Pattern for Cocoa / iPhone Games

    I'd like to outline a simple (superior?) method for implementing the observer pattern in Cocoa, and give an example for Cocoa / iPhone games. The observer pattern is a necessity for implementing the Model-View-Controller pattern.

    Before we see the observer let's look at some code without the observer pattern. Here's a typical method from my game state  that adds a new enemy to the...