How revival-forge/bytefield works
Bytefield is a Rust engine for playing Battlefield 1942 and supported mods using the player’s own game data. Its principal workflow is to find game content, load a level, run the simulation, and present play through the client; bots can supply player-like inputs, and a separate server supports Bytefield multiplayer. The graph preserves documented modes, graphics, and content-management capabilities. Some subsystem paths and links are based on the file tree or README rather than sampled implementation, so those relationships are marked unverified where appropriate.
Main entry points: lib.rs Simulation core · main.rs Client startup · mod.rs Play loop · level.rs Level rendering
Components 19
Game client
- Client startup
crates/client/src/main.rs - Play loop
crates/client/src/play/mod.rs - Level rendering
crates/client/src/level.rs - Graphics settings
crates/client/src/settings.rs
Content and assets
- Game assets
crates/client/src/assets.rs - Content discovery
crates/content/src/discover.rs - Content configuration
crates/content/src/config.rs
Simulation and bots
- Simulation core
crates/sim/src/lib.rs - Game mechanics
crates/sim/src - Bot interface
crates/sim/src/bot_api.rs - Team bots
crates/sim/src/bots3/mod.rs - Bot skills
crates/sim/src/bots3/body/shooter.rs - Alternative bots
crates/sim/src/bots2/mod.rs
Multiplayer
- Game server
crates/server/src/lib.rs - UDP transport
crates/server/src/udp.rs
Data foundations
- Script language
crates/con-lang/src/session.rs - Game formats
crates/formats/src - Virtual filesystem
crates/vfs/src/lib.rs
Other components
- Player
Connections 20
- Player → Client startup: starts
README.md - Client startup → Content discovery: finds content
crates/client/src/main.rs - Client startup → Content configuration: loads config
crates/client/src/main.rs - Client startup → Play loop: starts play
crates/client/src/main.rs - Play loop → Simulation core: steps simulation
crates/client/src/play/mod.rs - Play loop → Level rendering: updates view
crates/client/src/play/mod.rs - Level rendering → Game assets: loads assets
crates/client/src/level.rs - Level rendering → Graphics settings: reads settings
crates/client/src/level.rs - Simulation core → Game mechanics: uses mechanics
crates/sim/src/lib.rs - Simulation core → Bot interface: builds bot view
crates/sim/src/bot_api.rs - Team bots → Bot skills: uses skills
crates/sim/src/bots3/mod.rs - Alternative bots → Bot skills: uses skills
crates/sim/src/bots2/mod.rs - Simulation core → Team bots: selects bots
crates/sim/src/lib.rs - Simulation core → Alternative bots: selects bots
crates/sim/src/lib.rs - Player → Game server: joins multiplayer
README.md - Game server → UDP transport: uses transport
crates/server/src/lib.rs - Client startup → Game server: connects to
- Simulation core → Script language: loads scripts
- Simulation core → Game formats: reads game data
- Game assets → Virtual filesystem: reads files