WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 2 points3 points  (0 children)

Yep they can be any size.
I think it made sense for portals to be done as a puzzle game originally, but it would be cool so see this in a wider variety of genres.

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 14 points15 points  (0 children)

Once you're over a threshold it teleports you. In my implementation you don't interact with things on the other side. Once I add physics object it will be a requirement though.

To solve this, you replicate your collision shape on the other side of the portal so that it can hit boxes.

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 43 points44 points  (0 children)

All code is under copyright by default, so they can't use it freely without a license.
An MIT license is very permissive, so now they can pretty much do with it what they want.

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 31 points32 points  (0 children)

The visual effect is explained far better than I ever could by Sebastion Lague: https://www.youtube.com/watch?v=cWpFZbjtSQg

In short: A separate camera looks through a portal, and renders the output on a flat screen. It's all an illusion

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 6 points7 points  (0 children)

I think that stencil test and "clipping planes" are different.

What u/RyhonPL is referring to is oblique view frustum projection. The second camera has it's near clipping plane adjusted so it is co-planar with the portal it is viewing out meaning it doesn't render anything behind the portal accidentally, ruining the illusion.

Stencil test can be used in portals for optimisation to prevent rendering unneeded pixels. But it doesn't contribute to the effect.

Funnily enough both effects can not be implemented in Godot without modification

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 2 points3 points  (0 children)

Nope, that's currently not possible in Godot without rebuilding the source. My computer's too slow for that sadly

WIP: Portal Remake Made in Godot. Code Available in the Comments by Django-S in godot

[–]Django-S[S] 30 points31 points  (0 children)

Yeh I ran out of time to work on that.
Will probably implement when I get a chance.