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

  1. #
  2. # RIDES.WLD
  3. #
  4. # amusement park, demonstrating animation stuff
  5. # Created by Dave Stampe, January 1993
  6. # for use with the REND386 package.
  7. #
  8.  
  9. loadpath rides
  10.  
  11. hither            10    # anything closer than this gets clipped
  12. yon          1000000    # anything farther than this doesn't get rendered
  13.  
  14. stepsize 20       # a bit faster for big world
  15.  
  16. start 0,1200,0 0,0,0 2
  17.  
  18. camera 2 37800,27000,3030 45,-65,0
  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    8,8,8   0,0,0   4200,0,10000   0
  69. object ball6    6,6,6   0,45,0   4200,800,10000   0
  70. object ball6    4,4,4   0,90,0   4200,1400,10000   0
  71. object ball6    2,2,2   0,135,0   4200,1800,10000   0
  72.  
  73. object octframe 8,15,20 0,0,0 3000,1500,5000 0 . 
  74.  
  75. include ball.ani  # the living ball thing
  76.  
  77. # Ferris wheel
  78.  
  79. object fwsppt     100,100,100 0,0,0 40000,0,0         256 . fixed
  80. object fw1=fwside 100,100,100 0,0,0 40000,11000,1100  256
  81. object fcar1=fwcar 30,30,30 0,0,0   4100,10000,1100   256 . fw1
  82. object fcar2=fwcar 30,30,30 0,0,0   -4100,-10000,1100 256 . fw1
  83. object fwside     100,100,100 0,180,0 0,0,5200        256 . fw1
  84. object fwsppt     100,100,100 0,0,0 40000,0,6400      256 . fixed
  85. polyobj 2 0x00f8 40000,11000,1000 40000,11000,6400
  86. polyobj 4 0x11ff 36000,0,2100 36000,0,5300 44000,0,5300 44000,0,2100
  87.  
  88. animation 150  # turn ferris wheel
  89.  state a
  90.   do   fw1=step(x,x,x 0,0,-15)[][]
  91.   do fcar1=step(x,x,x 0,0,15)[][]
  92.   do fcar2=step(x,x,x 0,0,15)[][]
  93.  
  94. animation 3             # ride car 1
  95.  state wait_in          # wait for car and passenger
  96.   do fcar1=postest(36000,-3000,2100 44000,5000,5300)  [exit][]
  97.   do sensor(36000,-3000,2100 44000,3000,5300)[exit][]
  98.   do fcar1=attach(1) [state=wait_inout]
  99.  state wait_inout       # wait for car to leave
  100.   do fcar1=postest(35000,x,x 45000,8000,x) [state=in][]
  101.  state in               # wait till car down, no passenger
  102.   do fcar1=postest(37000,-3000,2100 43000,5000,5300)  [exit][]
  103.   do sensor(32000,x,1000 40000,x,7300)[][exit]
  104.   do fcar1=attach(0) [state=wait_out]
  105.  state wait_out         # wait for car to leave
  106.   do fcar1=postest(30000,x,x 50000,8000,x) [state=wait_in][]
  107.  
  108. animation 3             # ride car 2
  109.  state wait_in          # wait for car and passenger
  110.   do fcar2=postest(36000,-3000,2100 44000,5000,5300)  [exit][]
  111.   do sensor(36000,-3000,2100 44000,3000,5300)[exit][]
  112.   do fcar2=attach(1) [state=wait_inout]
  113.  state wait_inout       # wait for car to leave
  114.   do fcar2=postest(35000,x,x 45000,8000,x) [state=in][]
  115.  state in               # wait till car down, no passenger
  116.   do fcar2=postest(37000,-3000,2100 43000,5000,5300)  [exit][]
  117.   do sensor(32000,x,1000 40000,x,7300)[][exit]
  118.   do fcar2=attach(0) [state=wait_out]
  119.  state wait_out         # wait for car to leave
  120.   do fcar2=postest(30000,x,x 50000,8000,x) [state=wait_in][]
  121.  
  122.  
  123. # balloon ride
  124.  
  125. object balloon=balloon 50,50,50 0,0,0 18000,4500,10000 0
  126. polyobj 4 0x11ff 18000,0,12000 22000,0,12000 22000,0,8000 18000,0,8000
  127.  
  128. animation 1    # balloon ride control
  129.  state wait_in
  130.   do sensor(18000,-1000,8000 22000,4000,12000)[bal=0 exit][bal=2]
  131.   do balloon=attach(1) [state=wait_end]
  132.  state wait_end
  133.   if (bal=1) balloon=attach(0) [state=wait_out balloon=0]
  134.  state wait_out
  135.   do sensor(17000,-1000,7000 23000,4000,13000)[state=wait_in][]
  136.  
  137. animation 150   # balloon ride move
  138.  state wait_in
  139.   if (bal=2) set[state=up]
  140.  state up
  141.   do balloon=step(x,2000,x x,x,x)[][]
  142.   do balloon=postest(x,0,x x,40000,x)[state=down][]
  143.   do balloon=selected(1)[][state=down]          # click to abort
  144.  state down
  145.   do balloon=step(x,-2000,x x,x,x)[][]
  146.   do balloon=poslimit(x,4500,x x,x,x)[state=wait_in bal=1][]
  147.  
  148.  
  149. # A precessing cone merry-go-round ride:
  150.  
  151. segment segspin=world 13,0,0 7500,-100,1400
  152. object  conespin = cone8  4,8,4  0,0,0  0,300,0   0 . segspin
  153.  
  154. animation 200
  155.  state a
  156.     do segspin=step(x,x,x x,100,x)[][]
  157.     do conespin=step(x,x,x x,-150,x)[][]
  158.  
  159. animation 10    # capture viewpoint
  160.  state off
  161.   do sensor(5500,-5000,-500 9500,5000,3500)[][state=goon]
  162.  state goon
  163.   do poptext(0.5) Welcome aboard!
  164.   do conespin=attach(1)[state=on]
  165.  state on
  166.   do sensor(5000,-5000,-1000 10000,5000,4000)[state=gooff][]
  167.  state gooff
  168.   do conespin=attach(0)[state=off]
  169.  
  170. # animation of bouncing, spinning head
  171.  
  172. object sculpbase=block 6,10,6     0,0,0    28000,1,22000  0  basecolors
  173. object mh=methead  4,4,4        0,180,0   300,1100,300    0 . sculpbase
  174.  
  175. animation 150
  176.  state init
  177.     do mh=moveto(x,1005,x 0,90,0)[state=a]    # position head
  178.  state a
  179.     do mh=gravity(0,3000,0 0,-4000,0)[]       # start bounce
  180.     do mh=step(x,x,x 0,100,0)[]               # start spin
  181.     do mh=poslimit(x,1000,x x,x,x)[state=b][] # test for end
  182.  state b
  183.     do mh=gravity(0,3000,0 0,-4000,0)[]       # same, but reversed spin
  184.     do mh=step(x,x,x 0,-100,0)[]
  185.     do mh=poslimit(x,1000,x x,x,x)[state=a][]
  186.  
  187.  
  188. # cart ride
  189.  
  190. polyobj 4 0x11ff -3000,0,36000 3000,0,36000 3000,0,30000 -3000,0,30000
  191.  
  192. segment arm=world 0,0,0 25000,0,14000
  193.  
  194. object  mc=metlcube 40,0.5,20 0,-55,0 -28000,750,14000 256 . arm
  195. object fw1=fwside 5,5,5 0,0,0   500,50,-100  256 . mc
  196. object     fwside 5,5,5 0,180,0 0,0,2200   256 . fw1
  197. object fw3=fwside 5,5,5 0,0,0   3500,50,-100 256 . mc
  198. object     fwside 5,5,5 0,180,0 0,0,2200   256 . fw3
  199.  
  200. animation 150
  201.  state fast                      # travel speed
  202.   do fw1=step(x,x,x x,x,250)[][]
  203.   do fw3=step(x,x,x x,x,250)[][]
  204.   do arm=step(x,x,x x,-15,x)[][]
  205.   do mc=postest(-6000,x,24000 6000,x,42000)[][state=slow]
  206.  state slow
  207.   do fw1=step(x,x,x x,x,75)[][]  # dismount speed
  208.   do fw3=step(x,x,x x,x,75)[][]
  209.   do arm=step(x,x,x x,-3,x)[][]
  210.   do mc=postest(-6000,x,24000 6000,x,42000)[state=fast][]
  211.  
  212. animation 2             # ride wagon
  213.  state wait_in          # wait for car and passenger
  214.   do mc=postest(-3000,x,30000 3000,x,36000)  [exit][]
  215.   do sensor(-3000,-3000,30000 3000,3000,36000)[exit][]
  216.   do mc=attach(1) [state=wait_inout]
  217.  state wait_inout       # wait for car to leave
  218.   do mc=postest(-3100,x,29000 3100,x,37000) [state=in][]
  219.  state in               # wait till car down, no passenger
  220.   do mc=postest(-2900,x,30500 2900,x,35500)  [exit][]
  221.   do sensor(-3000,x,30000 3000,x,36000)[][exit]
  222.   do mc=attach(0) [state=wait_out]
  223.  state wait_out         # wait for car to leave
  224.   do mc=postest(-3100,x,29000 3100,x,37000) [state=wait_in][]
  225.  
  226. title RIDES.WLD
  227. title carnival of rides
  228. title red areas are entry/exit zones
  229. title 29/11/92 by Dave Stampe
  230. title memory
  231.  
  232. # End of RIDE.WLD
  233.