Friday, September 14, 2012

Getting Input

Up to this point, I haven't used the input function. I'm not sure why, I guess it never seemed terribly important. That all changed with the release of Heist!, my latest cartridge.

Once again, I've spent a good deal of time designing the graphics. This time around, there's a series of images from surveillance cameras that come into play. The idea was that being "watched" would provide atmosphere and lend a sense of urgency to various zones. At one point, there's a pop quiz, asking the player, "Which camera displayed a geocacher calling a lifeline?"

Anyway, the quiz is a good example of how to use an input. First off, I created a variable called "quizanswer" to hold the player's response. Next, I created the input itself. Called "quizinput," it's a multiple-choice question. Input creation is probably the most critical step, since that's where the question and all possible answers are entered. Finally, I created a countdown timer called "quizstart" to launch the big test.

Adding the code to control the quiz was relatively easy. The timer starts once the last surveillance image has been displayed. After 30 seconds, the timer event is triggered, displaying the question on the player's screen. If the player selects the correct answer, they get a bonus clue, helpful in locating the final geocache. If they select any other answer, a "Sorry, that's not right..." message appears and no clue is awarded.

For me, the purpose of using the input was three-fold: 1) to try a function I hadn't used before, 2) to give observant players a bonus clue, and 3) to tie the concept of the surveillance "images" together. As always, players will be the final judge.

Parting thought: Creating an input is easy, and it allows for a simple "reward" to be presented to players.

No comments:

Post a Comment