On this page
Battlefield 2142, area by area: what differs from Battlefield 2
Battlefield 2142 is Battlefield 2's engine one generation later, built from the same source
tree: its Linux server still calls its main object BF2Engine and its Python package
bf2. The port treats it that way: one code base, and a branch wherever 2142's own function
does something else. This page walks the wiki's areas and says for each what is the same, what is 2142's,
and where to read on.
How much is shared#
The survey measured it before any porting, without running a 2142 program:
| Measure | Value |
|---|---|
| function names of 2142's Linux server that Battlefield 2's server also has | 23,799 of 26,794 (88.8 %) |
console command names of BF2142.exe that BF2.exe also has | 1,800 of 2,300; 500 are new |
| script commands in the data: only 2142 / shared / only Battlefield 2 | 413 / 1,427 / 227 |
| client functions paired with a Battlefield 2 function by the function map | 27,645 of 40,702: 20,236 identical, 7,409 changed |
| levels | 20; all 51 combinations of level and game mode load on the port's server |
| Python: host functions, object methods, events | 69, 18, 64 (52 host functions shared) |
"Changed" mostly means small: a field at another offset, a constant, one new branch. That is why a twin's test counts only generously in the parity count: the map cannot see a small difference, and small differences are what 2142 is made of. The count today: 7,193 of 13,319 functions strictly tested.
Area by area#
| Area | The same as Battlefield 2 | 2142's own | Read |
|---|---|---|---|
| Engine, objects | the object system, templates, the console, the tick | 413 script commands of its own; the port stores those it does not yet act on and runs them as recorded no-ops | objects, what the games share |
| Physics | nodes, responses, collision, the vehicle parts | the point node's drag in another operand order; a "new soldier response" variable; walkers | physics, projectiles |
| Network | the transport, the protocol version, the connect request, ghosts and the control block | its own build number; about 17 new game events and 11 gone; its own connection type table, read by the same code | packets, ghosts, prediction |
| Vehicles | springs, engines, seats, cameras, spawners | walkers (legs as a new template type), hover craft where Battlefield 2 has wing aircraft (the data has no wing or rotor engines), drop pods, EMP; a Titan never blocks a spawner | boats and aircraft, seats and cameras, spawners |
| Soldier | input, stances, sprint, ladders, the animation runtime | the turn rate clamped; prone-delay-after-jump 0.2 s where Battlefield 2 has 1.0; a soldier going prone is lifted 0.3 m first; a breath effect | stances, prediction walkthrough |
| Weapons | the fire arm's components, deviation, projectiles, damage and armor | weapon heat and gun sway in more places; unlocks and field upgrades; gadgets as new components; a Titan's damage is clamped to its hit points | fire arms, damage and armor |
| Audio | the same library design, codecs and templates | its own library build; other volume defaults (music and help voice 0.5); voice-over files in another folder | sound engine, voices and space |
| HUD | the node tree, the builder's commands, the variable layer | its own writers for the weapon panel, crosshair, capture interface, vehicle armor; the Titans' row | the HUD of 2142 |
| Menus | Flash menus on the same player | the menu files are stored scrambled and unscrambled at load; 23 native objects with 687 methods; one localization table for all languages | the Flash layer |
| Server, rules | start-up, tickets, control points, scoring's events | Titan mode; seven game modes; persistence calls for ranks and unlocks | game modes, start-up, kills and scoring |
| Bots | the AI library's design | its own rule for which team a new bot joins; walker entries; the Titan's turrets have a bot template | bots |
| Levels, assets | every binary asset format has Battlefield 2's header and versions | booster pack archives | what goes into a level, terrain |
| Python | the same embedded Python and bf2 package shape | 17 more host functions; the Titan* events; isTitan, getMaxDamage | the Python layer |
The three things 2142 is known for#
Titans#
A Titan is a remote controlled object of its own type with a shield, guns, four consoles and a core. Its hit points are its team's tickets; missile silos on the ground fire at it for whoever holds their control point; at or below 61 percent of the hull the shield drops. The whole chain, with the functions of 2142's Linux server and what the port runs, is on game modes. The HUD's row of silos and Titan parts is on the HUD of 2142.
Pods#
A soldier can spawn in a drop pod: the spawn point's template says so (spawnInPod, podSpawnVehicle). The notes list bots not using drop pods among the differences of a co-op round against the original.
Unlocks and field upgrades#
Unlocks and field upgrades reach the engine through Python's persistence functions (pers_plrGiveFieldUnlock, pers_plrResetFieldUnlocks, pers_plrSetRank). The port has the host functions the game modes need; eleven that only store a player's progress are stubs, marked as such.
Where the port stands#
The notes' area table, in its own words:
| Area | Status |
|---|---|
| data, archives, formats | surveyed: all the same as Battlefield 2's |
| renderer, shaders | partial: levels draw with 2142's own shaders; post production runs |
| menus, HUD | started; the HUD's missing functions are listed in notes/bf2142/hud-missing.md |
| sound | started: 2,024 of 2,028 files of the test level load |
| physics, soldier, vehicles | started: walkers load as templates; their legs' physics is open |
| Titan mode | partial: a Titan round runs to its end against the original's numbers |
| bots | partial: co-op rounds are played; fewer kills and less vehicle use than the original's bots |
| Python game modes | partial: all seven modes run; 11 host functions are stubs |
"Partial" and "started" are meant. Battlefield 2142 can be joined and played on the port; it is the second-most complete of the three games, and its pages say where each piece stands.
How it is tested#
The table "Where the port stands" is a hand-written summary; each of its rows rests on the area's own page and that page's tests. What is counted, function by function, is on parity; 2142's test programs run in a 2142 process, and a test of a Battlefield 2 twin alone does not count as strict. 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 game switch | bf2_core::Game::Bf2142, chosen from the data root |
| 2142's console command table | crates/bf2-con/src/table_2142.rs |
| 2142's host functions | crates/bf2-server/src/hostfns_2142.rs |
| Titan mode | crates/bf2-server/src/titan.rs |
| template properties only 2142 has | crates/bf2-objects/src/template/extra_2142.rs |
| the function map and its tables | re/data/bf2142/ |
Notes: notes/bf2142/README.md, notes/bf2142/survey.md, notes/bf2142/STATUS.md, notes/bf2142/funcmap.md, notes/bf2142/titan.md. The game's own page: Battlefield 2142.
docs/dev/games/bf2142-by-area.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.