How to design short game levels

Posts: 3
Joined: 2009.12
Post: #1
I'm working on this very simple game which involves doing stuff very fast, like tapping the right buttons in a matter of time. The game is supposed to include a number of different levels, with different attributes, and different goals.

I was curious as to how the best way would be to implement different levels. At first I was thinking about having a new subclass of UIViewController and a corresponding xix-file for each level that I would switch to after one level has been completed. But say I have 30+ levels, that's going to be a lot of classes..?

Does anyone have an idea for an easy and smooth way of solving this?

Thanks in advance!
Quote this message in a reply
Posts: 1,563
Joined: 2003.10
Post: #2
Unless every level in your game has vastly, fundamentally different mechanics, the normal approach would be to implement one gameplay "engine" (as a class or set of classes) that's used for every level, and store the distinguishing features of each level in its own data file (in a format like JSON or XML). You'd parse each level file into some sort of model structure, and use it to drive the mechanism that runs your gameplay.

If there really are no unifying properties between any two of your levels, it may make sense to implement a separate class for each one, but it seems unlikely that this would be the case.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  typedef struct - lossing data on some levels at random times jjslay 6 6,538 Jun 26, 2010 02:36 PM
Last Post: jjslay
  How to run short animation sequences? johncmurphy 2 3,527 Oct 14, 2009 03:38 PM
Last Post: AnotherJake
  Requesting short OpenGL ES example SafariAl 2 4,338 Dec 10, 2008 01:39 PM
Last Post: SafariAl
  how to play short sounds asynchronously ishaq 1 4,186 Sep 11, 2008 10:03 PM
Last Post: AnotherJake
  Quartz game design? who_me 4 6,500 Sep 1, 2008 07:54 PM
Last Post: who_me