I’ve managed to do that in my game. Nine choices where the correct outcome is different every time and only 1 of them is correct. Sometimes the player will get it right first time, sometimes they will go through all 9 options. And I didn’t use any random elements at all! Sound good?
Well, it is actually a little too good to be true. The player definitely has the appearance of randomness and the outcome IS different on repeat plays, but it’s not actually random at all.
In my game, The Race, there is one stage where you need to choose one of 9 places to go to to continue the game. The correct outcome is different every time and very much has the feeling of randomness (if you’re lucky, you can get the right place straight away, if not, you could end up going to every location). However, I achieved this without using any random factors.
The secret was I used a timer. The truth is the outcome was predetermined by the players luck variable. Here’s the code so you can see… it’s long and probably not the most efficient way, but it works:
*comment The variable luckybird is always set to 1. The variable luckynumber is set depending on the players luck score. The l1 to l9 variables are used to stop the player choosing the same option repeatedly. After an option is selected, the corresponding l-variable is set to false.
*comment The line variable is simply used to change the location name that the player has gone to.
*temp luckybird
*temp luckynumber
*temp line
*temp l1
*temp l2
*temp l3
*temp l4
*temp l5
*temp l6
*temp l7
*temp l8
*temp l9
*set l1 true
*set l2 true
*set l3 true
*set l4 true
*set l5 true
*set l6 true
*set l7 true
*set l8 true
*set l9 true
*set luckybird 1
*comment This part sets the luckynumber variable. the higher the players luck, the lower the luckynumber is.
*if luck < 20
*set luckynumber 9
*goto taskbegin
*elseif luck < 25
*set luckynumber 7
*goto taskbegin
*else
*if luck < 30
*set luckynumber 6
*goto taskbegin
*elseif luck < 35
*set luckynumber 5
*goto taskbegin
*else
*if luck < 40
*set luckynumber 4
*goto taskbegin
*elseif luck <50
*set luckynumber 3
*goto taskbegin
*else
*set luckynumber 2
*goto taskbegin
*page_break
*comment This is text the player will see. They will initially have 9 choices of location to go to.
*label taskbegin
Your task is to find the clue which will tell you where to go next. You have a map showing 9 different objects which were created by the Nazca civilization over 1500 years ago.
One of them has been temporarily altered somehow. You need to find the correct one.
The nine choices are listed below. Which one will you instruct the pilot to fly to first?
*comment The code below shows the nine choices the player can go to. The choice the player makes is actually irrelevant. What is really being checked is the luckybird number. If the luckybird variable is the same as the players luckynumber variable, then the player has gone to the right place. If not, then it must be lower (as luckybird starts at 1 and luckynumber starts at a minimum of 2) so the player has to choose another place to go to, and the luckybird number is increased by 1. Every time the player chooses a location, the number increases by 1. Once they match, REGARDLESS of where the player has gone to, the player has ‘picked’ the right place and can progress in the story.
*label choiceoflines
*if luckybird > 1
You decide to fly to one of the other lines. Which one will you fly to now?
*goto linechoice
*else
*label linechoice
*choice
*selectable_if (l1) #The Dog
*Set line “Dog”
*set time +25
*if luckybird<luckynumber
You inspect the ${line}, but can’t see anything unusual about it.
*set luckybird +1
*set l1 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l2) #The Humming Bird
*Set line “Humming Bird”
*set time +15
*if luckybird<luckynumber
You inspect the ${line}, a beautiful picture that must have been difficult to create from the ground. However, there’s no clue here.
*set luckybird +1
*set l2 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l3) #The Heron
*Set line “Heron”
*set time +25
*if luckybird<luckynumber
You look at the ${line}, but as you fly over, you see nothing unusual about it.
*set luckybird +1
*set l3 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l4) #The Giant
*Set line “Giant”
*set time +30
*if luckybird<luckynumber
You inspect the ${line}, which looks more like an astronaut to you. However, aside from the odd name, there is nothing else unusual about it.
*set luckybird +1
*set l4 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l5) #The Hands
*Set line “Hands”
*set time +35
*if luckybird<luckynumber
You inspect the ${line}, which look more like a potted plant on it’s side. However, you can’t see anything unusual about it.
*set luckybird +1
*set l5 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l6) #The Pelican
*Set line “Pelican”
*set time +25
*if luckybird<luckynumber
You fly over the ${line}, however you can see nothing unusual about it.
*set luckybird +1
*set l6 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l7) #The Spider
*Set line “Spider”
*set time +20
*if luckybird<luckynumber
You inspect the ${line}, and while it does indeed resemble a ${line}, you can see nothing unusual about it.
*set luckybird +1
*set l7 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l8) #The Condor
*Set line “Condor”
*set time +15
*if luckybird<luckynumber
You inspect the ${line}, the largest of all the Nazca lines. Unfortunately, despite the size, you can see nothing else unusual about it.
*set luckybird +1
*set l8 false
*goto choiceoflines
*else
*goto luckytime
*selectable_if (l9) #The Monkey
*Set line “Monkey”
*set time +20
*if luckybird<luckynumber
You inspect the ${line}, which does actually look like a ${line} with it’s tail wrapped into a spiral. However, you can’t see anything else unusual about it.
*set luckybird +1
*set l9 false
*goto choiceoflines
*else
*goto luckytime
The good thing about this code is that every time the player plays, the outcome (lucky or not) reflects the players luck score in the game. Also, the outcome is different every time, so the player feels they really are guessing which place is the right place. The only downside is once you know how it’s coded (as I’ve just outlined here) you realise that it doesn’t matter where you click - you’ll get the right option after x tries regardless. Of course, the player will never know this secret