Free Random Dice Board Game
Nov 11, 2016
Hi All!
I help lead the St. Louis Articulate Storyline Special Interest Group (SIG), and I created this "Race to the Rocket" random dice board game to present at a recent session. Here's the Race to the Rocket demo if you'd like to take a look.
From a game perspective, it's pretty straightforward. You click to roll the die, a random number is generated (using JavaScript), the game piece advances that many spots on the board and a random question is drawn from the question pool. Whether you get the question right or wrong, you still get to roll again, but you'll reduce your fuel supply with each wrong answer. If you deplete your fuel supply, you'll have to start over.
Since I've gained so much from all the wonderful people in this community, I wanted to provide the full Storyline 2 source file to share with everyone. You can update the question text and use it as it is, or you could build upon it to make playing more complex (only move the game piece forward after a correct answer, move backward for incorrect answers, etc.).
Note: I had to create alternate graphics for the download version. If you want the original graphics, you can purchase them on Fotolia.
Hope this helps, and let me know if you have any questions. Cheers!
44 Replies
Great demo!
Hi Diana,
I must learn JavaScript, your game is really cool!
I downloaded the source. I will work on it to understand the interaction better. I'm sure I will have a lot of questions while working on it and here is the first question;
- Is it possible to roll the dice faster?
Thanks again.
Hi Ridvan, thanks so much for your kind words! The dice roll is just a Spin Animation on the audio (sound of dice rolling) layer. I timed it to go with the audio, but you could certainly adjust it to make it faster if desired.
As for the JavaScript to generate a random number, I found that here on the forums :-) but I've also included a screen shot.
Absolutely let me know if you have any other questions - I'm happy to help however I can.
Hi Diana,
I really like your game, it's quite imaginative!
I have one question, though: Is there any control, how many questions are asked? Because, hypothetically, one could roll only sixes and then they would have to answer far less questions, am I right?
Regards,
Paul
Hi Paul - thanks so much for your note!
As to your question, yes, as it's built now, they would have to answer fewer questions if they rolled a six each time. On the flip side, they would have to answer a lot more questions if they rolled all ones and twos.
You could certainly build in a minimum number of questions that had to be answered, and you could also build a maximum number of questions if that fit the type of course or quiz you wanted to give learners. To do this, you would need to add the appropriate variables and triggers to the course.
Hope this helps!
This is neat Diana, I recently created an interaction for a client in which the learner had to "roll" a die 7 times and predict the outcome for each roll. So the rolls had to be random as well. I noticed in your example the JS you are using will generate numbers from 0 to 5. If you modify the code as shown in the attached image, the random numbers generated will from 1 to 6.
Hi Nancy - thanks for sharing the JavaScript to generate a random number from 1-6. I knew it existed, but I'm not a JavaScript expert and I didn't have the time to go looking for it.
I really appreciate you sharing that bit!
Hi Diane - when I try to view your demo or source file I'm shown this:
Does this happen to anyone else?
Well... That's not very nice.... I'm not sure if it has to do with the traffic on that link or what else is causing the problem, but it seems to be an issue with Chilp.It.
HERE'S THE DIRECT LINK TO THE DEMO HOSTED ON MY CLOUDBERRY ACCOUNT (AMAZON S3)
HERE'S THE DIRECT LINK TO THE DOWNLOAD, TOO.
Hope this helps! Cheers - and thanks for the heads up on the error.
Just a quick note - I updated the links in the original post - all should be working now!
Hi Diana! This such an awesome game! I'm sorry we missed it earlier when you shared. I'll get it posted to our examples hub.
It was really great meeting you last week at ATDTK! I'm glad I got to meet the amazing designer behind all the fantastic elearning examples!
Diana, this is so fantastic! Thank you for sharing. I can't wait to "dissect" it to learn how you developed each part.
Thanks David - it was awesome meeting you - thanks so much for all the time you spent indulging my inner Fan Girl and talking with us!
This is fantastic, thank you very much for sharing this. This is exactly what I needed to help create a random dice roll game :)
Thanks Diana - It's very creative and fun to play. So many possibilities wit this game, and works fantastic. Thank you for sharing!
Thanks Rick! So glad you like it!
This is my first experience using a template or one with Java Script. I have 11 questions that all need to present themselves during the process of roll-question show. In testing, I find that several are presenting themselves more than once and some not at all. Is there a way to ensure that all 11 are seen by the student? I could care less about what order they are shown, just that they are. Thanks for the support.
Yes. You can use a javascript array and filter it for answered questions. See my post here:
https://community.articulate.com/discussions/building-better-courses/trivia-game-using-variables-and-javascript-to-remove-answered-questions-from-the-deck
Also, feel free to contact me directly if you have any questions about it.
Hi Karina - thanks for your note.
If you really need to show a set number of questions, you will probably have to modify this project quite a bit, and in the end, it might be better to use a different template or example.
Randomizing the dice roll means that you never know how many questions someone will have to answer in order for them to get to the end. And playing a board game where the dice rolls aren't random (every time you play you get question1 on the first roll, question2 on the second roll, etc.) defeats the purpose of playing a realistic game in the first place
That said, if you want to keep this theme, in order to ensure your learners see all 11 required questions, you'll have to
Hopefully others in the community will chime in with ideas and answers for you. Take care!
If you use a numeric variable for each question, you can toggle it to "0" when the user sees the question (1 view only) or when the user gets it right (keep it in the deck until they get the right answer). Once the variable representing the question has a 0 value, it can be filtered out before you make a random selection.
Here is an example of what the JavaScript would look like for 5 questions (remove the // before using).
//var player=GetPlayer();
//var nv1=player.GetVar("V1");
//var nv2=player.GetVar("V2");
//var nv3=player.GetVar("V3");
//var nv4=player.GetVar("V4");
//var nv5=player.GetVar("V5");
//var values1 = [nv1, nv2, nv3, nv4, nv5];
//var filtered1 = values1.filter(function(x) {return x>0;});
//var target = filtered1[Math.floor(Math.random() * filtered1.length)];
//player.SetVar("ShowCategory",target);
Owen, thank you so much!
So here is the java script in this course, remember I am very green (baby shoot) when it comes to Java script. Where would I make the changes to this?
I recognize the need to get some training on Java Script, and how it can be used in eLearning, but the most critical point right now is to amend this so that it works.
Thank you for any support you can provide.
[cid:image004.png@01D27C74.397364C0]
Sincerely yours to count on,
[22+Logo+for+Email+Signature+001]
Karina Souza, CMC, CRMS, CLA
Instructional Designer
National Corporate Trainer
10500 Kincaid Drive
Fishers, In 46037
317.537.3810
Fax: 317.537.4810
karina.souza@freedommortgage.com
*This e-mail (including any attachments) may contain information that is private, confidential or protected by other legal privilege. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you received this e-mail in error, please delete it from your system without copying it and notify sender by e-mail, so that my records can be corrected.
CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you are not the intended recipient, please contact the sender by reply e-mail, delete this email and destroy all copies of the message.
Karina, I sent you an email. Looking forward to your response back with additional info.
~ Owen
Update: Ignore that, I have your email. :)
Hi Owen,
Did you receive the email that I sent with the V2 course attached?
It was going to what looked like a personal email - not this one.
Sincerely yours to count on,
[22+Logo+for+Email+Signature+001]
Karina Souza, CMC, CRMS, CLA
Instructional Designer
National Corporate Trainer
10500 Kincaid Drive
Fishers, In 46037
317.537.3810
Fax: 317.537.4810
karina.souza@freedommortgage.com
*This e-mail (including any attachments) may contain information that is private, confidential or protected by other legal privilege. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you received this e-mail in error, please delete it from your system without copying it and notify sender by e-mail, so that my records can be corrected.
CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you are not the intended recipient, please contact the sender by reply e-mail, delete this email and destroy all copies of the message.
This post was removed by the author
Karina, I made the following updates to your file and sent it back:
1) The file wasn’t playing for me until I removed the audio from slide 1 so be sure you add it back
2) I duplicated the question slides into a new scene and deleted the question bank entirely because you will be using JavaScript to select the questions
3) I added 11 new numeric variables (1 for each question). They are all in the same format Q01 has a value of 1, Q02 has a value of 2, etc.
4) On slide 4, I added a 2nd JavaScript trigger on the Audio-Java Layer. The script pulls in the values from the new variables I added, filters out any with a 0 value, and then makes a random selection from the remaining array of values. This determines which question will be shown. (see my example above in a prior response)
5) I updated the destination based on the new JavaScript on each of the 6 random dice layers and deleted the extra logic
6) I added an action on each of the success layers for the questions. On Q1, the success layer sets the variable Q01 = 0. This effectively removes any questions a person has answered correctly from the question deck. Because I did not add this same action on the failure level, a student will see questions they previously missed again and have another chance to answer them correctly. If you want them to see each question once and only once, you should duplicate this action on each of the failure levels or just move it to the base layer of each question.
A word of caution with this approach. Your game board has 40+ spaces. Therefore, it is possible that a person could roll enough low numbers and get all of their questions right effectively running out of questions before they reach the goal. I would suggest adding more questions or shortening the board.
If you add more questions, you will need to add variables, update the java, and add actions to each of the dice layers. I can help you through it if needed.
This discussion is closed. You can start a new discussion or contact Articulate Support.