Algorithm 1. The “Guliu Guliu” game performed on the proposed interactive device. |
Input: |
(1) a “waiting time” constant Twait; |
(2) three nostalgic songs and their lengths; |
(3) the trailers, the lyrics, and the corresponding music segments of three songs. |
Output: graphic pictures and videos shown on the display screen like those listed in Table 3. |
Steps. |
//Stage 1: initialization ― |
Step 1: //Theme 1: “Game initialization” (inviting an action)
|
ask the user to press the start button to start the game by text and voice messages. |
Step 2: //Theme 2: “Log in” (inviting an action)
|
ask the user to tap his/her ID card on the ID sensing area by text and voice messages. |
//Stage 2: inviting the user to select a song ― |
Step 3: //Illustrating how to select a song, inviting the user to do it, and playing the trailer of the selected song
|
-
3.1
teach the user how to select a song by rotating a ball with its color identical to that of the
desired-song title by displaying a text message and a sample song title;
//Theme 3: “Select a song” (teaching)
-
3.2
set the initial time To according to the system timer;
//To is used for computing the total time used by the user to complete a round of the game
-
3.3
perform the following actions within a time duration of Twait seconds:
-
(a)
ask the user by text and voice messages to select a song from the input three displayed
on the screen as taught above in Step 3.1; //Theme 4: “Select a song” (inviting an action)
-
(b)
if the selected song is correct, then
//Theme 5:
“play the trailer of the selected song” (demonstration)
else
go to Step 3.3 to ask the user to redo the selection;
-
3.4
go to Step 1. //Restarting the game because the user fails to select a song within Twait seconds
|
//Stage 3: guiding the user to play the selected song one lyric after another ― |
Step 4: //Illustrating how to play the song one lyric after another and inviting the user to do as illustrated
|
-
4.1
teach the user how to play the selected song one lyric after another in the following way via
text and voice messages as well as a short demonstration video:
//Theme 6: “Play a song lyric” (teaching)
-
4.2
for each lyric of the selected song, do:
//Theme 7: “Play all song lyrics” (inviting action and demonstration)
-
(a)
display the lyric with its text randomly assigned a color and ask the user to act as
taught above in Step 4.1;
-
(b)
if the user does not select a ball within a time duration of Twait seconds, then go to
Step 1 to repeat the entire process;
end if;
-
(c)
if the selected ball is correct, then
if the ball is not rotated for a complete circle yet, then perform the following
|
end if;
|
else
|
go to Step 4.2(a); |
end if; |
end for; |
//Stage 4: ending ― |
Step 5: //Theme 8: Ranking of performances (illustration)
|
-
5.1
set the ending time Te according to the system timer;
-
5.2
compute the total game-running time as Ttotal = Te − To, normalize it as Tnormal = Ttotal/Tk where
Tk is the length of the selected song;
-
5.3
rank the user’s performance according to the value of Tnormal based on the criterion: “the
shorter the normalized game-running time, the higher the rank”;
-
5.4
show the ranking result on the screen.
|
Step 6: while the game is not restarted do: //Theme 9: Play the selected song (demonstration)
|
play the entire melody of the selected song; |
//Playing repeatedly the entire selected song if the start button is not pressed
|
end while; |
Step 7: go to Step 1. //Starting the game from the beginning again
|
//End of the algorithm
|