Closed macsforme closed 8 years ago
Yes, this was a widely-used feature in BZFlag that made the game more interesting and helped the world feel smaller since you could quickly get to a far-away location on the map instead of driving there.
I would favor taking the idea further and supporting teleporters that tilt, but still force the tank to exit the other side in the correct orientation (assuming it is decided that tanks will be kept flat in issue #1). Momentum should be properly preserved in a manner similar to portals in Valve's Portal game series.
Since teleporter links would likely have to be static (to prevent a delay before going through them), we should also consider rendering a preview of the other side on a teleporter face, since this information will be available to the client itself and someone will likely create such a feature someday to give themselves an advantage.
sounds like you just want teleporters to be a bounded plane, but they do translation only.
What should the bounding shape be? any shape? boxes? simple primitives? (Who doesn't want a stargate !?!)
How is linear velocity handled? if I have a tank that goes in a vertical "BZ" style teleporter, but exits one that is at a 45 degree angle, I understand you want the tank to stay flat, but is your motion vector rotated by 45 now?
Yes, your diagram illustrates how I picture that it would work. Any velocity relative to the entrance vector would be transformed so that it is relative to the exit vector, with normal gravity forces taking over from there, and the tank always remaining in the straight-up orientation.
Regarding teleporter shapes. I believe if we limit shapes to be convex polygons, we can always map from one shape to another using the logic below. it is not perfect but it will be fast enough and produce reasonable results for most cases.
Initial consensus is to design with convex regular polygons for teleporter planes.
Visibility through a teleporter field will be explored depending on graphs subsystems choices, and dropped it not feasible on all platforms.
Taken from @JeffM2501's original document:
Like jumping, this does not have a large number of ramifications; it just sets some requirements.