home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Homebrewer's Handbook / vr.iso / vr386 / rides / rides.wld < prev    next >
Text File  |  1996-03-19  |  7KB  |  229 lines

  1. #
  2. # RIDES.WLD
  3. #
  4. # amusement park, demonstrating animation stuff
  5. #
  6. # Created by Dave Stampe (dstampe@sunee.uwaterloo.ca)
  7. # for "Virtual World Creations", published by the Waite Group
  8. #
  9.  
  10. loadpath rides
  11.  
  12. hither            10    # anything closer than this gets clipped
  13. yon         20000000    # anything farther than this doesn't get rendered
  14.  
  15. start 0,1200,0 0,0,0 2
  16.  
  17. camera 2 0 20000 0 90 0 0
  18.  
  19.  
  20. ambient 80
  21. light 1000,100000,1000 0
  22.  
  23. skycolor    0xad
  24. groundcolor 0x5d
  25.  
  26. surfacedef cobble    239
  27.  
  28. surfacemap roadcolors
  29. surface 1 cobble
  30.  
  31.  
  32. # Splits and associated surfaces:
  33.  
  34. # split 0,0,0 0,1,0        0   # 0  (floor plane)
  35.  
  36. # Ferris wheel splits
  37.  
  38. split 40000,11000,1050 0,0,1
  39. split 40000,11000,2150 0,0,1
  40. split 40000,11000,5250 0,0,1
  41. split 40000,11000,6350 0,0,1
  42.  
  43. endsplits
  44.  
  45.  
  46. # Areas:
  47.  
  48.  
  49. # A midway road:
  50.  
  51. object floor   40,1,20  0,0,0   8800,0,6000     0  roadcolors fixed
  52. object floor   40,1,20  0,-45,0 12800,0,6000    0  roadcolors fixed
  53. object floor   40,1,20  0,-90,0 15628,0,8828    0  roadcolors fixed
  54. object floor   400,1,20 0,0,0   13628,0,12828   0  roadcolors fixed
  55.  
  56. # some trees:
  57.  
  58. object tree2     12,12,12        0,0,0     800,1,12000   0
  59. object tree2     18,18,18        0,0,0   -2800,1,14000   0
  60. object tree2     33,26,30        0,0,0   11200,1,15000   0
  61.  
  62. # A big fir tree:
  63.  
  64. object fir2 1,1,1  0,0,0  16000,0,-1380 256 . fixed
  65.  
  66. some miscellaneous object:
  67.  
  68. object ball6    6,6,6        0,0,0   4200,1000,10000   0
  69. object octframe 8,15,20 0,0,0 3000,1500,5000 0
  70.  
  71. include ball.ani  # the living ball thing
  72.  
  73. # Ferris wheel
  74.  
  75. object fwsppt     100,100,100 0,0,0 40000,0,0         256 . fixed
  76. object fw1=fwside 100,100,100 0,0,0 40000,11000,1100  256
  77. object fcar1=fwcar 30,30,30 0,0,0   4100,10000,1100   256 . fw1
  78. object fcar2=fwcar 30,30,30 0,0,0   -4100,-10000,1100 256 . fw1
  79. object fwside     100,100,100 0,180,0 0,0,5200        256 . fw1
  80. object fwsppt     100,100,100 0,0,0 40000,0,6400      256 . fixed
  81. polyobj 2 0x00f8 40000,11000,1000 40000,11000,6400
  82. polyobj 4 0x11ff 36000,0,2100 36000,0,5300 44000,0,5300 44000,0,2100
  83.  
  84. animation 150  # turn ferris wheel
  85.  state a
  86.   do   fw1=step(x,x,x 0,0,-15)[][]
  87.   do fcar1=step(x,x,x 0,0,15)[][]
  88.   do fcar2=step(x,x,x 0,0,15)[][]
  89.  
  90. animation 3           # ride car 1
  91.  state wait_in          # wait for car and passenger
  92.   do fcar1=postest(36000,-3000,2100 44000,5000,5300)  [exit][]
  93.   do sensor(36000,-3000,2100 44000,3000,5300)[exit][]
  94.   do fcar1=attach(1) [state=wait_inout]
  95.  state wait_inout       # wait for car to leave
  96.   do fcar1=postest(35000,x,x 45000,8000,x) [state=in][]
  97.  state in               # wait till car down, no passenger
  98.   do fcar1=postest(37000,-3000,2100 43000,5000,5300)  [exit][]
  99.   do sensor(32000,x,1000 40000,x,7300)[][exit]
  100.   do fcar1=attach(0) [state=wait_out]
  101.  state wait_out         # wait for car to leave
  102.   do fcar1=postest(30000,x,x 50000,8000,x) [state=wait_in][]
  103.  
  104. animation 3           # ride car 2
  105.  state wait_in          # wait for car and passenger
  106.   do fcar2=postest(36000,-3000,2100 44000,5000,5300)  [exit][]
  107.   do sensor(36000,-3000,2100 44000,3000,5300)[exit][]
  108.   do fcar2=attach(1) [state=wait_inout]
  109.  state wait_inout       # wait for car to leave
  110.   do fcar2=postest(35000,x,x 45000,8000,x) [state=in][]
  111.  state in               # wait till car down, no passenger
  112.   do fcar2=postest(37000,-3000,2100 43000,5000,5300)  [exit][]
  113.   do sensor(32000,x,1000 40000,x,7300)[][exit]
  114.   do fcar2=attach(0) [state=wait_out]
  115.  state wait_out         # wait for car to leave
  116.   do fcar2=postest(30000,x,x 50000,8000,x) [state=wait_in][]
  117.  
  118.  
  119. # balloon ride
  120.  
  121. object balloon=balloon 50,50,50 0,0,0 18000,4500,10000 0
  122. polyobj 4 0x11ff 18000,0,12000 22000,0,12000 22000,0,8000 18000,0,8000
  123.  
  124. animation 1    # balloon ride control
  125.  state wait_in
  126.   do sensor(18000,-1000,8000 22000,4000,12000)[bal=0 exit][bal=2]
  127.   do balloon=attach(1) [state=wait_end]
  128.  state wait_end
  129.   if (bal=1) balloon=attach(0) [state=wait_out balloon=0]
  130.  state wait_out
  131.   do sensor(17000,-1000,7000 23000,4000,13000)[state=wait_in][]
  132.  
  133. animation 150   # balloon ride move
  134.  state wait_in
  135.   if (bal=2) set[state=up]
  136.  state up
  137.   do balloon=step(x,2000,x x,x,x)[][]
  138.   do balloon=postest(x,0,x x,40000,x)[state=down][]
  139.   do balloon=selected(1)[][state=down]         # click to abort
  140.  state down
  141.   do balloon=step(x,-2000,x x,x,x)[][]
  142.   do balloon=poslimit(x,4500,x x,x,x)[state=wait_in bal=1][]
  143.  
  144.  
  145. # A precessing cone merry-go-round ride:
  146.  
  147. segment segspin=world 7500,-100,1400 13,0,0
  148. object  conespin = cone8  4,8,4  0,0,0  0,300,0   0 . segspin
  149.  
  150. animation 200
  151.  state a
  152.     do segspin=step(x,x,x x,100,x)[][]
  153.     do conespin=step(x,x,x x,-150,x)[][]
  154.  
  155. animation 10    # capture viewpoint
  156.  state off
  157.   do sensor(5500,-5000,-500 9500,5000,3500)[][state=goon]
  158.  state goon
  159.   do poptext(0.5) Welcome aboard!
  160.   do conespin=attach(1)[state=on]
  161.  state on
  162.   do sensor(5000,-5000,-1000 10000,5000,4000)[state=gooff][]
  163.  state gooff
  164.   do conespin=attach(0)[state=off]
  165.  
  166. # animation of bouncing, spinning head
  167.  
  168. object sculpbase=block 6,10,6     0,0,0    28000,1,22000  0  basecolors
  169. object mh=methead  4,4,4        0,180,0   300,1100,300    0 . sculpbase
  170.  
  171. animation 150
  172.  state init
  173.     do mh=moveto(x,1005,x 0,90,0)[state=a]    # position head
  174.  state a
  175.     do mh=gravity(0,3000,0 0,-4000,0)[]       # start bounce
  176.     do mh=step(x,x,x 0,100,0)[]               # start spin
  177.     do mh=poslimit(x,1000,x x,x,x)[state=b][] # test for end
  178.  state b
  179.     do mh=gravity(0,3000,0 0,-4000,0)[]       # same, but reversed spin
  180.     do mh=step(x,x,x 0,-100,0)[]
  181.     do mh=poslimit(x,1000,x x,x,x)[state=a][]
  182.  
  183.  
  184. # cart ride
  185.  
  186. polyobj 4 0x11ff -3000,0,36000 3000,0,36000 3000,0,30000 -3000,0,30000
  187.  
  188. segment arm=world 25000,0,14000 0,0,0
  189.  
  190. object  mc=metlcube 40,0.5,20 0,-55,0 -28000,750,14000 256 . arm
  191. object fw1=fwside 5,5,5 0,0,0   500,50,-100  256 . mc
  192. object     fwside 5,5,5 0,180,0 0,0,2200   256 . fw1
  193. object fw3=fwside 5,5,5 0,0,0   3500,50,-100 256 . mc
  194. object     fwside 5,5,5 0,180,0 0,0,2200   256 . fw3
  195.  
  196. animation 150
  197.  state fast                      # travel speed
  198.   do fw1=step(x,x,x x,x,250)[][]
  199.   do fw3=step(x,x,x x,x,250)[][]
  200.   do arm=step(x,x,x x,-15,x)[][]
  201.   do mc=postest(-6000,x,24000 6000,x,42000)[][state=slow]
  202.  state slow
  203.   do fw1=step(x,x,x x,x,75)[][]  # dismount speed
  204.   do fw3=step(x,x,x x,x,75)[][]
  205.   do arm=step(x,x,x x,-3,x)[][]
  206.   do mc=postest(-6000,x,24000 6000,x,42000)[state=fast][]
  207.  
  208. animation 2           # ride wagon
  209.  state wait_in          # wait for car and passenger
  210.   do mc=postest(-3000,x,30000 3000,x,36000)  [exit][]
  211.   do sensor(-3000,-3000,30000 3000,3000,36000)[exit][]
  212.   do mc=attach(1) [state=wait_inout]
  213.  state wait_inout       # wait for car to leave
  214.   do mc=postest(-3100,x,29000 3100,x,37000) [state=in][]
  215.  state in               # wait till car down, no passenger
  216.   do mc=postest(-2900,x,30500 2900,x,35500)  [exit][]
  217.   do sensor(-3000,x,30000 3000,x,36000)[][exit]
  218.   do mc=attach(0) [state=wait_out]
  219.  state wait_out         # wait for car to leave
  220.   do mc=postest(-3100,x,29000 3100,x,37000) [state=wait_in][]
  221.  
  222. title RIDES.WLD
  223. title carnival of rides
  224. title red areas are entry/exit zones
  225. title 29/11/92 by Dave Stampe
  226. title memory
  227.  
  228. # End of RIDE.WLD
  229.