Skip to content

Make portals usable and intuitive  #9

@madblade

Description

@madblade

Portals

Two different portal guns should be available:
One that opens a window that is automatically linked to another world (implemented).
One that links two portal ends (p1p2) on-demand (like in Valve’s game, not yet implemented).

Needed to make the system robust and usable

A rendering system that solves some level of portal recursion, and also that uses stencil masks for performance, is already available, but the following bricks are still missing.
These are somewhat long-term bricks:

  • two portals linking in the same scene/world

  • on-demand portals (p1p2)

  • portal camera rotation, when p1’s rotation differs form p2’s

  • compute the chain transformation for recursive rendering: position (trivial) + rotation (less trivial)

  • compatibility with scene shadows (this will be tough to get working)

Needed first

These are the more "pressing" issues:

  • Performance: (This is a bug!) combining self-model interpolation + world switch. The self-model position is updated every server tick, and smoothly interpolated client-wise. But when a world-switch update is received client-wise, the world switch happens at the next render (so no interpolation takes place, and there will be a small jump!) The client should instead continue interpolating, for a few frames (~48ms), until the portal collision is detected client-wise and the scene switch can take place, at the exact right frame.

Therefore we need client-wise portal collision detection (just copy the code from the server), and to check for portal collision in the interpolation routine, when a flag needsToSwitchScene is set.

  • Performance: pre-allocate scenes, render target and composers to avoid lag when crossing a portal for the first time.

  • Make a portal helper (with the raycaster on close chunks).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions