Many arcade games make use of transitory opportunities for gaining bonus points. Gaining Bonus Point can make all the difference if you are trying to make it to to the top of the High Score table!
In Catch a Clown, bonuses might take the form of the appearance of a special clown that attracts a large number of bonus points – or penalty points – if it is clicked on. In this post, I’ll describe how to add a bonus clown to your game.
The bonus clown is a fast moving clown that appears every so often at a random location, and moving in a random direction. Clicking on the clown in the normal way gains you a generous bonus points score, to reward the fact that you managed to click on this hard to handle visitor! In the example below, the bonus clown will:
– appear half a second after the game starts;
– remain on screen for 1 second, changing direction after half a second;
– disappear for two seconds;
– reappear on screen for 1 second (changing direction after half a second);
– disappear for two seconds;
– reappear on screen for 1 second… and so on.
If the bonus clown is clicked it will disappear, and the player will receive bonus points.
To start with, duplicate the normal clown object and name the copy
obj_bonusclown. We shall modify its settings in a moment.
The appearance of the bonus clown is handled using a special controller object. If you have already added a controller object to keep tabs of the High Score, the bonus clown controller will be the second controller object in your game; we could just use a single controller object, (adding additional commands to the original control object to manage the bonus clown’s appearance as well as the high score), but for now we shall find it convenient to keep control actions for different game functions in their own controller objects.
Like the score controller object I introduced in Who’s Best? Keeping Track of High Scores, the bonus controller does not have a sprite associated with it, although it does need to be added to the main room. The bonus controller object has two events associated with it. The Create event, which is used to start a timer/alarm that will be responsible for creating instances of the bonus clown.
And an alarm event that triggers a ‘Create Instance’ action – in this case, the instance should be an instance of the Bonus Clown object. For convenience, use Alarm 2 in the controller object.
Returning to the bonus clown object, the collision event and Alarm 0 event remain the same as before, but we need to modify the other events as follows:
– if the bonus clown is clicked on, the player should receive a generous points bonus and the bonus clown should disappear rather than relocating. In the bonus clown object, modify the Left click (
Left Pressed) event actions by deleting the Jump to random and random move actions, and modify the Set score action so that 25 points are added to the player’s score:
You also need to add a Destroy Instance action (It can be found in the Objects panel of the main1 tab).
– when the bonus clown is created, we want it to start moving quickly in a random direction. Select the Create event and add a Jump to Random position action. In the
Start Moving action, use a higher speed than the original speed of the normal clown. I used a speed value of 8 for my bonus clown. We also need to add two more alarm actions, Alarm 1 and Alarm 2. Alarm 1 will destroy the instance of the bonus clown, and Alarm 2 will tell the bonus controller to start counting down to the creation of another bonus clown.
Just so we’re clear, we now have three alarms. In the original clown, Alarm 0 was responsible for changing the direction of the clown every half a second or so. It included two actions – one to change the direction of the clown to another direction, a second to reset the alarm itself. In the bonus clown, we just want Alarm 0 to change the direction once, so we can delete the reset alarm command:
Because the bonus clown will only appear on screen for a short period of time, we need to find a way of removing it after the bonus period. Alarm 1 is responsible for destroying the current object after a given time – set it to apply to the self object with 100 steps:
and then invoke a destroy action when it is called:
If you recall, Alarm 2 is associated with the bonus clown controller object. When Alarm 2 fires, the bonus clown controller object responds to the alarm and creates a new instance of the bonus clown object. We could reset Alarm 2 within the bonus controller object, but I thought I would take this opportunity to show you how we can also reset it from within the Bonus Clown object itself.
Return to the action list for the bonus clown’s Create event, and if you have not already done so, add another alarm action, this time for Alarm 2. Set the number of steps to 200, but this time apply the action to the
To summarise: Alarm 2 is used by the bonus controller to create a bonus clown; when the bonus clown is created, it resets Alarm 2 within the bonus clown controller to determine when next bonus clown will be created… got that?!;-)
Try playing your game again. How does the addition of the Bonus Clown affect the way that you play the game, if at all? Try to modify the time the Bonus Clown appears on screen, how fast it goes, how quickly it changes direction, and/or how much time elapses between consecutive appearances. How does this affect the gameplay?
Combined with the High Score feature, are you any more (or less) likely to play the game just one more time, (or keep returning to it over a period of time), compared to the version of the game that did not include the additional scoring features? Why?
How might you add a poison clown to your game that appears for a short time every so often and inflicts a penalty on the player if they click on it? As game designer, how might you try to entice, or even trick, the player into clicking on it by accident?
Even whilst the literal design of a game may stay largely the same, you will hopefully have found that by changing the game parameters the game may be be made harder or easier, and possibly more or less enjoyable to play. Modifiying colour themes can also introduce variation that keeps a game fresh over several different screens, even if it’s underlying mechanics are the same.
Many traditional arcade games have exploited these techniques to provide a series of levels within a game that provide progression through it in terms of increasing difficulty, as well as providing some sort of narrative – for example, the design of the room backgrounds may chart a journey from a village, through a wood, into a mountain cavern, out onto a grassy plain, and then into a despot’s castle – all whilst retaining the same ‘mechanical’ game design underneath.
Anyway, that’s it for Catch a Clown as far as tutorials go… I have a new game for you for the coming weekend… (That said, some of what we’ll be covering will still be applicable to Catch the Clown, so you can keep on polishing it and customising it further if you want to…:-)
Feel free to post a link to your ‘final’ version of the game – it’s good to share :-)