1 / 20

Teleporters in 3D Games by Dr. Edwin F. Armstrong CGDC, July 15, 2010

Teleporters in 3D Games by Dr. Edwin F. Armstrong CGDC, July 15, 2010 http://tinyRealm.com/~efa/papers/. What is a Teleporter?.

hyman
Download Presentation

Teleporters in 3D Games by Dr. Edwin F. Armstrong CGDC, July 15, 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Teleporters in 3D Gamesby Dr. Edwin F. Armstrong CGDC, July 15, 2010 http://tinyRealm.com/~efa/papers/

  2. What is a Teleporter? • Teleportation is the transfer of matter or energy from one point to another, at speeds faster than the speed of light. Currently, scientists have successfully transported only the quantum information (see quantum teleportation) of atoms and photons, but over distances of at least 600 metres (1,969 ft).[EWD2004] • In 3D game play it is used to move players around the Game. Inside a specific area or connecting other areas or even multiply games together.

  3. Game Teleporters should seem real • Teleporters have been in many games and movies and we should maintain a good deal of realism to maintain the Emerson quality of the gaming experience. • In most game play Teleporters have two functions: • 1. Teleport a person in a by-directional manor – there and back again. • 2. Teleport a person in a one-way manor – only one way.

  4. The Classic Star Trek Teleporter • Works for both one-way or by-directional

  5. The Classic Star Gate Teleporter • Works for both one-way or by-directional

  6. The Classic Halo-like Teleporter • Works for both one-way or by-directional

  7. The simple Portal Teleporter • Works best as a one-way destination point.

  8. Observer's view of Teleport process • A person disappears at one point and reappears at another. • A person disappears slowly or instantly. • There is usually a sound effect during one or both parts of the process. • The forward speed of the person is sometimes maintained – they exit at the speed at which they entered the Teleporter's beam or portal.

  9. Internal Teleport process part#1 • Slowly or quickly cause the person to disappear. • Play our enter sound effect – it takes time to play. • Stop their forward motion – it really doesn't make sense to keep their speed, unless they are going through a Star-gate or Worm-whole. Even then the physics is questionable. • Move them to their new destination. • Reorient their direction to new-gate's exit direction. • Play our exit sound effect – it takes time to play, might be the same as the enter sound effect.

  10. Internal Teleport process part#2 • Slowly or quickly cause the person to reappear. • Gently push them out of the Teleporter. This is especially important with some gates that might want to send them back. I believe the StarGate operates, so that, the mater stream works only in one direction until the gate is re-dialled. Most game Teleporters at activated by just being present and gently pushing them out the exit gate, in the correct direction. It solves a possible Teleport looping problem.

  11. Creating a Multi-Teleport function using the Torque game engine. • Most of the work in Torque is done in scripting files. We start our efforts by first calling the “scriptExec.cs” file, located in /game/scripts/server/scripts/ • The code is shown below: // Implement Teleporters exec("./customParticles.cs"); exec("./multiTeleportTrigger.cs");

  12. Inside multiTeleportTrigger.cs • function MultiTeleportTrigger:: onEnterTrigger(%data, %obj, %colObj) • { • if($numTeleports == 0) • { • // Count the number of TeleportTrigger's • // we have in the current map. • $numTeleports = getMultiTriggerCount("TeleportTrigger"); • }

  13. // Make sure player recently beamed in, otherwise • // he could loop back and forth. • if(%checkname !$= $currMultiTeleTrigger) • { • %target = %obj.dest; • //*** Mod to cause destination trigger (y-axis) • // to act as exit-direction pointer (efa) 2/28/10 *** • %client.player.setVelocity("0 0 0"); //stop player velocity • %pos = getWords(%target.getTransform(), 0, 2); • //get player's position

  14. //get current rotation • %rot = getWords(%target.getTransform(), 3, 6); • //might try %rot = (rot + 180.0 ) mod 360 • // This would remove the requirement to • //rotate the trigger to get a proper exit direction • //reset player position and rotation • %client.player.setTransform(%pos SPC %rot);

  15. //schedule teleportation event • $teleSched = schedule(30,0,"goScotty",%client,%target);//changed from 2000 (efa) 3/31/07 • //play the sound effect $teleSound = serverPlay3D(TeleportBuzz,%client.player.getTransform()); • //make them invisable %client.player.setCloaked(true); • // save the target - until the teleported client • // leaves it, then reset. Allows for next teleport $currMultiTeleTrigger = %target; }//end onEnterTrigger

  16. function MultiTeleportTrigger:: function onLeaveTrigger(%data, %obj, %colObj) • { • %client = %colObj.client; • cancel($teleSched); • %client.player.setCloaked(false);//player visible • $currMultiTeleTrigger = ""; //reset to null • }

  17. // do the teleport • function goScotty(%client, %target) • { • // beam me up! • commandToServer('TeleportPlayer', %client, %target); • }

  18. // find the number of teleport triggers by name • function getMultiTriggerCount(%name) • { • %dataGroup = "MissionGroup"; • %triggerCount = 0; • for(%i = 0; %i < %dataGroup.getCount(); %i++) • { • %obj = %dataGroup.getObject(%i); • if(%obj.getClassName() !$= "Trigger") • { • // no trigger! • Continue; }

  19. Realism in game play‏ • You always hear about how people want more realism in game play, but this is only true to a point. • People want only as much realism in a game as is required for them to feel immersed and engaged. • The Teleporters can work anyway that seems right to the player. Don't get hung up on what has been done before. • Put a Teleporter at the bottom of a hole or make it so you must jump up to a low ceiling to Teleport. If it makes sense for your game then do it...

  20. Thank you • I had fun putting together this talk. Can I answer any questions? • Or does anyone have any comments – really, I'd like to know your thoughts. • All the source code, slides and implementation instructions are available at: • http://tinyrealm.com/~efa/papers/ • http://tinyrealm.com/~efa/cisc4347

More Related