` MAGIC WORLD WALK-ABOUT ` A simple example of all that is needed to explore a ` Magic World Terrain ` Author: Hop A Long ` Date: June 6, 2004 ` Many Thanks to Robin King for the use of his program: ` Magic World ` all seeing i software ` www.all-seeing-i.co.uk ` Needed to load your Magic World Terrain ` Be sure the #include is completely at the left margin #include "magicload1-1.dba" `************************************** ` Set Up `************************************** Sync on Sync Rate 30 Autocam off Hide mouse ` Call the function you have included above and pass in ` the file name string of your saved MW Terrain. ` Here it is called: test MagicLoad("test",1,1,1) Position matrix 1,0,0,0 ` Set yourself up where you want to begin Position camera 50,0,50 `************************************************************************************************** ` MAIN LOOP `************************************************************************************************** Do `******************************** ` Print the changing coordinate values `******************************** Text 10,20,"MAGIC WORLD WALK-ABOUT" Text 10,40,"Camera x value: "+str$(x#) Text 10,60,"Camera y value: "+str$(y#) Text 10,80,"Camera z value: "+str$(z#) `******************************** ` Use the Mouse to turn `******************************** ` Use MOUSEMOVE to alter camera angles ` The view follows no object in particular and is free to roam. ang_x#=wrapvalue(ang_x#+mousemovey()*0.2) ang_y#=wrapvalue(ang_y#+mousemovex()*0.2) Rotate camera ang_x#,ang_y#,0 `******************************** ` Simple movement `******************************** If Upkey()=1 then move camera 5 If Downkey()=1 then move camera -5 x# = camera position x() z# = camera position z() ` This is probably the most important. ` It will keep you above the matrix. y#=get ground height(1,x#,z#)+50 Position camera x#,y#,z# Sync Loop `****************************************************************************** ` END OF MAIN LOOP `****************************************************************************** |
Magic World Walk-About |