Slashdot Mirror


Examining Portal's Teleportation Code

Gamasutra is running a story deconstructing the mechanics of Portal's teleportation programming. They present a snippet of Portal's code and a downloadable demo. They ran another article in this series earlier this year with an analysis Mario Galaxy's unique take on physics. We've discussed the development of Portal in the past. "Teleport mechanics in video games are nothing new. Puzzles from the original Gauntlet were memorable -- and more than likely, that wasn't the first game to use teleportation as a gameplay mechanic. The difference between Portal and all those that came before it is that Portal's teleportation acts as a frictionless tube between point A and point B. Physics are still hard at work inside the frictionless tube. Instead of simply repositioning an object from point A to point B, the player enters point A with full velocity and exits point B with the same speed, but moving in a new direction." Update: 8/26 at 19:37 by SS: Dan notes that the code was not directly from Portal; it was written to approximate Portal's physics.

18 of 278 comments (clear)

  1. Frictionless tube? by Anonymous Coward · · Score: 5, Funny

    Your mom has a frictionless tube.

    First post?

    1. Re:Frictionless tube? by Chris+Burke · · Score: 5, Funny

      For friction to be present, the object being inserted into the tube must be large enough to touch the sides. That must be your problem.

      --

      The enemies of Democracy are
    2. Re:Frictionless tube? by jollyreaper · · Score: 4, Funny

      For friction to be present, the object being inserted into the tube must be large enough to touch the sides. That must be your problem.

      THAT'S WHAT SHE SAID! -er, shit. *self pwn*

      --
      Kwisatz Haderach
      Sell the spice to CHOAM
      This Mahdi took Shaddam's Throne
  2. Portal by CaptainPatent · · Score: 4, Funny

    Regardless it's a lot better than quantum teleportation.

    --
    Well, back to rejecting software patent applications.
    1. Re:Portal by ElizabethGreene · · Score: 4, Funny

      First thought: "Hey, if it can work within or near the event horizon of a black hole we could time travel!".

      Second thought: "Wound this violate one of the laws of thermodynamics?"

      Third thought: "I need a life."

  3. But... by i.r.id10t · · Score: 5, Funny

    But... can they telefrag?

    I just love the sound of 2 bodies trying to occupy the same space at the same time in the morning... or afternoon... or evening...

    --
    Don't blame me, I voted for Kodos
  4. Too verbose by Anonymous Coward · · Score: 5, Funny

    >>Physics are still hard at work inside the frictionless tube. Instead of simply repositioning an object from point A to point B, the player enters point A with full velocity and exits point B with the same speed, but moving in a new direction."

    Should be "Speedy thing goes in; speedy thing comes out."

    1. Re:Too verbose by elrous0 · · Score: 5, Funny

      My ex-girlfriend used to use that exact phrase all the time.

      --
      SJW: Someone who has run out of real oppression, and has to fake it.
  5. Ahoy, GlaDOS! by Stanistani · · Score: 4, Funny

    I want to see the nautical version, Porthole.

    1. Re:Ahoy, GlaDOS! by Darth_brooks · · Score: 4, Funny

      I'm waiting on the hot grits version, Portman

      --
      There are some people that if they don't know, you can't tell 'em.
    2. Re:Ahoy, GlaDOS! by Captain+Splendid · · Score: 4, Funny

      I'm waiting on the drunken lawyer version, Port

      -Rowley Birkin, QC

      --
      Linux, you magnificent bastard, I read the fucking manual!
    3. Re:Ahoy, GlaDOS! by Anonymous Coward · · Score: 5, Funny

      The grits are a lie :(

    4. Re:Ahoy, GlaDOS! by MobileTatsu-NJG · · Score: 4, Funny

      I'm waiting on the drunken lawyer version, Port

      I'm waiting for the Wii version, P.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

  6. Next step? by Aranwe+Haldaloke · · Score: 4, Funny

    Porting Portal's portal code?

    1. Re:Next step? by saboola · · Score: 5, Funny

      I'm not a portal porter
      I'm a portal porter's son
      And i'm only porting portal
      Till the portal porter comes

  7. Re:WTF by kestasjk · · Score: 5, Funny

    It didn't answer the main question for me: How does the code which accelerates players downwards work?

    It must be using some kind of vector mathematics for mapping acceleration onto velocity, and velocity onto position, but I'll be damned if I can figure out how they expressed that in an algorithm.

    --
    // MD_Update(&m,buf,j);
  8. Re:It would have been more fun by xouumalperxe · · Score: 4, Funny

    multi-hundred pound canon

    Omnianism has loads of holy books, but I don't think even those collected amount to several hundred pounds.

  9. Re:M.C.Escher has good OLD examples of the concept by Chris+Burke · · Score: 4, Funny

    Speaking of, whens he gonna put a new album out?

    Are you talking about M.C. Escher who designed the crazy staircase house? Or David Bowie, who lives there?

    --

    The enemies of Democracy are