On this page
Battlefield Heroes, area by area: what differs from Battlefield 2 and 2142
Battlefield Heroes is the third generation: built from Battlefield 2142's code, with a newer compiler, a third-person camera and a cartoon look, and with most of 2142's military depth taken out and classes, abilities and widgets put in. The port runs it as the 2142 engine plus a product switch, with the Heroes-only systems in their own crates. This page walks the wiki's areas and says what Heroes kept, what it changed, and where to read on.
The short version#
| Battlefield 2 | Battlefield 2142 | Heroes | |
|---|---|---|---|
| camera on foot | first person | first person | third person |
| what a soldier carries | a kit he can drop | a kit built from unlocks | a class with fixed weapons, abilities and widgets |
| health | 100, one model | 100 | 80 / 110 / 150 by class; shields; damage over time |
| squads, commander | yes | yes | none |
| control blocks a second | 20 | 20 | 10 |
| floating point | x87, values kept in registers | the same | a newer compiler: intermediate results stored as 32-bit floats |
| game modes | conquest, co-op | + Titan and five more | team deathmatch, capture the flag, the hill, team elimination, basic training |
| bots | yes | yes | none in the original; the port adds them |
| share of its functions that a test of their own names | the largest | in between | the smallest: today's numbers are on parity |
Heroes is the youngest port and has the most open rows. Its pages are also the most careful about saying so: every row of every sweep carries a verdict.
Area by area#
| Area | Inherited from 2142 | Heroes' own | Read |
|---|---|---|---|
| Engine, arithmetic | the object system, templates, the tick | the compiler stores intermediate floats where 2142 keeps them in a register, and sums some products in another order: the same formula gives another last bit | float precision, the oracle |
| Network | packets, ghosts, the control block | ten blocks a second; two more gates on the block's writer, off in the shipped settings; what a weapon key costs | the control block, prediction walkthrough |
| Vehicles | springs, engines, seats, spawners | the wheel's speed step divides where the others multiply by a reciprocal; pocket vehicles a hero calls from an item; ducking in a tank seat | drivetrain, widgets |
| The hero | the soldier's input and stances, the animation runtime | three classes with their health and speeds; a speed factor that enters the speed twice as read | classes, stances |
| Weapons, damage | fire arms, projectiles, the armor component, explosions | damage by distance from each weapon's template; critical hits; the blast's cover ray lets thrown things through; shields as the armor's own; the point node's drag by depth | Heroes: damage, damage and armor |
| Abilities | the item and fire arm classes an ability is built on | 18 abilities with five levels each: an item, an effect on the user, a cooldown | abilities |
| Widgets | about 30 one-key items on the item bar: tonics, rocket jumps, pocket jeeps, cakes | widgets | |
| HUD | 2142's node tree, variable layer and several of its writers | 39 HUD script files; the item bar, the level arc, hit points as a number, the personal lines | the Heroes HUD, the HUD of 2142 |
| Game modes | conquest's script and control points | team deathmatch on conquest's script with bases that cannot be taken; capture the flag with its own objects; the hill; team elimination in heats | game modes |
| Scoring | the damage handler and its events | the kill event carries the attacker's active ability; assists paid another way; experience, valor and prestige | kills and scoring |
| Bots | the engine's plumbing for an AI library, and 2142's AI scripts in the data | the original ships no AI library: every Heroes bot is the port's addition, marked as one | bots |
| Tutorial, missions | basic training's task panel; missions with criteria and their lines on the HUD | tutorial and missions | |
| Audio | the library's design | its own sound library file | sound engine |
| Python | the host module and events | 75 host functions, 24 object methods, 86 events: abilities, experience, customisation | the Python layer |
What "as read" means on the Heroes pages#
Battlefield 2 was ported with the original server running beside the port, tick for tick. Heroes has no dedicated server program to run beside: the original is a client whose code is called function by function in the oracle or read in the listing. So the Heroes pages lean on sweeps: passes over every HUD variable, every widget, every ability, every class value, each row read in the original against the port's code and given a verdict. A verdict is one of:
| Verdict | Meaning |
|---|---|
| SAME | read on both sides, body against body |
| DIFFERS | a filed difference, with what a player sees |
| MENDED | changed in the port, with a test that was red before |
| PLAYED | seen in a client by a scenario |
| NOT WIRED | ported and not called |
| not settled | the reading is not finished |
Reading the notes explains how to read a sweep file, and how a port is made what each word claims.
Where to start, by question#
| You want to know | Go to |
|---|---|
| why a number in the port differs from what you remember | questions players ask |
| a class's health and speed, and what Leg It does | classes |
| why a shot did the damage it did | Heroes: damage |
| what an ability does at each level, and whether the port has it | abilities |
| why a widget's slot is crossed out | widgets, the HUD |
| why the tickets stand still while you hold every flag | game modes |
| who killed me, the scoreboard, the end-of-round card | the screens around the game |
| what basic training should show | tutorial and missions |
| why an alt-fire from the workbench does nothing | the workbench |
| how far a passenger can look, why a tank has no third seat, why planes veered | Heroes' vehicles |
| everything that is still open, from every page | what is still open |
| how much of Heroes is proven | parity |
How it is tested#
This page is a guide through the Heroes pages; its statements about what was read rest on the sweeps (sweeps, wall, soak), and a sweep's verdict SAME is a reading, not a test. What is checked is on the feature checklists, per feature and per situation. The wiki's test checks that every link and anchor on it leads to a page of the build and that its diagrams are the ones the script draws.
In the code#
| What | Where |
|---|---|
| the product switch | bf2_core's game and product, chosen from the data root |
| rules: abilities, flags, heats, explosions, dates | crates/bfh-game |
| the client's Heroes systems: missions, message lines, outlines | crates/bfh-client |
| host tables and functions | crates/bfh-server |
| data and templates | crates/bfh-data |
| menus | crates/bfh-ui |
Notes: notes/bfheroes/README.md and the sweep files (hud_sweep.md, screen_sweep.md, widget_sweep.md, ability_sweep.md, class_sweep.md). The game's own page: Battlefield Heroes.
docs/dev/games/heroes-by-area.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.