Bedwars: The Origin FI

Chapter

Shift sneaking and speed bridging: stopping at the edge in Fortnite

In Bed Wars, bridges are built over the void, and the whole rhythm of building relies on being able to stop at the edge of a block by sneaking without falling. Fortnite has no such feature, so it was built from invisible barriers that Verse code moves around the player. This chapter explains how the edge guard was implemented, the rounds of bugs that followed, how speed bridging was made fast enough and why sneaking eventually moved to the crouch key.

Starting point: why stopping at the edge matters in Bed Wars

Bed Wars is a team game familiar from Minecraft: each team has its own island and bed, and as long as the bed is intact, a player who dies respawns. The islands float above the void, and players move between them by building bridges out of blocks. A player who falls into the void dies. Bridging speed often decides the whole game: who reaches the centre island, another team's island or safety first.

In Minecraft, bridges are built by sneaking (shift or sneak). While the player holds the sneak key, the character walks slowly and cannot fall off the edge of a block: it stops at the edge as if against an invisible wall. In addition, the character can stand about 30 cm beyond the edge, which is enough to place a new block against the side of the block underfoot by looking down at an angle. Speed bridging is the fast form of this: the player walks backwards (S key), looks down, taps sneak briefly right at the edge, places a block and carries on immediately. A skilled player builds a block in under a second this way.

Fortnite has no equivalent edge stop. The game's engine (UEFN, i.e. Unreal Editor for Fortnite) gives the character a crouch, but it does not prevent falling. The Bed Wars implementation therefore needed its own mechanism, and it had to work both for slow, careful sneaking and for rhythmic speed bridging. The mechanism is in the file shift_sneak.verse, written in Verse (the programming language for Fortnite islands, which runs on the game server), which grew to about 1,900 lines over the project.

The finished map from above: eight team castle islands around the ring, four small diamond islands and the centre island, all above the void. The gaps between the islands are crossed by building bridges, so stopping at the edge is the game's basic move.
The finished map from above: eight team castle islands around the ring, four small diamond islands and the centre island, all above the void. The gaps between the islands are crossed by building bridges, so stopping at the edge is the game's basic move.

Basic solution: invisible support pads and edge walls

The basis of sneaking comes from a shift package brought over from the developer's earlier Pillars project, which was adapted to the Bed Wars grid map before the Claude Code sessions (the phase is recorded in the design documents in the Blocks folder). The principle: the map is a grid of 100 cm cubes whose origin is at (50, 50, 10050) cm. Verse knows the state of every cell, because the map's solid cubes (34,491 cells) were read in advance into the file bedwars_grid_support.verse, and blocks placed by players are registered in the same grid immediately when they are placed or broken (RegisterCell and UnregisterCell).

The actual stopping is done with Fortnite's Barrier devices (a device is a ready-made UEFN game device that can be controlled from Verse). A Barrier is an invisible collision box whose size and position Verse can change and which can be set to affect only one player. A fixed number of devices was reserved for each player: 9 floor pads (3 × 3 cells around the player) and 24 edge segments, i.e. 264 devices for eight players. The floor pads are 5.12 cm thick slabs that extend slightly beyond the block's edge and give Minecraft's roughly 30 cm overhang. The edge walls rise on a block's open sides only while sneak is held.

The early design documents describe two other important principles. First, the motion is checked along the whole path travelled rather than only at the end point, so that an update lagging across a cell cannot jump over an empty gap. Second, the standing height, i.e. the distance from the character's centre to the floor, is measured from the character's actual ground contact rather than using a fixed 95 cm assumption; the measurement is updated only when the whole footprint is over real terrain, so that leaning over the edge does not drag the height down. The support block chosen is the nearest exposed block overlapping the footprint, regardless of material.

Two major fixes were also made before the Claude Code phase. Stationary sneak: the earlier version swapped two support pads at every cell boundary and moved four walls along with the player, so physics contacts changed exactly while pressing against the edge. In the new model, every pad and wall has a persistent key, and devices whose key stays in range stay in place; only those that fall outside the footprint are recycled. In a test of continuous outward pushing on a straight edge, there were 40 position corrections at first and zero after the fix. Corner sneak: at L-corners, convex corners and stairs, the character got stuck or was corrected. Wall end points were computed according to the character's capsule (convex ones lengthen, concave ones shorten), and diagonal movements were checked along the actual path. Results: 2,356 computed checks passed and 10/10 corner routes without a single correction teleport.

Constraints of the physics pawn: support pads 1.5 cm below the block surface

In the first Claude Code session (27 Sep) it turned out that island physics is on and the player pawn is Fortnite's physics-based Chaos Mover. This affects sneaking in many ways. The character is a capsule (a cylinder with hemispherical ends), not a Minecraft box, and the capsule radius was measured at about 32 cm. In addition, every change the server makes near the character, such as moving a collision box or swapping a speed effect, can make the character re-simulate its movement, which shows up as a jerk.

The Barrier pads turned out to be almost frictionless, like ice. When they were flush with the block surface, the character stood on the pad, acceleration dropped and the character bounced off the walls. The pads were lowered by the PadDrop value, i.e. 1.5 cm below the block surface. Now the character stands on the real block and touches the pad only when it steps over the edge. The pads also could not be limited to sneaking only, because then a last-moment jump off the edge broke; they stay while walking too and stay in place throughout the jump.

The same session found that walls in the map's prebuilt structures jittered because they were merged meshes with triangle-mesh collision. They were replaced with about 1,360 box collisions computed from the same bedwars_grid_support data that sneaking uses. The sneak camera switch was removed at the same time, because removing a camera from the player made Fortnite's visibility cleanup show the player's own body; now every life has one camera, and sneaking does not switch it.

Speed bridging speed: speed effect delay and SneakSlowDelay

On 28 Sep the goal became making speed bridging possible at all. There were two problems: walking backwards started too slowly, and sneaking right at the edge caused a small jerk. A movement probe (RunMovementProbe, which logs the character's position and velocity about 30 times per second) of two bridging drills of 14 and 26 blocks covered 147 block placements and 26,800 samples. The sneak slowdown was done with a Movement Modulator device (multiplier 0.3, base speed multiplier 1.26), and the measurement showed that the effect swap reached the character only 0.2–0.3 s after the server's command, and as a hard cut (about 2.7 → 0.9 m/s in two ticks). In the rhythm, this landed exactly at the block's edge. After release, the character likewise stayed at sneak speed for 0.2–0.3 s, so one block took about 0.75–1 s.

The solution was to separate the edge walls from the slowdown. Pressing sneak raises the edge walls immediately, but sneak speed starts only if the key is held while moving for longer than the adjustable SneakSlowDelay (initially 0.35 s). When standing still (below 0.3 m/s), the slowdown applies immediately, because then the swap does not interrupt movement. A short tap therefore never swaps the speed effect. In addition, the floor pad stays the same size while walking and sneaking (half-width about 80 cm), and sneaking's wider rim (92.5 cm) is made with separate pads; previously every press and release resized the very pad the character was standing on. According to the measurement, the speed state stayed normal through the taps, and the speed was found to be good in a playtest.

Acceleration could not be adjusted. In all non-sprint movement (walking, backwards, sneaking) acceleration is fixed at 7 m/s² and in Fortnite's sprint at 28.5 m/s², and there is no control for it in the Verse API or the island settings; the Ch 4 Movement setting was also tried, to no effect. With the base speed multiplier of 1.26, the speeds are: forwards 4.41 m/s, backwards 3.78 m/s, sneaking about 0.9 (backwards) – 1.05 m/s and sprint 6.93 m/s. The island gravity was changed the same day to −1950 for the jump (jump apex about 1.25 m), but the speed multiplier was not lowered because the bridging speed had already been approved.

The edge jerk: two collision shapes and removing the rescue teleport

After the speed fix, a hesitant jerk remained: when the character got far enough over the edge and sneak was pressed, the game seemed unable to decide whether the character falls or not. A playtest noticed that the effect occurred only on blocks the player had placed, not on the map's prebuilt blocks. All 13 placeable block meshes (wools, clay, glass, end stone, planks, obsidian) had, in addition to an exact 100 cm box, an automatically generated convex hull 0.1 cm wider and 0.04 cm taller, and a setting that used both. At the edge, the character therefore hit two edges at different positions. The meshes were backed up, and each was left with one exact box and the collision setting SimpleAsComplex, as in the map's blocks.

On the Verse side, an old rescue mechanism was removed entirely; it teleported the character back to the edge if sneak was held, even if the character had already fallen as much as 1.5 m. Now the guard never moves the character or writes its velocity: once the character has dropped below its floor level (allowed deviation 3 cm + PadDrop), the guard releases immediately (CanGuardSneak) and the character falls. A new wall also must not appear inside the character's capsule. The wall's stopping point was moved from 76.5 cm to 79 cm from the block centre, 1 cm from the fall threshold (WallOffset = capsule radius 32 + 2.56 − 0.5 cm), which eliminated the old 3.5 cm zone where a late press pushed the character backwards.

This was a deliberate design choice: as in Minecraft, the character either stops or falls, with no in-between state. A very late sneak at full speed therefore results in a fall, not a jerk.

In-game shot from above of a pale tiled floor, with a single red wool block at the right edge; the on-screen text shows the block count and the hint right click places, left click breaks. The image relates to the finding that the edge jerk occurred only on self-placed blocks, which led to the discovery of the extra collision hull on the block meshes.
In-game shot from above of a pale tiled floor, with a single red wool block at the right edge; the on-screen text shows the block count and the hint right click places, left click breaks. The image relates to the finding that the edge jerk occurred only on self-placed blocks, which led to the discovery of the extra collision hull on the block meshes.

Random falls during long speed bridging

On 11 Oct, on long bridges, the character occasionally fell for no visible reason. The log for that day contained only one fall while bridging, and the fault was not in sneaking: the character stopped at the edge of the next block with sneak held (the guard worked), sneak was held for about 0.13 s, but no block appeared, and when the key was released, the character walked backwards onto empty space. In earlier rounds the order had always been stop, block, release. The two other falls were sprinting over the edge.

The likely cause was judged to be aiming: when standing at the edge, the crosshair has to hit the side of the block below, and there is only a window of about 4 degrees for that (looking about 80–84° down). If the crosshair drifts onto the top of the block, the game tries to place the block in the cell the player is standing in and blocks it without notice. The mechanic was not changed blindly; instead, an always-on log line BEDWARS PLACE MISS was added to the building code (bedwars_building.verse), recording the hit point and reason of a failed click. That evening's logs showed that the clicks wasted while bridging really did hit the top face of the block, which is normal in Minecraft too because of the narrow aiming window. More forgiving aiming was left as a suggestion.

The same evening the block delay, which affects the bridging rhythm, was addressed: a block is no longer created as a new entity, but a ready-made piece is moved from a pool (4 per block type under the map). Block placement belongs more properly in the chapter on building; what matters here is that the round-trip time between the server and the player's machine always remains as delay, because Verse cannot predict the block on the player's machine.

Late sneak and pull-back: ClearanceLead 0.15 s

On 12 Oct it emerged that if the player went too far at the edge and pressed sneak at exactly that moment, the character was pulled back onto the block, and sometimes it first rose and then fell properly. On PC the fault was mild, on a controller bad. The cause was deduced from the code and the server log: the server enables an edge wall if the character it sees is still inside the edge. The player's own machine, however, is about a round trip ahead of the server, so with a late press the character is already over the edge on the player's own screen when the wall takes effect, and the server corrects it back behind the wall. Sometimes the correction crosses with the fall, producing a rise and a fall.

The length of the pull-back is speed times delay. On a controller the edge is usually approached at full speed (walking 4.4 m/s, sprint 6.9 m/s), so the pull is many times larger than with slow backwards walking on PC. In the PC log, some sneak presses came only 0.07–0.14 s before the stop, and they had been saved precisely by this pull-back.

In the fix, a new wall is enabled only if the character is inside the edge also when projected ClearanceLead ahead. The value was raised from 0.05 s to 0.15 s and made adjustable on the device. A sneak pressed too late now means a straight fall. Withheld walls are retried every tick (EdgesDeferred), but a wall already standing is never removed. On a late press the sneak speed is not swapped, because the re-simulation caused by the swap would replay the fall. The log got the lines SHIFT LATE and SHIFT EDGE CAUGHT. The downside is that last-moment taps can now drop the player; lowering the value to 0.10 s was recorded as a fallback plan. The fix took effect at the next session start, and in the final code the value is still 0.15 s.

Pillaring and edge pads

On 14 Oct the fixes to pillaring (building a tower by jumping and placing a block under your feet) also concerned sneaking. Moving the floor pad to a new level under a landing character caused a physics correction jerk, so when landing in place on a new level, the pad is not built until the character starts moving or sneaks (PatchSettling). Moving the pad ahead under an airborne character (PadAheadOfLanding) was turned off, because frames extracted from a video showed that a late-arriving pad could appear inside a falling character.

The same work uncovered a side effect that had slowed speed bridging: the pillaring time limit rejected bridge blocks, because a character standing on an edge pad is not always on the ground as far as the game is concerned, so the rule thought it was airborne. A character standing still at block level (±3 cm, vertical speed below 0.5 m/s) was excluded from the rule. The other details of pillaring belong in the building chapter.

The diagonal corner: sneaking leaked over the corner

In a playtest on 19–20 Oct it was noticed that when two blocks touch only at a corner, sneaking let the player cross the corner onto the other block, even though a straight edge held. In Minecraft this is not possible, because a block touching only at a corner does not form a continuous floor.

Two causes were found. First, walls were omitted at all open neighbouring blocks, including diagonal ones, so a gap was left at the corner. In the fix, a block counts as a neighbour only if it can be reached from the player's cell through side-touching blocks (LinkedFloor, search within a ±3 cell window). Verse does not support lambda functions, so the check was written as a separate helper method (IsLinked). Walls, wall cuts and rims use this connectivity; walking pads were left unchanged. Second, when the character stopped at the corner at (79, 79) cm, the centre of the diagonal block was closer, so the support block, and the walls with it, moved around the diagonal block. Now StableFloorSupport keeps the old support block as long as it still carries the character, if the candidate touches only at a corner.

A regression test block SHIFT DIAGONAL REGRESSION was added to the code, the build succeeded and the change was pushed with a full push (the player's connection dropped for about 3 minutes of loading, which looked like a crash but was caused by the push). The fix was not confirmed in a playtest in that session.

In-game shot from a low angle: dark metal blocks, a wooden crate block and grass blocks, some of which touch only at a corner. At such a spot the sneak walls broke off and the character could cross the corner, which led to the LinkedFloor check.
In-game shot from a low angle: dark metal blocks, a wooden crate block and grass blocks, some of which touch only at a corner. At such a spot the sneak walls broke off and the character could cross the corner, which led to the LinkedFloor check.

Respawn and stuck sneaking

On 21 Oct, in a two-player game, the character started sliding after respawn and the jump rose only about 10 cm and snapped back. The cause was deduced from the code: shift_sneak modified the new pawn as soon as it appeared, while the server was still driving it alone. It set the speed effect and the movement settings device, moved the walking pads under the character and swapped the effect once more at the one-second mark. In Fortnite, such a change before the player's machine has taken control of the pawn leaves the pawn desynced for the whole life. In the fix, the new pawn is not touched until it moves on its own (WatchPawnDriven, movement of 0.5–300 cm within 0.1 s); after that, StartDrivenLife sets the movement setting, a single speed effect, the camera and the pads once. As a side effect, the character walks at Fortnite's normal speed for about half a second after respawn. The fix was not confirmed in game.

The same evening, sneaking sometimes stayed on without a key press. The code read the input device's held state every tick, and it stayed on if the release was lost during death or a menu. Now sneaking is on only if its own state (SneakKeyDown) has seen a press without a release and the device agrees (KeyHeld). The state resets on death and whenever the shop or inventory is open (ForgetKeys). This fix, too, did not make it to a playtest during the session.

Sneaking moved to the crouch key and a 0.15 s delay

Originally sneaking listened to Fortnite's Sprint action (left Shift by default) with an Input Trigger device that consumed the key. On 21 Oct the controls were tidied up for release: the key hints shown on screen were removed from all devices, and the sneak device BW_Mechanics_ShiftInput now listens to Fortnite's Crouch action. The device consumes the press, so Fortnite's own crouch does not start, and sneaking is where the player expects crouch to be.

Fortnite's separate sprint could not be turned off with the island setting Allow Sprinting = Off (according to the log, sprinting was still measured, average speed 5.9 m/s), so the swim key device left unused after the water removal now listens to the Sprint key and consumes it. Normal running with W (about 6.2 m/s) and the extra push of the sprint hit stayed as before.

The sneak response felt slow on the server, and according to the log the slowdown came 0.33 s after the press while moving. SneakSlowDelay was lowered on the device from 0.35 s to 0.15 s, after which the slowdown came 0.13–0.15 s after the press. In a playtest, sneaking on the crouch key and the new delay were found to work. On 2 Nov, during release preparation, a separate delay for walking backwards, BackwardSlowDelay 0.45 s, was also added; it had already been found to work in the Pillars game: when walking backwards, the 0.15 s delay slowed 55% of taps. The direction is inferred from the horizontal look direction, because when bridging the view points almost straight down.

Close-up of the edge of the game view showing the devices' key hints Toggle Inventory and Sneak Sprint. The hints were removed, and sneaking was moved from the Sprint key to the crouch key.
Close-up of the edge of the game view showing the devices' key hints Toggle Inventory and Sneak Sprint. The hints were removed, and sneaking was moved from the Sprint key to the crouch key.

Final implementation

In the released game, sneaking is handled by shift_sneak.verse together with 264 Barrier devices, three Movement Modulator devices (base speed 1.26, sneak 0.3, wall step speed cap 0.36) and an Input Trigger device listening to the crouch key. A Monitor loop goes through every player about 30 times per second: it reads the key state, updates the support block, builds the 3 × 3 cell floor pads and edge walls with persistent keys, and decides when sneak speed starts.

How it works from the player's point of view: pressing the sneak key immediately raises edge walls on the sides that have no side-connected floor, and the character stops 79 cm from the block centre, i.e. about 30 cm over the edge. The slowdown starts immediately when standing still, after 0.15 s while moving and after 0.45 s when walking backwards, so the short taps of speed bridging do not slow the player down. If the press comes so late that the character would already be over the edge 0.15 s later, the wall is not raised and the character falls. The guard never teleports the character or writes its velocity, and all setup for a new life is done only once the player's machine is driving the pawn.

The building code registers every placed and broken block in the sneak grid, so the guard works on both the map's blocks and players' blocks. Regression tests (edges, corners, seams, wall step and diagonal corner) are in the code but off by default, because when enabled they delay the guard's start by about 17 s at the beginning of every match.

Key values

WhatValueWhat it affects
Block size100 cmThe grid's base unit; grid origin (50, 50, 10050) cm.
Devices per player9 floor pads + 24 edge segmentsFixed Barrier device budget; 264 devices for 8 players.
PadDrop1.5 cmThe floor pads sit this far below the block surface, so the character stands on the real block rather than on the slippery pad.
Capsule radius (PawnRadius)32 cmMeasured radius of the character's collision capsule, from which the wall position is computed.
Stopping point79 cm from the block centreLimit for the character's centre while sneaking (previously 76.5 cm); gives about 30 cm of overhang past the edge.
Walking pad half-width / sneak rimabout 80 cm / 92.5 cmThe walking pad keeps the same size; sneaking's wider rim is made with separate pads.
ClearanceLead0.15 s (previously 0.05 s)A wall rises only if the character is inside the edge also this far ahead; a press that is too late results in a fall.
SneakSlowDelay0.15 s (on the device; code default 0.35 s)The slowdown of a sneak pressed while moving starts only after this.
BackwardSlowDelay0.45 sSlowdown delay when walking backwards (speed bridging).
Speed multipliersbase 1.26, sneak 0.3, wall step 0.36Movement Modulator devices; all share the same effect slot, so shift_sneak is their only owner.
Speedsforwards 4.41, backwards 3.78, sneak 0.9–1.05, sprint 6.93 m/sMeasured with the base speed multiplier of 1.26.
Acceleration7 m/s² (sprint 28.5 m/s²)Fortnite's fixed value, which cannot be adjusted from Verse or the island settings.
Speed effect delay0.2–0.3 sThe server's effect swap reaches the character this late, which is why short taps do not swap the effect.
Aiming window from the edgeabout 4° (looking 80–84° down)The narrow angle at which the side of the block can be hit from the edge; explained the wasted clicks while bridging.

Final state

In the released game, sneaking works on the crouch key: edge walls rise immediately, the slowdown starts after 0.15 s (backwards 0.45 s), a press that is too late drops the player rather than pulling them back, and diagonal corners are closed. The speed and the crouch key solution were confirmed in playtests. According to the sources, the fixes for the diagonal corner, respawn synchronisation and the stuck key were not separately confirmed in a playtest. Acceleration (7 m/s²) cannot be changed, the round-trip time between the server and the player's machine remains as delay without the client-side prediction planned for Verse, and normal W running is still Fortnite's own sprint because it cannot be turned off in the island settings. More forgiving aiming while bridging was left as a suggestion.

Next chapter: Building →