home | products |web boards| faq | galleries | contact | about  
multimedia autorun autorun
download multimedia buy now graphics multimedia search


 

DVDlab
Home
Screenshots
Encoder
Banners

DVDlab PRO
Home
Screenshots
History

DVD-9 DL
Home

Resources
Tips & Tricks
Help

Help

Help

Help

Help

FAQ
KB Articles
History

DVD Tools
Timecode calc
Re-Aspect

Articles
H. Theater
DOF Machine
3D Video

Photo-Brush
Start here

Real-Draw
Start here

CompactDraw
Start here

PhotoSEAM
Start here

Multimedia Builder
Start here

Other tools
UltraSnap
Camera Tools

 

 

 

 


Quiz Part1
Create a Quiz on DVD for training or testing purposes


What we want: A simple Quiz that will show a screen with question and a,b,c answers. User select the answer he thinks is the correct one then next question is asked. At the end he will see the result score.

We will make it very simple. Any funky stuff can be added later, the goal of this tutorial is to give you a basic idea. Each question and a,b,c answers will be on its own menu.

First lets put some start point. This is what user will see first after loading DVD. I put this menu here even it will have only one button just in case if I need to add more things here.

The menu is set as fist play:

So far, so good. Now we will need to keep track of good and bad answers. I use GPRM1 for good answers and GPRM2 for bad answers. Obviously tracking bad answers is redundant if we keep track of good answers, but anyway, maybe it will be useful.
In the Menu 1 PRE command we will reset the score:

GPRM1 = 0
GPRM2 = 0

Now we will add a Counter List. While we can make questions called directly without any kind of list, having list is a great tip because it will make the design much more simpler, clean and universal. We can for example later shuffle the questions without worrying about links. Or add/remove questions without any big work.

Counter list is a great object for our task. Each time we call counter list, next item from its list will be called. This list will be used to call question after question. Let's link the Button (Start Quiz) with the Counter List as on the image above.

Tip: A best way to set-up button links would be through Connection window using the Draw Button links button.

If you don't know how to do this, you better learn, since soon it will become very useful....

The Questions
Each Question will be on its own menu, something like this:

For this example I created 6 questions and I named them Q1-Q6

So we have our questions. I didn't bother with any real questions here, it is just example but do you know which country has the largest consumption of beer per capita?

OK, back in reality, double click the Counter List. Now add Q1 through Q6 to the list and close.

When the list finish through all questions, it will continue with its end link. So we can create new menu called End. This will simply say End of questions for now. We will use it later for more stuff.

OK, so far we have Start that links to Counter list, 6 menus with Questions, Counter list that call next question each time it is used and end menu. Will this work? Of course not. We have to still keep track of good and bad answers and make sure each menu call the Counter list.

But first thing first. To evaluate the answers we will use two VM objects in VTS domain called Good Answer and Bad Answer.

Answers from Q1-Q6 will link to either Good or Bad VM where the score will be remember and the VM will then link back to counter list (to trigger next question). Maybe you already see the light?

The Good Answer will have only one command:

GPRM1 += 1

The Bad Answer will have also only one command:

GPRM2 += 1

First link the VM commands ends all to our Counter List. Then use the "Draw Button links" button on each Q1..Q6 to link all answer buttons to the corresponding Good or Bad VM object.

Here I have 3 answers per Question, but thanks to my arrangement, I can have 4 answers or any other number. Simply add another text to menu and link to Good or Bad VM object.

Maybe now you can appreciate the clever idea with the counter list triggering questions as opposite of having all questions link to each other with some elaborate VM script. Because all basic is done right now. We can easily add new question, or remove one (simply remove it from Counter list).

So let's see what we have so far:

Note, I added a Movie, simply because all project has to have at least one movie.
You should have pretty good idea how this thing works. This is already functional, after DVD is started we see a text Start Quiz, pressing Enter will show first Question, we need to select correct answer and press Enter which will show Question 2 etc.. After last question we will end up at the end page.

Displaying score.

While we already have the Quiz functional and it keeps track of our good and bad answers, we still don't display the score. On DVD it is not easy. We cannot make a DVD menu display dynamically something like a number. We have to use a trick.

There are many tricks we can use to display a score and I will mention few other at the end.

Since I have only 6 questions I used a clever trick where I have displayed numbers 1 to 6 on a menu and the current score number will be selected by frame.

Here is my score menu that I added and called Display.

The numbers itself are non functional, but I added a frame around each number from left to right and make each frame Invisible Normal:

It is important that you must start adding frame around number 1 then around number 2 and continue to 6 so the order will be correct.

The PRE command in this Display menu will simply select the particular frame according to the good score in GPRM1

GPRM12 = 1024
GPRM12 *= GPRM1
SetHL_BTN GPRM12
Break

Please note the Break at the end. It is important, because each menu have inserted DVD-lab Abstraction layer commands at the end which in this case we don't want to run - it will mess with our frame selection.

So the idea is that the script will simply select the frame according to the score and the result should look like this:

After the Display menu I added another menu 'Continue" which will ask us to repeat test with simple Yes/No.

Here is what I done. On the End menu where I had previously written something like End of Quiz, I added a text "See Score". I linked this text with the Display menu.

Each of the frame around number on Display menu links to the Continue menu. The Yes button on Continue menu links back to the very first Menu 1 and the No button link to a movie. The POST command on the movie is Exit. This will make the player to stop.

Let's look at the Display menu now. The number of the button (yellow, top left corner) must correspond to the number written under the frame:

Yes, this should work. But here is one funny thing. Since I basically use selection to mark my score, user can simply move the selection to another number and say, hey dude, I have Max score and I put Albert Einstein as a famous opera singer!

To prevent from this, we will disable the Auto-Route in the Display menu (open the menu and look at the top tool bar, remove the check box)

And then draw each navigation link on each direction on each button outside to an empty area. You do it like this:
Select Navigation link Up

Now click on first frame, hold and move the arrow to empty space where is no other button (for example up). Do this for frame 2,3..6
Now select Navigation link Down, draw the arrow again to empty space on every frame. Do the same for Left and right navigation links.

Done? Now none of the frame button has any navigational link. They are Traps. If you Show all Nav links, you should not see any arrow sticking from object.

The Trap button means there is no way with a remote to move from such button anywhere else. You will get 6 warning about this when you compile - you know you did it correctly if you see 6 Trap warnings.

Note: Obviously on a PC with Software DVD player you can click by a mouse on any of the frame button regardless what is set in navigational links. If your DVD is going to be played on PC and you don't want to have changeable score, you would need to make the score display different way.

Note2: I assumed that there will be score at least 1. If you make all bad answers, your score will be 0 and no button will be selected. Obviously you can include 0 as first digit and then have 7 frames. The VM on PRE will be slightly modified to increase GPRM1 by 1 as very first command in PRE.

So this is it. All is done and it now looks like this:

Alternative way of displaying score
My method of displaying score is quite clever because it doesn't involve too many new menus. On 4:3 menu you can have 36 of these buttons so eventually your highest score can be 36. However 36 buttons on one menu is a lot. Not only to look at, but also to design.

For "universal" display of this type that you can reuse over and over I would suggest to have a number matrix 4 x 4 = 16 numbers on one menu: 1...16. Then on second display menu you will start from 17, 18, 19...32. etc. You can create as many menus as you need the highest score to be. Now the PRE command of the first Display menu must be smart enough to either select the score from 1...16 or to move to display 2 etc... where each of the display in PRE will then select the proper frame (subtracted of the offset).
See the note above about 0. If you need score 0 then obviously you need to modify this and have Displays 0...15, 16...31, 32...47. I will leave this idea open as an exercise.

If the number of questions is too high, you can instead of exact score display it in scale of let say 1..5 from worst to best. You can create 5 menus, each with some description about the knowledge level, then have small script decide which menu to display according to the score in GPRM1.

There are other tricks you may try, such as a movie with chapters where each chapter is the score number and each chapter has also LinkTailPGC (also set as Splice Point in DVD-lab PRO) in the cell command (so the movie will play only the chapter, then return). You can have 99 chapters in one movie...

Now when you learnd the tricks...

After you did all the above, I have a news for you. In DVD-lab PRO 1.53 and newer there is already a function that will build all this for you.

This will ultimately build a project simillar to the one you already did, with all the bad and good VM commands and all the menu pages. But don't be angry I didn't tell you this earlier, at least you know how it is done.

Next: Part 2, Improve the Quiz to have Random non repeating questions and make it independent on the flawed RND function in VM commands.

 
© www.MediaChance.com 2000