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 5,314 Jun 26, 2010 02:36 PM
Last Post: jjslay
  How to run short animation sequences? johncmurphy 2 2,917 Oct 14, 2009 03:38 PM
Last Post: AnotherJake
  Requesting short OpenGL ES example SafariAl 2 3,719 Dec 10, 2008 01:39 PM
Last Post: SafariAl
  how to play short sounds asynchronously ishaq 1 3,715 Sep 11, 2008 10:03 PM
Last Post: AnotherJake
  Quartz game design? who_me 4 5,669 Sep 1, 2008 07:54 PM
Last Post: who_me