hiFiveslogo.jpg

Virtuoso User Guide

Table of Contents

Introduction
Virtuoso Home Page
Making a World
The Edit Page
Navigation
Adding Single Objects
Adding the Same Object Multiple Times
Coding Behaviors
Code Buttons
Sound
Object Shortcuts
Game Shortcuts
Coding If/Then & Assigning Variables

Introduction

            This guide will provide basic procedural information for Virtuoso, a HI FIVES feature to create a video game or simulation. You can create a world and a game or simulation within that world. In this guide we use different types of text:

 Bold text - Highlights user interface elements, for example tabs, buttons and field labels.

Italic text - Emphasizes certain words and introduces key terms.

Where to learn more
            You can learn more about Virtuoso from the HI FIVES website http://ced.ncsu.edu/hifives/hilife/h5_profile.php. The FAQ link has a variety of information on installing Steam, down/uploading games, exporting and importing games, creating quizzes, and general information about running Virtuoso.

Back to Top

Virtuoso Home Page 

            There are two modes accessible from the Virtuoso home page; Edit Mode and Play Mode.

Edit mode create a world, edit, import and export games, code behaviors, and write a description for your game.

Play modeplay the game.

Your functions for this user guide will be in Edit Mode. To get back to the Virtuoso home from Edit Mode click Quit.

Back to Top

home_page.jpg

Making a World

            From the menu field click File > Create. Click the dropdown menu on the Create window and select the world you wish to use to build your game. A snapshot of the world will appear in the Preview window, then click Create. 

creat_world.jpg

Once logged into your world (use the same log-in and password as the HI FIVES website). 

  1. Click Menu and the menu bar will appear
  2. Click Game
  3. Click Other from the tab bar.
  4. Complete the following:
  • Game Author
  • Game Title
  • Game Description
  • Choose all radio buttons under Splash Screen Shows.

            This information will appear on the opening page of your game letting players and HI FIVES staff know this important information.

describe_game.jpg
  1. Click File to return to your game
  2. Click Save As

NOTE: If the game folder is not in the files field. The games folder is at C:\ProgramFiles\Steam\SteamApps\SourceMods\Virtuoso\h5\games.

  1. Type the name of your game in the file name field
  2. Click Save
  3. Click File and the Create/Edit window will go away
               

‼TIP: Save early and often! Click Save As to keep different versions of your game versus Save which will override the same version. You can rename your game for each version with the original name followed by 1, 2, 3, etc.

Back to Top

The Edit Page 

Click Menu for the edit buttons to appear or disappear.

There are six buttons on the left of the edit window:

  1. File - Create, Edit, Save, Save As, Import, and Export your game.   
  2. Code - code behaviors in your game.
  3. Guest - see the names of other players in a multiplayer game.
  4. Game - add a border to your game window, describe, and name your game.
  5. Options – not operational at this time.
  6. Quit - quit your game which sends you to the Virtuoso home page.
edit_page1.jpg

There are six buttons along the bottom of the edit window:

  1. Fly Mode - fly around your game, edit mode only.
  2. Top Down View - positions you directly above where you are standing in the game.
  3. Create an Object - add characters and objects to your game.
  4. Object Properties - view and manipulate an object’s details, i.e., location, gravity, mass, rotation, etc.
  5. Find -search location of an existing object.
  6. Help -window shows basic and advanced navigation movements.
Back to Top
 edit_page2.jpg

Navigation

            To navigate in your game use the keyboard keys:

  • W - forward
  • S - backward
  • D - to the right
  • A - to the left

Right click on the mouse and turn the mouse to turn around in the game and look up and down.

‼TIP: Click F to activate or deactivate fly mode. Fly mode is only operational in edit mode.

Back to Top

Adding Single Objects

  1. Click the Create an Object button on the bottom of the edit window to open the create object window.
  2. Click the Category drop down and choose from the list. The name of the objects and a picture of the objects for that category appear in the window.
  3. Choose a desired object by clicking the object name from the list. The name of the object appears in the name field.
  4. Change the name of the object in the name field.

IMPORTANT NOTE: To code behaviors you must be able to distinguish one object from another. The following applies to object names:

  • All objects must have a name.
  • Virtuoso will use the generic object name if you do not rename the object in the create object name drop down.
  • Names of objects are used when coding the game.
  • Names of objects cannot be changed once they have been added to the game.

 Unique object naming can be helpful when coding a behavior for that object.  For example if your game uses multiple buttons, you may want to name them in a way that helps you to distinguish them. (e.g. science_room_but_1; foyer_but_4; foyer_but_5; etc.) Behavior names may also help to distinguish objects (e.g. lightening_trigger_1; teleportplayer_button_1, etc.)

  1. Click create.
  2. Move the mouse cursor to where you want the object in the game and left click the mouse. The object will appear.

‼TIP: Open the object properties window to change the properties (location, rotation, mass, etc.) of the objects.

Back to Top
create_object.jpg

Adding the Same Object Multiple Times

  1. Click the Create an Object button on the bottom of the edit window to open the create object window.
  2. Click the Category drop down and choose from the list. The name of the objects and a picture of the objects for that category appear in the window.
  3. Choose a desired object by clicking the object name from the list. The name of the object appears in the name field.
  4. Change the name of the object in the name field.
  5. Click Create
  6. Hold down the shift key and move the mouse cursor to where you want the object in the game
  7. Click the left mouse button multiple times while holding the shift key. Continue clicking the left mouse button until all but ONE of the objects is placed.
  8. Release the shift key and click the left mouse button to place the last object.
Back to Top

Coding Behaviors

            Behaviors are coded and executed in sequence.

  1. Click the Code button. All the objects are displayed on the left. 
coding.jpg
  1. Click an object in the Object window. A list of events will display below the list of objects. The list of events are what will happen for the coded behavior to occur. For example, the event OnPlayerRadius30 means if the player is within a radius of 30 the coded behavior will occur.
  2. Click an event.
  3. Click the lower + on the right side of the Code window. The Add Behavior window displays. Confirm/choose the object in the Entity drop down.
  4. Click the Method drop down. Choose a behavior. Depending on the behavior you may need to complete the Value drop down. For example, Explode does not have a value, however FloatTo does have a value, you must choose the target you want the entity object to float to.
  5. Click ok.
add_behavior.jpg

‼TIP:  You can indirectly code for behaviors. Notice the screen shot below. The barrel is the highlighted object, OnPlayerRadius30 is the event, and canonExplode is the coded behavior. This means when the player is within a radius of 30 to the barrel, the canon will explode.

Make it a habit to Save As frequently, especially when coding behaviors.

Code for quizzes and add sound using the add behavior window.

Back to Top
modify_behaviors.jpg
Code Buttons

Up Arrow - moves the highlighted code earlier in the code sequence.
+ add behavior window appears
e edit existing code behavior
delete code behavior
Down Arrow – moves the highlighted code later in the code sequence.

Back to Top
code_buttons.jpg

Sound
   
           
Basic Instructions: If you do not have a digital audio editor you can download the open source Audacity software for free from http://audacity.sourceforge.net/Click the 1.2.6. version.

     Sound files must be recorded with specific properties. When you are ready to record sound:

  • In Audacity  choose edit- preferences, click quality tab, change default sample rate drop down to 11025 hz
  • Change default sample format drop down to 16-bit
  • Record your sound
  • Click file, export as wave.      
Back to Top
Object Shortcuts

You can Delete, Copy, access the Properties Window and Edit code for a particular object by using the following short cuts:

  1. Left click on an object
  2. Hold down the control key
  3. Center the mouse cursor on the object
  4. Right click
  5. Choose the function you want to perform
Back to Top
shortcut_objects1.jpg

Game Shortcuts

            You can Create, Create Here, Save, Save As, go to Play Map, and Quit

  1. Hold down the control key
  2. Position the mouse cursor so it is not on an object
  3. Right click and choose the function you want to perform
Back to Top
shortcut_game.jpg

Coding If/Then & Assigning Variables

Ok, here's how to get a quiz to do different things depending on whether they get the right answer. There are shorter ways to do this, but this one is the most consistent. Each quiz type requires a different type of variable, but everything else looks the same.

Multiple Choice: number
True False: bool
Short answer: string

We will start with the Multiple choice.

Step 1: Create two variables to hold 1) the correct answer and 2) the player's answer. This is a Multiple choice so these need to be number variables. *CLICK* the + sign in the TOP RIGHT to create a variable. Name the first one correctAnswer and select number from the drop down list. You can't change the default value. Do the same for playerAnswer.

The box in the top right should look have two lines:

correctAnswer number 1
playerAnswer number 1

Step 2: Assign the correct answer. *CLICK* the 'Assign' button in the bottom right. Choose correctAnswer from the drop down list. The line of code will look like this:

correctAnswer = ( 1 )

*CLICK* on the 1 and TYPE the number of the correct answer into the box. 1 if it's the first choice, 2 if it's the second, and so on.

Step 3: Assign the player's answer. *CLICK* the 'Assign' button in the bottom right. Choose playerAnswer from the drop down list. The new code will look like this:

correctAnswer = ( 1 )
playerAnswer = ( 1 )

*CLICK* on the 1 and SELECT player.QuizMultipleChoice() from the drop down list. The code now looks like this:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice() )

Step 4: Setup the quiz. *CLICK* on the player.QuizMultipleChoice, and fill out the quiz screen. The code now looks like this:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

Step 5: Save. This is the first point at which it is safe to save your progress.

Step 6: Create the If ... Then ... statement. *CLICK* the 'if' button at the bottom of the screen. The code now looks like this:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

if ( true )

{

}

else

{

}

Step 7: Setup the if expression. *CLICK* on 'true' inside of the parentheses. SELECT correctAnswer from the dropdown menu. The code now looks like this:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

if ( correctAnswer )

{

}

else {

}

*CLICK* on the right parentheses next to correct answer. Choose 'equals' from the pop-up box. The code now looks like this:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

if ( ( correctAnswer ) == ( true ) )

{

}

else

{

}

*CLICK* on 'true' inside the expression. SELECT playerAnswer from the dropdown menu. The code now looks like this:

correctAnswer = ( 1 )

playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

if ( ( correctAnswer ) == ( playerAnswer ) )

{

}

else

{

}

Step 8: Add the actions. *CLICK* a little off the margin inside the first set of brackets under the 'if'. The white line should show up there (it's a little hard to find so click around a bit). Now you can insert behaviors. The block under the 'if' is what happens if they get the quiz right, and the block under the 'else' is what happens if they get it wrong. Use the + sign on the right middle to add actions. I've added two here:

correctAnswer = ( 1 )
playerAnswer = ( player.QuizMultipleChoice(What is the airspeed vel..) )

if ( ( correctAnswer ) == ( playerAnswer ) )

{

player.QuizInformUser("Well, I guess that is right")

}

else { player.QuizInformUser("I faart in your general direction")

}

That's it your done

===============================================================================

Here's a true false quiz (notice the variables):

correctAnswer bool true
playerAnswer bool true

-------------------------------------------------------------------------------------------------------------------------------------------------

correctAnswer = ( false )

playerAnswer = ( player.QuizTrueFalse(What is the airspeed vel..) )

if ( ( correctAnswer ) == ( playerAnswer ) )

{

player.QuizInformUser("Well, I guess that is right")

}

else

{

player.QuizInformUser("I fart in your general direction")

}

-------------------------------------------------------------------------------------------------------------------------------------------------

and here's a short answer:

correctAnswer string ""
playerAnswer string ""

-------------------------------------------------------------------------------------------------------------------------------------------------

correctAnswer = ( "pink, no blue!" )

playerAnswer = ( player.QuizShortAnswer(What, is your favori...) )

if ( ( correctAnswer ) == ( playerAnswer ) )

{

player.QuizInformUser("Well, I guess that is right") } else { player.QuizInformUser("I faart in your general direction")

}

 

Back to Top