Game Development Reference
In-Depth Information
Calculating level progression
The level progression calculations describe how the difficulty will increase on each game level.
We are going to make the game play more difficult by increasing the number of circles that need
to be clicked and the growth speed of the circles. We will also decrease the maximum size of the
circles and the increase the percentage of good (blue) circles that have to be clicked before the
game moves to the next level.
Number of blue circles per level : 25 times the level number
Percent chance for a bad circle : Level number plus 9 (After level 25 the percentage is
40, which keeps the game from becoming impossible.)
Circle growth speed : .01 times the level number
Maximum circle size : 5 minus the level number, with a minimum of 1
Percent successful clicks needed to move to next level : 5 times the level number,
plus 10
Maximum number of circles on the screen : 10 times level number
Defining the basic screens needed
The basic screens will all be instances of the BasicScreen class introduced in Chapter 2. As you
might recall, this BasicScreen class allows for a button (an instance of the BasicBlitButton class)
to be displayed, which is referred to as the OK button. The screen that displays before a new level
starts ( levelInScreen ) does not need a button. It will wait for a small amount of time before
starting the next level. No button click is necessary. The basic screens follow:
Title : Contains an OK button and the text Super Click
Instructions : Contains an OK button and the text Quickly Click Blue Circles
Game over : Contains an OK button and the text Game Over
Level : Contains the text Level and the level variable (does not include an OK button)
Defining the game play variables
The game play variables are used to control the game logic and level difficulty. These are broken
up into variables that control game logic and variables needed to set the difficulty level.
The following variables pertain to the game logic :
circles : This array holds all of the current on-screen circle class instances. We will
create a custom class called Circle that will be used to create the objects in this array.
gameOver : This Boolean is set to true if the player clicks a red circle or does not click
enough circles ( percentNeeded ) on a level .
level : This variable holds the current game level.
numClicks : This one holds number of blue circles clicked by the user.
numCreated : This is the number of circles created so far this level. Circles are created
until maxCirclesOnScreen is reached.
Search WWH ::




Custom Search