# Portals

Can anyone tell me how to make ‘portals’ similar to the game portal 2

do you mean in a 2d game or a 3d game?
do you want to be able to see what is on the other side if you look through them?
can they be given unique angles- for example, one portal on a wall and another on the floor, causing an angle differential that is not a multiple of 180?

also, what kind of things will pass through; sounds, objects, projectiles, the player, lights, heat values, radiation, what?

Keep in mind, Protaks was developed with a giant team. It’s not likely you’ll be able to make it yourself. But Codea has 3D functions, so we’ll see what we can do. Check out the 3D samples for a start.

You’re asking specifically about portals, may I assume you have everything else? And if you have everything else, what’s so difficult about portals?

Please be more precise, at the moment it’s like asking for the way to Rome.

You might look at Nabacular Drop, the game that inspired Portal. It was developed by a group of game design students, who were then hired as part of the Portal team.

http://en.wikipedia.org/wiki/Narbacular_Drop

``````fill(255, 132, 0, 255)
ellipse(portalA.position.x,portalA.position.y,50)

fill(0, 144, 255, 255)
ellipse(portalB.position.x,portalB.position.y,50)
``````

These portals should be very similar to the ones in portal 2.

Sorry if that isn’t terribly helpful, but given the limited information in the question that’s all I have to give, really

You can probably get similar visual effects to portal by using setContext and multiple cameras. The hard thing is getting the physics to work through portal (even just walking through them)

2d

You’re not very helpful in your way of asking us for help, or if you’re begging for a pun, you leave me clueless. duh

Perhaps you want something like Mari0, it is 2D, has portals and is written in Lua:

http://stabyourself.net/mari0/

Portal 2d :-bd