During testing, a server-side teleport of the avatar 15 blocks underground showed sky and black holes for a few seconds while the client fetched blocks around the new camera position. Investigate pre-emerging and forcing block sends (or fading to black) on teleport, respawn and join.
During testing, a server-side teleport of the avatar 15 blocks underground showed sky and black holes for a few seconds while the client fetched blocks around the new camera position. Investigate pre-emerging and forcing block sends (or fading to black) on teleport, respawn and join.
claude
added this to the v0.2 Core Feel milestone 2026-11-07 18:27:41 +00:00
Covers the screen with a full-screen black HUD image ([fill, z_index 1000).
Emerges strata.view_area(pos): ±30 × ±20 nodes on the plane and wall layer, and in z from the camera (plane − 24) to the wall layer.
Moves the existing avatar (zeroing velocity and the fall-damage tracker), or spawns one.
Pushes every visible mapblock to the client with player:send_mapblock (about 60 blocks, sent once per teleport).
Holds black for 0.3 s, then fades in over 0.3 s. A newer teleport cancels a fade that's still running.
Join and respawn both use it now. Respawn used to skip emerging altogether. strata.place_avatar is kept as an alias.
Tested (headless, 20/20 pass): view_area covers the camera and a 16:9 screen at the configured FOV. prepare_view emerges an unloaded destination 15 nodes underground at x=640, with every corner of the view generated. send_view_blocks sends the plane, wall and camera blocks and stays under 80 blocks. Teleporting an offline player returns false.
Needs a manual check: whether the client still shows holes after the fade. This can't be verified headless. If it does, raise FADE_HOLD. Follow-up: the engine's /teleport moves the hidden player body, not the avatar. That belongs in #10 (lock out engine features), which could route it through strata.teleport.
Fixed in e118e36.
**What changed**
- New `strata.teleport(name, pos)` in `strata_player`:
1. Covers the screen with a full-screen black HUD image (`[fill`, z_index 1000).
2. Emerges `strata.view_area(pos)`: ±30 × ±20 nodes on the plane and wall layer, and in z from the camera (plane − 24) to the wall layer.
3. Moves the existing avatar (zeroing velocity and the fall-damage tracker), or spawns one.
4. Pushes every visible mapblock to the client with `player:send_mapblock` (about 60 blocks, sent once per teleport).
5. Holds black for 0.3 s, then fades in over 0.3 s. A newer teleport cancels a fade that's still running.
- Join and respawn both use it now. Respawn used to skip emerging altogether. `strata.place_avatar` is kept as an alias.
**Tested** (headless, 20/20 pass): `view_area` covers the camera and a 16:9 screen at the configured FOV. `prepare_view` emerges an unloaded destination 15 nodes underground at x=640, with every corner of the view generated. `send_view_blocks` sends the plane, wall and camera blocks and stays under 80 blocks. Teleporting an offline player returns false.
**Needs a manual check**: whether the client still shows holes after the fade. This can't be verified headless. If it does, raise `FADE_HOLD`.
**Follow-up**: the engine's `/teleport` moves the hidden player body, not the avatar. That belongs in #10 (lock out engine features), which could route it through `strata.teleport`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
During testing, a server-side teleport of the avatar 15 blocks underground showed sky and black holes for a few seconds while the client fetched blocks around the new camera position. Investigate pre-emerging and forcing block sends (or fading to black) on teleport, respawn and join.
Fixed in
e118e36.What changed
strata.teleport(name, pos)instrata_player:[fill, z_index 1000).strata.view_area(pos): ±30 × ±20 nodes on the plane and wall layer, and in z from the camera (plane − 24) to the wall layer.player:send_mapblock(about 60 blocks, sent once per teleport).strata.place_avataris kept as an alias.Tested (headless, 20/20 pass):
view_areacovers the camera and a 16:9 screen at the configured FOV.prepare_viewemerges an unloaded destination 15 nodes underground at x=640, with every corner of the view generated.send_view_blockssends the plane, wall and camera blocks and stays under 80 blocks. Teleporting an offline player returns false.Needs a manual check: whether the client still shows holes after the fade. This can't be verified headless. If it does, raise
FADE_HOLD.Follow-up: the engine's
/teleportmoves the hidden player body, not the avatar. That belongs in #10 (lock out engine features), which could route it throughstrata.teleport.