Bedwars: The Origin FI

Chapter

Combat: classic PvP on Fortnite's physics character, bows, explosives and bots

In Bed Wars, combat decides who gets to break a bed and who falls off the island into the void. The goal was therefore for hits, knockback, bows and explosives to feel the same as in Minecraft's old 1.8.9 version, which the competitive Bed Wars community treats as the benchmark, even though the game runs on Fortnite's physics character. This chapter describes how Fortnite's own weak knockback was replaced with a measured rule model and a single damage gate, how weapons, bows, the fireball, the powder charge and the warp stone were built in Verse, and how practice targets, test players and finally single-player bots became combat test partners and opponents.

Goal and starting point

Bed Wars is a team game familiar from Minecraft in which every team has its own island and bed. As long as the bed stands, a dead player respawns; after the bed is broken, death is permanent (final kill). The islands float above the void, so the most important combat weapon is not damage but knockback, the backward flight caused by a hit: a good hit on a bridge knocks the opponent down. PvP (player versus player) means combat between players. The goal was the combat feel of Minecraft 1.8.9: hits on click with no cooldown, a short protection window between hits, extra push from a sprint hit, and a flight of a few blocks from a hit.

The game was made with Fortnite's UEFN editor (Unreal Editor for Fortnite), and all logic was written in Verse, which runs only on the server. Fortnite's own weapons and damage models did not fit, so combat was built from scratch: Verse reads the player's look direction, decides the hit, calculates the damage and writes a new velocity to the character. Physics is enabled on the island (Island Settings), so the player is Fortnite's Chaos Mover physics character, whose velocity can be read and set (GetLinearVelocity, SetLinearVelocity, ApplyLinearImpulse). Without physics these calls do nothing.

Before the sessions described in this book (the mid-September design documents), the project already had a first version: the server damage gate minecraft_pvp_manager.verse, a 0.5-second damage window, a 1.8x sprint-hit multiplier above 600 cm/s, W- and S-tap resets, a 0.28-second attack interval, and knockback as a native impulse of 450 cm/s horizontally and 240 cm/s upward. The first bow version had passed 66 automated checks. Building on this, the work that began on 28 September measured that knockback was nowhere near Minecraft's level.

Practice targets and first measurements

Hits were first tested in practice mode (PracticeMode), where the map had 16 guards (AI characters from the Guard Spawner device, 20 health points and a visible health bar): one at each base, one on each of the four diamond islands and four in the middle. Playtesting showed that the guards did not budge at all when hit. Test code revealed why: guards do not respond to physics, so ApplyLinearImpulse and SetLinearVelocity leave them in place, whereas TeleportTo works every tick. The guards were therefore given a scripted knockback flight (bedwars_practice.verse) that moves the character by teleport every tick using the player's measured gravity of 52.65 m/s² (island setting −1950), friction and block collisions. Along the way a Verse trap turned up: a TeleportTo made inside a failing condition is rolled back, so if(not F.TeleportTo[...]) undid a successful move.

Because guards are not real players, a target with the same physics as a human was needed. The Debug section of Island Settings had a Test Players option: UEFN's test players are stationary player characters that use the same Newton physics character (mass 80, root 95 cm above the floor). In Verse they appear only in the GetParticipants() call, not in GetPlayers(), so they were added separately to the target list of the melee and bow code, moved into their own teams and placed on an open row on the centre island.

Measurements with test players revealed the size of the problem: Fortnite's native knockback moved a character standing on the ground only 24.6 cm with a normal hit (4.5 m/s) and 48.3 cm with a sprint hit (8.1 m/s), and a 7.5 m/s lift produced only a hop of about 15 cm. The character stopped in about 0.2 seconds because it stayed in walking mode and ground friction ate the motion. In Minecraft a normal hit throws about two blocks and a sprint hit about five. The guards' scripted flight was first calibrated to match these native numbers (24.56 cm and 48.32 cm).

Knockback as an involuntary jump

The new combat architecture was designed on 28 September with a workflow tool in which a group of parallel AI agents mapped the existing code, verified claims, produced three alternative plans, and a judge panel picked the version that prioritised feel. An open 50-block row was found on the centre island and used to measure 12 different knockback approaches. The decisive finding was that a physics character standing on the ground only leaves walking mode when its vertical velocity is at least about 9 m/s; 8 m/s snaps back to the ground. In the air the flight is pure projectile motion under 52.65 m/s² gravity with no air drag, and landing stops horizontal motion within a few frames.

This gave rise to the principle: a hit is an involuntary jump. A victim on the ground is always given at least 10 m/s of vertical velocity (TakeoffMin), and the lift is calculated so that the apex of the flight matches Minecraft's apex. Minecraft's vertical motion (v ← (v − 0.08) · 0.98 per tick) is converted to Fortnite gravity by the function NewtonUp. The target velocities for a passive victim standing on the ground are 5.06 m/s horizontal and 10.08 m/s up for a normal hit (in Minecraft 1.99 blocks, apex 0.96) and 10.30 + 12.50 m/s for a sprint hit (4.94 blocks, apex 1.49). A hit on an airborne victim follows the server copy of Minecraft's vertical motion, so a new hit received in the air lifts less, and horizontal motion is 1.4x (AirHitGain), because in Minecraft the first tick uses air friction.

The velocity is written with a single SetLinearVelocity call that fully replaces the victim's horizontal velocity, like Minecraft's velocity packet (HorizontalCarry 0, KnockWriteMode 1). An impulse would have added velocity on top of the old reading and overshot, because an impulse shows up across two frames. Before the write, the movement system shift_sneak.verse receives a BeginKnock call: the hit is handled like a native jump, meaning sneak edge guards and platforms stay in place, the speed setting is not switched in the air, and landing is detected from HasLanded. Only an explosion flight above 14.9 m/s drops the edge guards.

Test players were measured the next day: normal hit 196 cm (Minecraft 199), sprint hit 508 cm (494), sprint plus Knockback I 797 cm (about 768), bow Punch I 565 cm (about 549), Punch II 912 cm (about 878) and the guard's scripted flight 208 cm. The rule model's 17 unit checks passed, as did 7/8 of the field cases; the jump-hit test gave 122 cm instead of the predicted ~70 cm, most likely because of the test setup. In the notes, the KnockbackSuite test suite is eventually recorded as passing 7/7. The largest remaining difference is Fortnite's air control: while sprinting, the character accelerates in the air at about 28.5 m/s² (about 8 in Minecraft), so holding W can cancel part of the knockback, and Verse has no setting for this.

One hit gate and the pvp_rules constants

The core of the architecture is that every damage source builds a single hit record (pvp_hit) and calls a single function, bw_pvp_manager.Resolve. The sources are melee, arrow, explosion, helper creature, falling, void, warp stone, scripted damage and the play area border. Resolve always runs the same sequence: team check and friendly protection, protection window check, combat tag update, sprint bonus consumption, armour and Armor Plating, the native Damage call and finally exactly one knockback write. No other code writes the victim's velocity because of a hit.

The protection window (hurt window) works as in Minecraft: a full hit opens a window during which an equal or weaker hit is rejected, but a stronger hit deals the difference in damage without knockback and without resetting the timer. An explosion still pushes even when the window rejects its damage. The last attacker is remembered for 10 seconds (CombatTagSeconds), so a fall or void death gives kill credit to the attacker, and a death from one's own explosion goes to the last attacker rather than to the player themselves. The sprint bonus is based on a counter that increases on every native sprint start: a sprint hit consumes it, and a new bonus requires a new sprint start (W-tap). Knockback motion cannot recharge it.

All numbers are in one file, pvp_rules.verse: gravity 52.65, takeoff threshold, knockback targets, extra-level velocities, protection window, damage formula, armour points, Armor Plating calculation, fall damage and hitbox calculation (RayBox). The file also contains the RunChecks unit checks, which are run after changes. The principle is that constants are changed only in this file and the test suite is rerun whenever gravity or movement changes. Additional movement tests were needed later too, because tightening gravity to −1950 also lowered knockback and explosion jumps.

The original names minecraft_pvp_manager.verse and mc_rules.verse were changed during the 20 October copyright cleanup to bw_pvp_manager.verse and pvp_rules.verse, the mc_* types to pvp_*, and references to Minecraft were removed from the comments. At the same time, the 16 VFX and 16 audio devices for hit effects are now fetched at game start using Verse tags (bw_pvp_vfx_tag, bw_pvp_audio_tag), because the class rename broke the old bindings. The hit effect is moved to the hit point and switched off after 0.25 seconds; no effect is shown for play area border damage, because moving the device next to the player twice a second caused stutter.

Click hits, hitbox and tuning the feel

A hit comes from a click: one click is one hit, and holding the button no longer hits every 0.28 seconds. Holding only mines a block, but if an enemy is under the crosshair, mining stops. Melee has no cooldown, just as in Minecraft 1.8.9; the victim's protection window is the only rate limit. While drawing a bow, drinking a potion or eating fruit, a click neither hits nor mines. Hit reach is 300 cm, but the look ray reaches blocks at 500 cm, so a click that lands on a block is not a miss.

The hitbox is Minecraft's player box: 0.6 × 1.8 blocks, i.e. 60 × 180 cm from the feet up, which is enlarged for melee and projectiles. The look ray is tested against the box, and the nearest target wins. A teammate under the crosshair absorbs the click without damage and shields those behind them. A critical hit (1.5x) happens when the attacker is falling through the air, is not in water and is not blinded. A hit can also bounce a flying fireball back.

On 20 October the melee knockback felt too strong compared with the lighter feel of the Hypixel server, and the hitbox felt a little small. Knockback from normal and sprint hits was reduced by 20% (MeleeScale 0.8: apex and distance scaled by 0.8, sprint hit 9.21 m/s horizontal and 11.18 m/s up, about 406 cm by calculation), while the Wind Club, bows and explosions were left unchanged. Because of the takeoff threshold, a normal hit on a grounded victim keeps its apex and only loses distance (4.08 m/s horizontal). The melee hitbox growth was raised from 10 cm to 15 cm (MeleeGrow).

That same evening fights felt like they lasted a long time. A temporary combat log (CombatLog) recorded every click: of 171 clicks, 44 got through, 22 were blocked by the protection window and 97 hit a block. The click rate on the server was about 6–7 clicks per second, and all misses came from more than 3.5 metres away while closing in on the opponent, so the hitbox did not need to grow further. Minecraft's 0.5-second miss penalty (miss lockout) was removed (MissPenalty 0), because the server evaluates hits with latency and an aimed click could be read as a miss and lock out the following ones. A protection window of 0.25 seconds was tried and was too fast, and 0.4 seconds was chosen (HurtWindow 0.39 s, which on a 30 Hz server means 12 frames, i.e. 0.40 s; 0.48 s in Minecraft). The log was switched off.

Health, armour and damage calculation

A player has 20 health points, shown in the HUD as ten life crystals (one crystal is two points). On 20 October the crystals replaced the earlier heart icons for copyright reasons. Fortnite's own health and shield display is hidden, and Verse sets the character's maximum health to 20. Golden crystals are the extra protection given by the Golden Pear (Fortnite shield value 4, i.e. two crystals, lasting 2 min). Health regenerates on its own at 0.5 points per second when no damage has been taken for 6 seconds; the Healing Field team upgrade gives +1 point every 2.5 seconds in the home base and the Golden Pear +1 point every 1.25 seconds.

Armour always includes a leather helmet and chestplate; legs and boots are bought from the shop. Armour points are 7 (leather), 9 (Chain Armor), 11 (Plate Armor) and 13 (Crystal Armor), and each point reduces damage by 4%, so the reduction is 28%, 36%, 44% or 52%. The Armor Plating I–IV team upgrade gives each of the four pieces 1, 2, 3 or 5 protection points; as in Minecraft, the total is randomised between half and full and capped at 20, and each point reduces damage by a further 4%. Armour and protection are multiplied in sequence. In playtesting, Armor Plating dropped a hit's damage from 7.2 to 2.0.

Melee damage is the player's base hit of 1 plus the item bonus, multiplied by 1.5 on a critical hit, and the Sharp Blades upgrade adds +1.25 after the crit. Raw sword damage is 5 (Wooden Sword), 6 (Stone Sword), 7 (Iron Sword) and 8 (Crystal Sword), matching Minecraft 1.8. For example, against leather armour the Stone Sword deals 4.32 points (5 hits to kill) and the Crystal Sword 5.76 (4 hits), but against Crystal Armor the Crystal Sword deals only 3.84 (6 hits). Changing the protection window did not change the hit counts, only the time between hits.

Fall damage follows Minecraft's formula, (fall distance − 3 m) points rounded up; 5 cm of tolerance absorbs the 1.5 cm drop of the edge platforms, and the Leap potion increases the allowed distance. Fall and warp stone damage bypass armour, and void also bypasses Armor Plating. Taking damage reveals a player made invisible by the Veil potion.

Gameplay shot from the red bridge towards the red team's castle and bed, with the starting sword (Wooden Sword) in first-person view. The HUD at the bottom shows ten red life crystals, the readings 20/20 and Gold Crystals 0, plus armour (Armor 0 +0) and the arrow count. The shot shows how the Verse-based health and armour display replaces Fortnite's own.
Gameplay shot from the red bridge towards the red team's castle and bed, with the starting sword (Wooden Sword) in first-person view. The HUD at the bottom shows ten red life crystals, the readings 20/20 and Gold Crystals 0, plus armour (Armor 0 +0) and the arrow count. The shot shows how the Verse-based health and armour display replaces Fortnite's own.
Full life crystal: a ruby-red rhombus with a gold border. The crystals replaced the earlier heart icons; each represents two health points, and there are also half, empty and golden versions.
Full life crystal: a ruby-red rhombus with a gold border. The crystals replaced the earlier heart icons; each represents two health points, and there are also half, empty and golden versions.
Crystal Armor shop icon, a deep sapphire-blue chestplate with gold details. The best armour tier gives 13 armour points, i.e. 52% damage reduction, and is kept on death.
Crystal Armor shop icon, a deep sapphire-blue chestplate with gold details. The best armour tier gives 13 armour points, i.e. 52% damage reduction, and is kept on death.

Swords, tools and the Wind Club

Every player starts with a Wooden Sword. The shop's Melee tab has the Stone Sword (10 iron), Iron Sword (7 gold), Crystal Sword (4 emeralds) and Wind Club (10 gold). A bought sword replaces the starting sword and weaker swords in the same hotbar slot, and a worse sword cannot be bought while owning a better one. As a weapon, the pickaxe adds 2 + tier and the axe 3 + tier on top of the base hit, so for example the Crystal Axe is almost as good as a sword. The pickaxe and axe lose one tier on death. An item that has not been paid for (count 0) hits like a fist.

The Wind Club is a knockback stick: its damage is only the base hit of 1, but it adds one Knockback level to the hit, and its knockback is full vanilla strength even after the 20% reduction. A sprint hit with the Wind Club stacks sprint and the Knockback level, which in measurements threw about 8 metres. On 20 October the stick was given a 12-second cooldown (WindClubCooldown): after a hit, a new swing does nothing, a Wind Club recharging notice with seconds appears on screen, and the timer shows on the HUD's Effects row. The shop description says the same.

Items shown in hand are the project's own 3D models. On 15 October the swords seen on the ground and in other players' hands were enlarged to about 62 cm (previously 36 cm) and pickaxes and axes to about 50 cm, and matching first-person models were made for one's own view. On 20 October the Crystal gear was retinted from turquoise to sapphire blue so that it would not resemble Minecraft's diamond gear.

3D model of the Crystal Sword: a turquoise blade, gold crossguard and brown grip. The best sword deals 8 points of raw damage; the model shows the item's look before the 20 October sapphire retint.
3D model of the Crystal Sword: a turquoise blade, gold crossguard and brown grip. The best sword deals 8 points of raw damage; the model shows the item's look before the 20 October sapphire retint.
Wind Club shop icon: a wooden club with gold rings and white wind lines. The stick deals little damage but throws the opponent far, and its use is limited by a 12-second cooldown.
Wind Club shop icon: a wooden club with gold rings and white wind lines. The stick deals little damage but throws the opponent far, and its use is limited by a 12-second cooldown.

Bows, arrows and the draw animation

The Bows tab sells Arrows x8 (2 gold), Longbow (12 gold), Reinforced Bow (24 gold) and Wind Bow (6 emeralds). A bow is charged by holding the use button and fired by releasing it; a full draw takes one second, and the charge power is (t² + 2t) / 3. Releasing at a power below 0.1 does not fire or consume an arrow. While drawing, the player slows down, and the slowdown goes through the same single speed-effect slot of the movement system as potions and sneaking. Fortnite's own bow and ammo inventory are not used; arrows are tracked by the project's own bookkeeping (bedwars_bow.verse).

The arrow's trajectory is calculated on the server as an exact solution of Minecraft's 20 Hz stepping: full launch speed 60 m/s, gravity 20 m/s² and air drag 0.99 per step. The path is traversed in pieces of at most 0.01 seconds so that a fast arrow does not skip a thin wall, and hits are tested against the block grid and players' hitboxes (for projectiles the box is enlarged by 30 cm). Damage is the impact speed in blocks per tick, rounded up, times the damage multiplier: Longbow 2, the others 3, i.e. 6 or 9 points at full draw; a full draw adds a random critical bonus. Knockback points away from the shooter: a normal arrow 5.06 m/s, Reinforced Bow 1.75x (8.01 m/s) and Wind Bow 2.5x (11.45 m/s). The shooter gets a notice of the target's remaining health.

An arrow that hits a block sticks in it at the correct angle and can be picked up for 60 seconds. The player picks it up by walking close (Minecraft's pickup box, about 1.3 m to the sides, line of sight required), and the arrow returns to the inventory; if there is no room, it is not picked up. There is no wait between the reservation and the inventory increase, so the same arrow cannot be claimed twice. There can be at most 32 flying arrows and 64 stuck ones; a flying arrow disappears in 8 seconds, and breaking the supporting block removes the arrow stuck in it. An arrow that hits a player does not stay to be picked up. The arrow model SM_BW_FlightArrow is the project's own (wooden shaft, stone tip, fletching), and Verse sets its mesh and materials at spawn time, because the editor reference could show the default cube after a build.

The first-person bows are separately built rigs (build_bow_rework.py): the pose of the string, limbs and nocked arrow at full draw is stored in the model's UV channels 1 and 2, and the material blends the pose according to draw power. bedwars_viewmodel.verse drives the draw, arrow visibility and a short 0.22-second return motion. When all hand items were switched to new models on 15 October, playtesting showed that the bow draw was no longer visible: the new standard models lacked the draw data. The old rigs SM_VM_Bow, SM_VM_ReinforcedBow and SM_VM_WindBow were restored for one's own hand, and the draw worked again. On 20 October the bows' internal names PowerBow and PunchBow were changed to ReinforcedBow and WindBow.

Wind Bow shop icon: a pale bow with a turquoise gem and wind lines. The best bow deals 9 points of raw damage and 2.5x knockback at full draw.
Wind Bow shop icon: a pale bow with a turquoise gem and wind lines. The best bow deals 9 points of raw damage and 2.5x knockback at full draw.
The project's own flying-arrow model SM_BW_FlightArrow in UEFN: grey shaft, tip and fletching. The same prop flies along its trajectory and sticks to the block surface at the hit point, from where it can be picked back up.
The project's own flying-arrow model SM_BW_FlightArrow in UEFN: grey shaft, tip and fletching. The same prop flies along its trajectory and sticks to the block surface at the hit point, from where it can be picked back up.

Fireball, Powder Charge and Warp Stone

The Utility tab's explosives and the warp stone go through the same hit gate. The Fireball (40 iron) is a projectile similar to Minecraft's large fireball: it leaves from eye level at 12 m/s and accelerates towards 38 m/s, explodes on the first block or anything other than the shooter, and disappears in 8 seconds. A player can have at most 3 fireballs in the air. A hit strikes a fireball through a block-sized box and bounces it in the look direction at 20 m/s, and a bounced fireball explodes in its new owner's name. The Powder Charge (4 gold) is a gunpowder charge placed in an aimed free cell; it drops to the floor, flashes and explodes after 3 seconds. A player can have at most 4 lit charges, and their cells cannot be built in.

The explosion radius is 450 cm for the fireball and 550 cm for the charge. Damage is full up close and falls off towards the edge (enemy fireball 7, charge 10 points at the centre, own explosion only 2), and the ray must see the victim. The push is continuous: at most about 25 m/s horizontally and at most 16 m/s upward, and an explosion above eye level pushes down. One's own explosion allows an explosion jump, which also cancels a fall. The explosion breaks blocks within a radius of 300 or 400 cm depending on material durability; Blast Glass and Bastion Plate withstand it. By the developer's rule, a charge or fireball exploding on top of a Bastion Plate breaks nothing at or below its level, and TNT or a fireball does not break a bed. The first version of the rule did not work in the 30 September playtest, and debugging was left unfinished at the end of the session; in the code the rule now checks whether there is a Bastion Plate cell 60 cm below the explosion point, but the sources do not confirm that the fix works in game.

The Warp Stone (4 emeralds, stack of up to 16) is a throwing stone that teleports the player to the hit point. Its trajectory is that of Minecraft's ender pearl: 1.5 blocks per tick, i.e. 30 m/s, gravity 0.03 blocks per tick squared and air drag 0.99, so a 45-degree throw carries about 51 m in about 3.2 seconds. The landing spot is chosen according to the hit surface's orientation so that the player's capsule fits, and if it does not fit, no teleport is made and no damage is charged. A successful teleport costs 5 health points as fall damage, which bypasses armour and gives any kill credit to the last attacker.

On 1 October the death boundary was turned into an adjustable setting, VoidKillZ, about 200 m below the floor (Z −100 m), so that a falling player has time to throw a Warp Stone and save themselves within about 4 seconds. At the same time a bug was fixed where the stone disappeared immediately if thrown from deep below. Playtesting confirmed that the rescue throw works. On 14 October the icons of the shop's special items were redone: the old angular Golden Fruit, Fireball, Powder Charge and Warp Stone icons were replaced with rounded, outlined renders, and on 20 October the Golden Fruit became the Golden Pear.

The shop's row of special items with the old icons: Golden Fruit (3 gold), Fireball (40 iron), Powder Charge (4 gold) and Warp Stone (4 emeralds). The icons were small and angular, which led to redoing all the shop icons.
The shop's row of special items with the old icons: Golden Fruit (3 gold), Fireball (40 iron), Powder Charge (4 gold) and Warp Stone (4 emeralds). The icons were small and angular, which led to redoing all the shop icons.
The Utility tab of the release version's shop window with the new icons: Golden Pear, Fireball, Powder Charge and Warp Stone with their prices. The HUD at the bottom shows the life crystals, the Gold Crystals reading, tool tier, armour and arrows. The currency readings are from the test top-up.
The Utility tab of the release version's shop window with the new icons: Golden Pear, Fireball, Powder Charge and Warp Stone with their prices. The HUD at the bottom shows the life crystals, the Gold Crystals reading, tool tier, armour and arrows. The currency readings are from the test top-up.
Fireball shop icon: a stone ball covered in glowing cracks with an orange flame trail. The accelerating fireball explodes on the first hit and can be hit back.
Fireball shop icon: a stone ball covered in glowing cracks with an orange flame trail. The accelerating fireball explodes on the first hit and can be hit back.
Powder Charge shop icon: a wooden powder keg with a red band and a burning fuse. The charge explodes 3 seconds after being placed.
Powder Charge shop icon: a wooden powder keg with a red band and a burning fuse. The charge explodes 3 seconds after being placed.
Warp Stone shop icon: a turquoise crystal in a gold ring. The throwing stone teleports the player to the hit point at a cost of 5 health points.
Warp Stone shop icon: a turquoise crystal in a gold ring. The throwing stone teleports the player to the hit point at a cost of 5 health points.

From test players to single-player bots

On 29 September the test players were converted from practice targets into real players (bedwars_test_players.verse) so that a full round could be played while developing alone: they wait in the lobby, move to their teams' bases at game start, respawn on their own pad, die permanently after their bed is broken, and the winner, kill credits and stats are calculated as for humans. All hit paths (melee, bow, explosion, fireball and warp stone) see them. In practice mode (PracticeMode) they remained targets on the centre island alongside the guards. On 21 October PracticeMode was switched off because it started the game with a single player, and on 2 November the Island Settings Debug mode and test players were removed for release. Test players exist only in UEFN's private test session, not on the published island.

When the game was released on 7 November as Bedwars: The Origin, a player who joined alone was left waiting in the lobby for a second player. Single-player bots (bedwars_bots.verse) were made that same evening. When a player is alone in the lobby, a countdown message on screen says that bots will come if nobody joins; after 60 seconds (BotSoloWaitSeconds) two defender bots appear on the player's neighbouring islands and a 5-second countdown begins. If another human player joins before the start, the bots are cancelled. The developer chose defenders over bridge-building attackers.

The bots are guards, because only guards also work on the published island. Every base has its own guard spawner (BW_Practice_Target_01–08), and a bot spawns from the base's nearest one. A bot is stored as a test-player record, so the bed, respawn, final kill, winner and sidebar rules work for it as they are. A bot stays on its own island (radius 17 m): it walks via the navigation API towards an enemy who has come onto the island, hits from 2.6 metres every 0.9 seconds with a wooden-sword strike (raw damage 4) through the same hit gate, and otherwise returns to its bed. Guards do not obey physics, so their knockback is flown with the same scripted flight as the practice targets. While the bed stands, a bot respawns in 5 seconds using the spawner's own timer; after a final kill the spawner is closed. Bot matches do not accumulate permanent stats, so that the global top 10 list cannot be padded with bot kills.

In the first test a black guard that could not be hit appeared in the player's own base, because the code had enabled all 16 guard spawners; now only the bots' own are enabled. The bots were first dressed in the Creative Mannequin outfit, but that is the same orange look as the test players, so the outfit of the eight spawners was changed to Fortnite's default outfit, Recruit. In the retest the bots spawned, fought and respawned, and the final kill worked after the bed, and the bots were judged good. The guard still holds a rifle, even though it does not shoot.

A black guard holding a rifle stands next to the bed in the player's own base, with the player's wooden sword in the foreground. The first bot version enabled all guard spawners, so a guard also appeared in the player's own base; after the fix only the two bots' spawners are enabled.
A black guard holding a rifle stands next to the bed in the player's own base, with the player's wooden sword in the foreground. The first bot version enabled all guard spawners, so a guard also appeared in the player's own base; after the fix only the two bots' spawners are enabled.

Final implementation

pvp_rules.verse contains the rules and constants as pure functions (knockback target, protection window, damage, armour, Armor Plating, arrow damage, fall damage, explosion push, hitbox) and their unit checks. bw_pvp_manager.verse is the in-level device BW_PvP_Manager and the only damage gate: it tracks victims' protection windows, combat tags, sprint streaks and the server copy of airborne state, writes one velocity per hit and shows hit effects from devices found via tags. The interfaces pvp_combat_host, pvp_movement_hooks and pvp_knockback_driver connect it to the combat code, the movement system and the guards' flight.

bedwars_combat.verse handles click hits, item damage, the Wind Club cooldown, crits, armour and Armor Plating sources, health regeneration, the HUD life crystals and Effects row, the fireball, the powder charge, explosions, and potions and the Golden Pear. bedwars_bow.verse handles arrow trajectories, hits, stuck arrows and pickup; bedwars_viewmodel.verse the bow draw animation; bedwars_pearl.verse the Warp Stone's flight, landing spot and 5-point cost. shift_sneak.verse implements knockback as an involuntary jump and owns the single speed-effect slot. bedwars_practice.verse contains the practice targets, the guards' scripted flight and the KnockbackSuite test suite, bedwars_test_players.verse the test players as real players, and bedwars_bots.verse the single-player bots.

The test switches are off in the release: PracticeMode, KnockbackSuite (switched off on 7 November), CombatLog, UpgradeSuite and the Island Settings test players. According to the notes, the combat code files use generic names for copyright reasons and do not mention Minecraft; the comments use the word classic.

Key values

WhatValueWhat it affects
Island gravity−1950 (52.65 m/s²)All knockback targets and the guards' scripted flight are calculated for this gravity.
Takeoff threshold (TakeoffMin)10 m/sA grounded physics character only leaves walking mode at about 9 m/s vertical velocity; a hit always gives at least 10 m/s.
Normal hit, vanilla5.06 m/s horizontal, 10.08 m/s upMatches Minecraft's 1.99-block flight (measured 196 cm vs. 199 cm).
Sprint hit, vanilla10.30 m/s horizontal, 12.50 m/s upMatches a 4.94-block flight (measured 508 cm vs. 494 cm).
Melee reduction (MeleeScale)0.8Apex and distance of normal and sprint hits scaled by 0.8 from 20 October; Wind Club, bows and explosions unchanged.
Air-hit horizontal multiplier (AirHitGain)1.4A hit on an airborne victim throws 1.4x as far horizontally.
Protection window (HurtWindow)0.39 s (12 frames = 0.40 s)Within the window a weaker hit is rejected and a stronger one deals the difference without knockback; 0.5 and 0.25 s were tried.
Hit reach300 cm (500 cm to blocks)Length of the look ray with which melee hits players.
Hitbox60 × 180 cm, + 15 cm melee, + 30 cm projectilesMinecraft's player box, enlarged; melee growth was raised from 10 cm to 15 cm.
Miss penalty (MissPenalty)0 sMinecraft's 0.5 s lockout was removed because server latency turned aimed clicks into misses.
Combat tag10 sThe last attacker gets credit for a fall or void death within this time.
Health20 points = 10 life crystalsRegenerates 0.5 points per second after 6 seconds without damage.
Raw sword damage5 / 6 / 7 / 8Wooden, Stone, Iron and Crystal Sword; crit ×1.5, Sharp Blades +1.25.
Armour points7 / 9 / 11 / 13 (4% per point)Leather, Chain, Plate and Crystal Armor: damage reduction 28–52%.
Wind Club cooldown12 sAfter a hit the stick does not work until the time has passed.
Arrow launch speed and gravity60 m/s, 20 m/s², air drag 0.99 per 1/20 sFull-draw arrow; charge power (t² + 2t) / 3, full draw 1 s.
Arrow damage at full draw6 (Longbow) / 9 (Reinforced, Wind Bow)Calculated from impact speed, plus a random critical bonus.
Bow knockback5.06 / 8.01 / 11.45 m/sNormal, Reinforced Bow (1.75×) and Wind Bow (2.5×), horizontal.
Stuck arrow60 s, at most 64Picked up by walking close; at most 32 in flight.
Fireball12 → 38 m/s, radius 450 cm, damage 7At most 3 in the air per player; a hit bounces it at 20 m/s.
Powder Charge3 s fuse, radius 550 cm, damage 10At most 4 lit charges per player.
Warp Stone30 m/s, about 51 m, cost 5 health pointsTrajectory of Minecraft's ender pearl; the damage bypasses armour.
Death boundary (VoidKillZ)−10000 cmAbout 200 m below the floor, so a falling player has time to save themselves with a Warp Stone.
Single-player bot wait60 s + 5 s countdownBots only when there is exactly one player in the lobby; 2 defender bots on neighbouring islands.
Bot strikeraw damage 4, every 0.9 s, 2.6 m reachA bot respawns in 5 seconds while its bed stands.

Final state

In the released game all damage goes through one gate (bw_pvp_manager.Resolve), knockback is implemented as an involuntary jump with the pvp_rules.verse constants, and the measured flights matched Minecraft 1.8.9 to within a few percent before the 20% melee reduction made on 20 October. The protection window is 0.4 s, there is no miss penalty, the melee hitbox is enlarged by 15 cm, and swords, armour, the Wind Club with its 12-second cooldown, three bows with retrievable arrows, the fireball, the Powder Charge and the Warp Stone are in use. A player who joins alone plays after 60 seconds against two defender bots in the Recruit outfit, and bot matches accumulate no stats. Left open: the reduced knockback was not re-measured in game, the victim's air control (about 28.5 m/s² while sprinting) can still dampen knockback and Verse has no setting for it, a swing animation for each click is missing, the Wind Club cooldown was not separately confirmed in game, the guard bot holds a rifle, and a full live match with several human players, with and without bots, was unverified at release.

Next chapter: Shop & inventory →