BF2.US bf2-rsdeveloper wiki Parity Discord bf2.us
On this page

What goes into a level

A level is a folder of CON scripts and binary maps that places everything on the other asset pages: the terrain, hundreds of static objects, and per game mode the spawners, control points and spawn points.

BF22142Heroes
village, game mode gpm_ctf 16: the 583 objects the editor loads, from above. Most are SimpleObjects (houses, walls, trees); the spawners, control points, CTF objects and spawn points come from the game mode's GamePlayObjects.con.
village, game mode gpm_ctf 16: the 583 objects the editor loads, from above. Most are SimpleObjects (houses, walls, trees); the spawners, control points, CTF objects and spawn points come from the game mode's GamePlayObjects.con.
levels/<map>/server.zip Init.con entry point Heightdata.con heightmap cluster HeightmapPrimary.raw Terrain.con terrain setup StaticObjects.con buildings, props Water.con, Sky.con, Sounds.con CompiledRoads.con, Overgrowth/ AIPathFinding/ bot navigation gamemodes/gpm_cq/16|32|64/ GamePlayObjects.con what the server (and client) simulate levels/<map>/client.zip Colormaps/, Detailmaps/ Lightmaps/ (terrain, objects) terraindata.raw, Envmaps/ Hud/ minimap what only the client draws levels/<map>/Info/ <map>.desc modes, sizes, music *_menuMap.png, loadmap.png what the menus show Load order (Init.con) 1 run Heightdata.con 2 run Terrain.con 3 run Sky.con, Sounds.con 4 run CompiledRoads.con 5 Undergrowth / Overgrowth 6 run Water.con 7 gameLogic.setTeamName, setKit, ... 8 the game mode's GamePlayObjects.con
The level folder (from the level authoring page).
PartFilesRead by
terrain (layer by layer)Heightdata.con, HeightmapPrimary.raw, Terrain.con, colour / detail maps, terraindata.rawbf2-terrain
static objectsStaticObjects.con (Object.create lines over templates like the house)bf2-editor level.rs LevelData::load
game modesGameModes/<mode>/<size>/GamePlayObjects.con: spawners (the jeep), control points, spawn pointsthe same
overgrowth, undergrowth, water, sky, roadsOvergrowth/*, *.tai, Water.con, sky.con, CompiledRoads.conbf2-terrain, bf2-render
lightmapsper static object and terrain patch, baked by the 2005 editorbf2-render

Read on#

How it is tested#

  • A level's settings (crates/bf2-editor/tests/level_settings_bf2.rs): one shipped level's Init.con values (teams, kits, tickets per size, the view distance) are read, saved and read again.
  • Every level's parts: the terrain formats (terrain), the simple shadow maps of every level (crates/bf2-render/tests/retail_shadows.rs), and the pure server's check that every shipped level passes (server start-up).
  • In play: every scenario loads a level on a real server and client.

No address stands on this page. The level load's order is on frame and tick order and has its own tests there.

In the code#

WhatWhere
a level's archives and their mountingcrates/bf2-fs
terrain, heightmaps, undergrowth and overgrowth filescrates/bf2-terrain (terrain in the engine)
the level load's order of scripts on the servercrates/bf2-server (start-up and main loop)
a layer's objects for a game modegame modes
drawing the levelcrates/bf2-render
editing and exporting a levelcrates/bf2-editor
Source: docs/dev/assets/level.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.