Create a quiz using Alice
Are you smarter than an 11-14 year old? Stuart Turton shows you how to create a whizzy quiz using Alice
With even the Government admitting parts of the school ICT curriculum are failing to stretch pupils far enough, there's never been a greater need for parents to give their children a helping hand - especially at the crucial Key Stage 3. That's why we've teamed up with teachers and IT education experts to create a series of fun but challenging computing tasks for school children.
Our tailor-made tutorials are designed to stretch your children's IT talents and teach them skills they won't necessarily learn at school - and maybe even teach parents a thing or two. In the third part of this series, we explain how to create a quiz in 12 simple steps.
Download and install the software
Download Alice 2.2 from the download section of www.alice.org. Pay particular attention to the unusual installation instructions. Once downloaded, open Alice, select the grass template and on the next screen click Add Objects. You'll see a series of folders. Open the Egypt folder, and add Anubis and a pharaoh. Click on the pharaoh, and in the bottom-left pane click Properties. On the box labelled Opacity, click Invisible. Now click Done.
Create a new variable
Click the button labelled "create new variable" on the right-hand side of the screen, NOT the button of the same name in the left-hand panel. Name the new variable Question. Click Other and from the dropdown menu select String. Press OK and you should see that a button labelled Question, with ABC written next to it, has appeared near the "create new variable" button.
Now left-click on the Question variable we've just created. It seems a little counter-intuitive at first, as it just looks like a block of text, but you can drag this onto the Do Nothing button in the window below. When it asks you to set a value, click default string. You should be presented with a variable box that says: "Question set value to default string more...".
Creating quiz questions
Now we're going to start creating the questions for our quiz. In the top-left of the screen, you'll see a box with the word "world" at the top. Click "world" and in the box beneath press the Functions tab. Scroll down until you see, "ask user for a string" and drag this to the "default string" section of the variable box. Click Other and type "Who won Euro 2008?" into the box. You can, of course, choose your own quiz questions.
Creating events and characters
In the Events box in the top-right corner of the screen, right-click on the "when the world starts" box and click Delete. Now create a new event and select, "when the mouse is clicked on something". Pick the character Anubis from the dropdown menu and select "the entire Anubis". In the next box, select "my first method". Now we're going to show you how to fill in the answers to your quiz.
Filling in the answers
At the bottom of the screen there's a row of buttons. Drag the "If/Else" button so that it's below the Euro 2008 question. Select the true value when asked. Drag the ABC Question button from the top of the yellow "world.my first method" pane to the true box, select Question== and then Other. Now type in the correct answer to your question, which in the case of the Euro 2008 question is "Spain".
Making Anubis talk
Click on Anubis in the World viewer and in the Details box in the bottom-left corner, click the Methods tab. Drag "Anubis say" from the list to the first Do Nothing on the If box. Click other and type "Well done" to congratulate the player on getting the answer right. Now, drag Anubis say from the list into the empty Else box. Click Other and type "Wrong answer", or something a bit more Anne Robinson-like if you want to be mean!
Drag "Anubis play sound" from the left-hand box and drop it beneath "Anubis say well done". When you're prompted, selectwhoosh1. At this stage, it's worth noting that you're free to add as many effects as you wish, from making Anubis wave, to altering the colour of the sky. Experiment. Anything you place in the "if" box will happen if the player gets the question right, and anything in the "else" box will happen if they get it wrong.
Adding a second character
Now we're going to introduce the second character in your quiz game, the pharaoh. In the top-left box click Pharaoh, and in the box beneath click Properties. Drag the opacity button beneath "play sound" and set it to 100% opaque. Click on Methods in the same left-hand box and drag "pharaoh say" beneath the Set Opacity box. When prompted, click other and type in "Talk to me next".
Setting up the pharaoh
As we did with Anubis, we want the pharaoh to ask a question when the player clicks on him with the mouse. To make this happen, you need to click World in the top-left pane and then the Methods tab in the box beneath. Click the "create new method" button and name it "pharaoh ask". You're now going to create a set of questions for the pharaoh to put to the player.
Creating the pharaoh's questions
Now repeat steps two to eight, for the pharaoh rather than Anubis, changing the question and answer to whatever you want. If you want to add new characters, click Add objects on the World viewer and add in as many as you want, making sure to create a new event for each one. Try making the questions a little harder for each new character, to raise the challenge level. Once you're finished, press Play and click on Anubis.
Carry on with Alice
That's the end of our tutorial, but by no means the end of the things you can accomplish with Alice. While we've provided a basic example of what can be done using the If/Else command, we recommend taking a look at Alice's brilliant built-in tutorials for further inspiration. You might also look out for the beta version of the Alice 3 software, which raises the graphical bar a notch.