home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness & More!
/
Virtual.Reality.Madness.And.More.1994.Disk1.iso
/
vrstudio
/
manual
/
ch14.txt
< prev
next >
Wrap
Text File
|
1993-08-12
|
11KB
|
371 lines
________________________
Virtual Reality Studio
Part 14
________________________
Studio Game tutorial
This tutorial for the Virtual Reality Studio covers the beginning
of the Virtual Reality Studio Game.
In Area 001 (the starting area) there is a collection of colored
boxes. These all have the same condition associated with them. The
yellow box, for example, is CUBOID 018, and has the following
condition:
IF SHOT? starts the IF/THEN statement, so if the box
is shot...
THEN INVIS (18) then make the box invisible
SOUND (5) add a sound effect to coincide with the shot
EXECUTE (45) executes the conditions of Object 045
ENDIF
The condition of OBJECT 045 allow the revelation of the hidden
doorway. It is important to note that object 045 is never visible
and is used to store the following routine which can be used by all
the colored cuboids in front of the hidden doorway.
IF INVIS (17) these lines are asking if all the boxes have been
AND INVIS (18) shot, i.e. made invisible
AND INVIS (19)
AND INVIS (20)
AND INVIS (21)
AND INVIS (22)
THEN VIS (16) and if they have been then make the secret door
LOOP (6) visible sets up the loop counter
TOGVIS (16) this is to toggle the visibility of the door
SOUND (3) waits for 1/60 of a second
WAIT
SOUND (1)
WAIT the two wait commands count for 2/60 of a second
WAIT
AGAIN repeats the loop 6 times
ENDIF
From the LOOP (6) command to the end of the condition above, the
door will have been flashed 6 times by toggling the visibility.
Because the loop is executed an even number of times the door is
visible when the loop has been exited.
The door behind the boxes is object 016 and has, like all other
doorways, the following condition:
IF COLLIDED?
THEN GOTO (1,12) so you go to area 12 if you go through the door
ENDIF
We are now at AREA 012. The entrance position has been defined
using the EDIT ENTRANCE option from the top of the screen. This
means that when we collide with the object 016 (the door), we enter
area 12 at position 7932,5050,6699.
It is possible to travel along the walkway until you get to a
series of cuboids that move to and fro blocking your path. The
first of these is the blue cuboid 009. This has the following
condition:
IF COLLIDED?
THEN SOUND (5)
ADDVAR (10,V11) adds 10 to variable 11 (number of times shot)
This effectively causes damage to the player.
ENDIF
By examining the attributes on cuboid 009 we see that it is created
as moveable and start its animation from a position 7580,
5120,6040. The animation for this object is as follow:
INCLUDE (9) includes object 009, i.e. the blue cuboid
START to start the animation
LOOP (10) telling the program to do the next command 10 times
MOVE (-50,0,0) moves the cuboid 50 units in X direction
AGAIN repeats the loop
LOOP (10) creates a new loop
MOVE (50,0,0) moves the cuboid in the opposite direction
AGAIN repeats the loop
RESTART tells the program to start the animation again
Once we get past the cuboids we see a pyramid (PYRMID 018) which
travels up and down on a green elevator (CUBOID 016). The
condition for PYRMID 018 is :
IF ACTIVATED? if this object is activated
THEN INVIS (18) then make it disappear
PRINT ("YOU FIND SOME ROPE")
SETVAR (25,V35) V35 is a frame counter
SOUND (4) adds a sound effect
SETVAR (1,V42) this sets a marker to say we have the rope
ENDIF ends the IF/THEN statement
The value of Variable 35 has been set at 25. The general condition
number 2 will count down this variable on every frame update until
it reaches 25. When V25 reaches the value of 2 (after 25 Frames)
the message area is cleared.
Now go back to Area 001 by using the GOTO AREA command from the
pull down menus at the top of the screen. Move round to RCTNGL 015
which acts as a doorway on the outer wall. The conditions for
RCTNGL 015 are:
IF COLLIDED? i.e., you collide with this object
THEN GOTO (1,4) then the program takes you to entrance 1 of area 4
ENDIF this ends if the statement started two lines above.
So by colliding with this door (RCTNGL 015 ) then we go to Area 4.
Look around this area, on the far wall you will see a red triangle
and a slot. The red triangle is TRNGL 046. The conditions for this
are as follows:
IF ACTIVATED?
THEN IF VAR=?(V45,0) v45 is set to 1 the security pass is held.
THEN PRINT ("ACCESS DENIED:PASS REQUIRED")
SOUND (3)
SETVAR (20,V45) Primes the clear message window
ELSE PRINT ("++ ACCESS GRANTED ++)
SET VAR (10,V35) clears message window in ten frames this
makes
LOOP (6) the sound happen 6 times
SOUND (4)
DELAY (4)
AGAIN
SOUND (1)
INVIS (46) remove the red triangle
VIS (47) replace by a green triangle
INVIS (41) removes block so you can get to the
shuttle
ENDIF
ENDIF
The next line to the triangle is 049 RCTNGL, and the condition is
simply:
EXECUTE (46) this executes the condition of object 046 which
is the red triangle mentioned above.
If we now go back to AREA 001 (the starting area) we can make our
way to AREA 003. Firstly, we have to go to RCTNGL 024 which acts as
another doorway by using the following condition:
IF COLLIDED?
THEN VIS (9,11) These following lines make visible the three
VIS (10,11) pyramids and sensors so that if they have
VIS (11,11) been previously shot and made invisible
VIS (14,11) then they can be brought back into action
VIS (15,11)
VIS (16,11)
GOTO (1,11) go to entrance 1 of area 11
ENDIF
The GOTO statement above took us to AREA 011, a long tunnel. Along
the top of the tunnel are three laser-shooting pyramids, the first
of which is PYRAMID 011. This pyramid has the following conditions:
IF SHOT? if the pyramid is shot
THEN INVIS (11) then make it (i.e. object 11) invisible
SOUND (1) adds a sound effect
ADDVAR (50,V34) adds 50 to the score
ENDIF ends the IF/THEN statement
Once we get past the shooting pyramids then at the end of the
tunnel we see another door, QUAD 004. Once again this has a simple
condition to take us to another area:
IF COLLIDED? if we collide with QUAD 004
THEN GOTO (1,3) then go to area 3
We are now in AREA 003, the cliffs scene. Under the palm tree is a
block of gold PYRAMID 058. This has the following conditions, and
shows how to control your inventory:
IF ACTIVATED?
THEN PRINT ("YOU FIND A GOLD BAR")
SOUND (4)
SETVAR (15,V35) Primes the message clear counter
ADDVAR (1,V33) adds 1 to number of gold found (instrument3)
ADDVAR (300,V34) adds 300 to the score
INVIS (58) makes the object invisible as we have picked
it up
After exploring the cliffs we find a small boat floating on the
sea. If we walk onto the boat (object 051) a new condition is
activated:
IF COLLIDED?
THEN SETVAR (1,V250)
SETVAR (0,V249)
ENDIF
Variable 250 is used later on the check if the player is on the
boat, 1 is yes, 2 is no. In addition V249 is set to 1 the player is
in the water or to 0 if not.
The engine on the boat is PYRAMID 055. Activating this executes
object 041. Object 041 is actually always invisible, it has just
been used to store a set of conditions that actually get the boat
moving:
IF ACTIVATED?
THEN IF VAR=? (V250,1) this is asking if player is on the boat
PRINT ("YOU START THE OUTBOARD MOTOR")
DELAY (25)
SETVAR (25,V35)
IF VAR<?(V0,3500) checks player's position in relations to
cliffs
THEN START ANIM (2) starts animation 2 (see below)
INVIS (56)
VIS (38)
ELSE INVIS (38)
VIS (56)
START ANIM (4) starts animation 4 (see below)
ENDIF
ENDIF
ENDIF
Animation 2 moves the boat to the lighthouse and runs as follows:
INCLUDE (38)
START
VIS (57)
INVIS (50) invisible block that detects if the player is
off the boat
SETVAR (V0,V252) copy the view point, X, Y, Z coordinates
into....
SETVAR (V1,253) V252, V253, V254
SETVAR (V2,254)
MOVETO (825,41,1880) make sure the boat is at starting position
END render the frame image
LOOP{ (154)
ADDVAR (31,V252) Add 31 to the stored X coordinates
ADVDVAR (30,V254) Add 30 to the stored Y coordinates
SETVAR (V354,V1) and update viewpoint position. This effectively
SETVAR (V254,V2) stops the player from walking off the moving
boat
MOVE (31,0,36) move boat along with viewpoint
AGAIN repeat loop
INVIS (57) make the hidden bar of gold invisible
STOPANIM (2) ends the voyage
RESTART
The bar of gold is made invisible since you can only pick it up
while on the boat.
Animation 4 is the opposite of Animation 2:
INCLUDE (56)
START
VIS (57)
SETVAR (V0,V252)
SETVAR (V1,V253)
SETVAR (V2,V254)
MOVETO (5599,41,6500)
END
LOOP(154)
SUBVAR (31,V252)
MOVETO (5599,41,6500)
END
LOOP (154)
SUBVAR (31,V252)
SUBVAR (30,V254)
SETVAR (V252,VO)
SETVAR (V253,V1)
SETVAR (V254,V2)
MOVE (-31,0,-30)
AGAIN
VIS (50) make visible the block the that detects if player
INVIS (57) wants to climb because the boat has stopped
STOPANIM (4) moving
RESTART
GAME VARIABLES
--------------
The following is a list of all the game variables:
V11 Energy, i.e. number of times the player has been shot
V33 The number of gold bars collected
V34 Score, 0 -99995
V35 Text Timer for general condition. If it equals 1, then clear
the text window
V38 Cash and Grab counter (frames)
V39 Cash and Grab counter
V40 Game State - 0 playing
1 - Lose (Time out)
2 - Lose (Energy out)
3 - Lose (Fell too far)
4 - Lose (Drowned)
5 - Win
6 - End game sequence
V42 Rope Carried? 0 = No, 1 = Yes
V44 Key Carried? 0= No, 1 = Yes
V45 Exit Pass Carried? 0 = No, 1 =Yes
V50 Loop Variable (for general use)
V51 Frames spent in the sea. If =50 then blackout and go to the
desert island. if >75 then drown.
V53 X Coordinate at the Beachhead when going to the desert
island.
V54 Inventory list indicator 0 - Not showing
1 - First object
2 - Second object, etc.
V55 Object carried counter for inventory list
V56 Inventory Request
0- Not requested
1 - Requested
2 - Currently showing
V57 In Sea (Desert Island) 0 = No, 1 = Yes
V58 Number of frames spent in the sea
V61 Giant Nose Shot? 0 = NO, 1 = Yes
V247 Speed Trap - 0 = Off, 1 = On
V248 Cheat On? 0 = No, 1 = Yes
V249 Used to check whether the player is in the sea or not,
0 = No, 1 = Yes
V252 X Viewpoint position, used for locking out movement
when animating the viewpoint in Area 003. Same for
V253 and V254
V253 Y Viewpoint position
V254 Z Viewpoint position
*** END ***