Programming a quiz

I have some students who are programming a game and they want to insert a quiz. They are looking at If/Then and If/Then/Else, but wanted to know if there are other ways

My students just gave me more info. They want the player to select from a list of sprites as to “who done it”. If they guess wrong, then… If they guess right, then… Any programming help would be appreciated. Thanks!

You might want to try the story extension…

Use arrays! They are basically lists! You can store numbers, sprites, booleans, text, tilemaps, images, and so much more!

Using “overlaps” is probably the quickest way to do this! You can have the player control a cursor of some kind with the “move mySprite with buttons” block, and check if the cursor is overlapping the correct quiz answer using this overlaps block:

Here’s an example game doing this:

Alternatively, they could look into using the “Custom Menu” extension: https://github.com/riknoll/arcade-custom-menu

You can paste this URL into the search box on the “Add Extension” page to add it to a project, and it will provide a variety of blocks for creating menus, which could be used to design a quiz. Feel free to post any followup questions here, we’re happy to help!

1 Like