LINKING 3D WORLDS

One of the problems of web 3D is: a "good" world will have many Mbs and the velocity of the Internet (until we have 2Mbps broadband) is not good enough to make the download in a confortable time. So: we need to break our game (or another kind of world) in many parts and to create a link between this levels (or websodes - this is a new word :-)

We have the method:

        gotoNetMovie "http://www.dmu.com/3dd/someworld.dcr"
to do this link.

We cam design a "portal" (look in the demo) with a auxiliary-sphere that will be a target to a distance method (we saw this technique in previous lesson of this tutorial):

 
 dist=myworld.model("avatar").worldposition.distanceTo(myworld.model("auxs1").worldposition)
 if dist<40 AND cross = 0 then 
  gotoNetMovie "http://www.dmu.com/3dd/redw.dcr" 
  cross = 1
 end if

If we don't define a flag (cross in our sample) we will have a bad loop an the link will not work well.


ANOTHER FLOOR

In our demo we have a gate (click the red button) to cross the chasm - a hole inside the "land". It is a new floor and we need to change the seekfloor method to test it like a "new land". The changed part of the method is:

on seekfloor modelname, floorname, worldname, modelheight, directionvector
  flag = 0
  tiltangle = 0
  tiltvector = 0
  
  alist = myworld.modelsUnderRay(myworld.model(modelname).worldposition - directionvector*100  ,directionvector,5, #detailed)  
  
  repeat with i = 1 to count(alist)
     if alist[i].model.name contains floorname  OR "gate" then
      a = alist[i].isectposition
      av = vector(0,(-myworld.model(modelname ...etc etc. etc.

An easier solution is to call the "gate": landgate or any word that has the land string.

Play the demo clicking the red button, crossing the gate and going inside the portal. You will be transported to another 3D world where there are another "portal" to a new page (a 2D world?). The commercial possibilities of this technique are important.




PREVIOUS LESSON NEXT LESSON
T. CONTENTS HOMEPAGE