OpenBF is an open-source Rust reimplementation of the original Star Wars: Battlefront (2004) and Star Wars: Battlefront II (2005), combining both classic games into one native experience, currently supported on Windows and Linux (Mac coming soon).
OpenBF uses a newly written game engine. Players supply both game copies from either the PC, Xbox, or PS2 versions of the game you own, and OpenBF builds the game from it. Every copy plays the same game, so everyone can play together.
Current status: Playable work in progress, with all 34 ground maps included. Some game modes and features are still under development.
Unofficial fan project. Not affiliated with or endorsed by Lucasfilm, Disney, Electronic Arts, LucasArts or Pandemic Studios. This repository contains no game assets: you need your own copies of both games (see What you need). Everything the game needs is extracted from your copies on your own machine.
Want to help develop it? Start with the open issues. Comment on an unassigned task and wait for confirmed scope and assignment before coding, so contributors and automated agents do not duplicate work. See CONTRIBUTING.md.
One command turns your copies of the two games into one game file:
git clone https://github.com/sprucey149/openbf.git cd openbf mkdir iso # put your own copies of both games here; see "What you need" below python3 scripts/pack.py ./dist/openbf
The game's icon is a clone trooper's helmet, which pack.py draws from your own copy of the games when it packs.
On Windows it is inside dist\openbf.exe. On macOS it is the icon of dist/openbf.app. On Linux,
scripts/install_linux.sh adds the game and its icon to your applications menu. If the icon cannot be drawn,
pack.py says so in one line and packs the game anyway (see branding).
- Both games. You need a copy of Battlefront (BF1) and a copy of Battlefront II (BF2). It will not build with only one of them.
- Any version. PS2 and Xbox discs and PC installs all work, on their own or mixed: PC copies of both games, Xbox discs of both, PS2 discs of both, or any mix such as PC BF1 with Xbox BF2.
- Same game whichever you use. The copy you supply changes how the game looks (texture sizes and some artwork), never how it plays. The Status note below says how much of this works today.
- For best results, add PC and Xbox copies. The build keeps the largest copy of each texture, as long as it is the same painting. The PC copy is the largest much more often: about 680 textures across the two games, against 12 where the Xbox copy is larger. Those are mostly on BF2 Geonosis, such as a sky at 1024x256 against the PC's 512x128.
Status: PS2 discs, Xbox discs and PC installs are supported. Either Xbox disc can replace that game's PS2 disc, PC BF1 can supply BF1 beside any BF2, and PC BF1 with PC BF2 builds without any disc. All 34 ground maps are included. The six experimental space maps remain disabled by default while round endings are unfinished.
Xbox and PC copies assemble some buildings differently. Repairs reuse same-copy pieces and existing donor vertices where possible. Selected structures and plants use locally generated, donor-textured contact surfaces as a last resort. These can look coarse, faceted or stretched. No game meshes or textures are shipped here.
Donor terrain is fitted to PS2 ground heights and holes, including visible distant terrain. Focused drawing repairs cover Cloud City rails and a chamber, Rhen Var roofs and tunnels, Utapau cliffs and distance LODs, a Death Star door, capital-ship panels, TIE nose/braces and Hailfire casings. PS2 asset controls remain byte-identical; collision and simulation inputs stay unchanged.
Fresh checked Linux packages from PS2 with donors, Xbox alone, and PC BF1 with Xbox BF2 passed packed headless scene reports on all 40 maps. Each actual packed executable matched the PS2 control at every tick in 134 mission/seed scenarios, 1,800 ticks each. The opt-in space package contains 67 missions. These bounded checks do not establish equality of every possible input or a running-original comparison.
Full artwork alignment remains unfinished. Some foliage, vehicle caps, Citadel ridge surfaces and partial-alpha objects still have gaps or need measurement. Donor foliage counts differ on six maps; water and some props retain plain colors, with 94 untextured draw slots across 26 scene reports. See #98 and #99. Live play and a running-original PS2 comparison remain unchecked.
| You supply | What you get today |
|---|---|
| PS2 BF1 + PS2 BF2 | Builds, with the PS2 textures |
| PS2 BF1 + PS2 BF2 + any Xbox or PC copies | Builds, with larger textures where the artwork matches |
| Xbox BF1 and/or Xbox BF2 in place of that game's PS2 disc | Builds, including all 34 ground maps, with the artwork caveats above |
| PC BF1 with a console BF2 | Builds, including all 34 ground maps, with the artwork caveats above |
| PC BF1 + PC BF2, no discs | Builds, including all 34 ground maps; the Instant Action menu uses a replacement backdrop |
| Any working set above + the DLC folder | Builds, with Kit Fisto and Asajj Ventress available in Hero Options |
| Only one of the two games (including a single PC game) | Refused |
Everything goes in iso/. File and folder names don't matter, because each input is recognized by what's
inside it. One tree that works, with a PC install copied or symlinked in as a whole folder:
iso/
SWBF1.iso a disc image, any name
SWBF2.iso a disc image, any name
My PC Battlefront/ any name
GameData/Data/_LVL_PC/ a PC BF1 install
My PC Battlefront II/ any name
GameData/data/_lvl_pc/ a PC BF2 install
DLC_XBOX/ optional, see below
- Disc images must be plain dumps: a PS2
.iso, or an Xbox.isoincluding trimmed.xisoimages and full dumps. CHD, CSO, ZSO, zip, 7z, rar and gzip files are refused, so unpack them first. Raw BIN dumps are refused too, so convert them to a 2048-byte.iso. - Disc images must be the original discs. A rebuilt or modified PS2 disc is refused, and so is a folder of files extracted from a disc: add the disc image instead.
- PC copies are the classic 2004 and 2005 releases, such as those from Steam or GOG. Aspyr's Classic Collection is refused.
- Something unusable doesn't stop a build as long as both games still have a source. The summary names what was refused and why.
To see what your folder adds up to without building anything, run python3 scripts/input_scan.py
(python scripts\input_scan.py on Windows). It prints what it found, what it will use and what it refused, and
what to add if something is missing.
To use copies stored somewhere else, name them instead: --iso1 <file> and --iso2 <file> for BF1 and BF2 disc
images, --pc1 <folder> and --pc2 <folder> for PC installs, and --iso-dir <folder> to scan another folder in
place of iso/.
Kit Fisto and Asajj Ventress were Xbox downloadable content for BF2. The practical way to get them is the
community pack Xbox DLC and Title Update Content for PC
on ModDB. Download it, unpack it, and put its DLC_XBOX folder anywhere in iso/:
iso/
DLC_XBOX/
addme.script
data/_LVL_PC/SIDE/dlc.lvl
...
Leaving the rest of the pack beside it is fine, for example iso/ADDON_XBOX/DLC_XBOX/: only these two heroes
are used, and none of the pack's maps or other content. Turn on DLC Heroes in Instant Action's Hero Options to use them in the Republic and CIS hero slots on BF2 battles
that have those heroes. The option starts off. These are the community's adapted versions of the heroes rather than the Xbox originals,
and they have no voice lines of their own. Thanks to the pack's authors: its heroes are by Gogie and Ryan Hank,
assembled by iamashaymin, with Xbox map conversions by SleepKiller. Without the folder, the game builds unchanged.
Adding or removing it bakes only the DLC heroes and the sound names again on the next run.
pack.py extracts the discs, bakes the assets, builds the game, and packs everything into
dist/openbf (about 3 GB). A build of about 3.9 GiB or more becomes a small dist/openbf plus dist/openbf.pak,
on every OS: keep the two together, and on a filesystem other than FAT32, which cannot hold a file of 4 GiB or more.
Run the game from anywhere; it keeps your profile and its bug-report snapshots in an openbf_data/ folder beside
itself. Run the script again after pulling new code: it skips what is still current. The bake is in parts (maps, sides,
sounds, load screens and so on), and only a part whose output the new code changes is baked again:
a pull that changes no baked output bakes nothing. --explain says, for each part, whether it was reused or why it is baked again. A build that was
stopped goes on from the part it was in. A new ffmpeg bakes the sound parts again once.
dist/openbf and dist/openbf.pak contain the games' own content, so never upload or share them.
Everyone builds their own from their own copies of the games.
Requirements on Linux:
- Rust (https://rustup.rs), Python 3.10 or newer, bash, ffmpeg with the libvorbis encoder
- ALSA and udev libraries (on Fedora:
alsa-lib-devel systemd-devel; on Debian/Ubuntu:libasound2-dev libudev-dev) - A Vulkan-capable GPU, and a game controller or a keyboard and mouse
The same command builds dist\openbf.exe. You need:
- Rust (https://rustup.rs), with the Visual Studio C++ Build Tools that rustup offers to install
- Python 3 (https://python.org, or
winget install Python.Python.3.12) - Git for Windows (https://git-scm.com): the bake runs in its bash;
pack.pyfinds it by itself - ffmpeg on your
PATH(winget install Gyan.FFmpeg, then open a new terminal) - A DirectX 12 or Vulkan GPU, and a game controller or a keyboard and mouse
In a new PowerShell or Command Prompt:
git clone https://github.com/sprucey149/openbf.git
cd openbf
mkdir iso
python scripts\pack.py
dist\openbf.exe
Your profile and snapshots are saved in openbf_data\ beside openbf.exe.
The same command builds dist/openbf.app. A Mac with Apple Silicon (M1 or later) is recommended; an Intel Mac
works but bakes much more slowly. You need:
- Apple's command line tools:
xcode-select --install(the linker,stripandgit) - Homebrew (https://brew.sh); finish its "Next steps" so
brewis on yourPATH - Python 3.10 or newer:
brew install python(thepython3that comes with macOS is 3.9, which is too old) - ffmpeg with the Vorbis encoder:
brew install ffmpeg-full, thenecho 'export PATH="$(brew --prefix ffmpeg-full)/bin:$PATH"' >> ~/.zprofileand open a new Terminal window. Plainbrew install ffmpegcannot encode the game's speech;ffmpeg -hide_banner -encoders | grep libvorbismust print a line - Rust (https://rustup.rs):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - About 30 GB free, in a folder iCloud does not sync (not Desktop or Documents with iCloud Drive on), on the internal disk
- A game controller or a keyboard and mouse
On Apple Silicon, check that nothing runs under Rosetta: uname -m and
file "$(command -v python3)" "$(realpath "$(command -v ffmpeg)")" should all say arm64.
In a new Terminal window:
git clone https://github.com/sprucey149/openbf.git
cd openbf
mkdir iso
caffeinate -i python3 scripts/pack.py
open dist/openbf.app
caffeinate keeps the Mac awake while it builds: leave the lid open and the charger in. pack.py checks Python
and ffmpeg before it starts, warns about the setups above, and shows how long each step took. The first build
compiles the game and bakes every asset; on a recent Apple Silicon Mac we expect roughly an hour, but a Mac build
has not been timed yet, and an Intel Mac takes longer. Later runs reuse what is still current.
caffeinate -i python3 scripts/pack.py --retail-audio is faster: it skips the local audio restoration and keeps the original
audio. Switching it on or off bakes everything again once.
If macOS asks whether openbf may accept incoming network connections, allow it for LAN games.
The app keeps your profile, saves and logs inside itself, in dist/openbf.app/Contents/MacOS/openbf_data/. Packing
again keeps them, and a dist/openbf_data/ folder from a pack made before the app existed is moved into the app.
If the build fails or seems stuck, open an issue with the whole pack.py output (including its last == line
and the closing step times: line) and the output of uname -m; sysctl -n sysctl.proc_translated.
If the game itself fails, for example it stays on the loading screen, quit it and open an issue with its log file:
the newest openbf-<date>.log in dist/openbf.app/Contents/MacOS/openbf_data/logs/
(open dist/openbf.app/Contents/MacOS/openbf_data/logs in the openbf folder shows it in Finder; drag the file into
the issue). The game keeps its last 5 logs there, and a map that fails to
load also says why on screen.
The game is built around a controller and plays like the console originals, with their aim assist. Keyboard and mouse also work, as a deliberate addition for PC: click into the battle to capture the pointer; Esc pauses and frees it again. Mouse aim gets no aim assist. Sensitivity and invert-Y are in Options and in the pause menu (sensitivity starts at 100 %). Infantry, vehicles and starfighters each have their own keyboard layout under Controls (Keyboard / Mouse).
| Action | Keyboard and mouse |
|---|---|
| Move | W A S D |
| Look and aim | mouse |
| Fire | left button |
| Secondary fire | middle button (or the back thumb button) |
| Zoom | right button or Z |
| Jump | Space |
| Crouch / prone | Left Ctrl or C |
| Sprint | Left Shift |
| Reload | R |
| Use (enter or leave a vehicle) | E |
| Next weapon | the wheel or Q |
| Switch secondary weapon | G (or the forward thumb button) |
| First / third person (also "Viewpoint" in Options and the pause menu) | V |
| Squad orders | F1 follow, F2 hold, F3 at ease, F4 move out (or the arrow keys, as the D-pad) |
| Spawn screen | W A S D or arrows to pick a post, Q / Tab or the wheel for the class, Space or Enter to spawn, Backspace back |
| Menus | arrows, Enter, Esc or Backspace |
| Fullscreen or a maximized window (the game opens fullscreen) | F11 (Control+Command+F on macOS) |
In a vehicle or a starfighter the right button is secondary fire and the middle button or Z zooms. In a hover tank, speeder or flyer the mouse turns the vehicle, as the steering stick does; in a walker it aims the walker. In a gunner's seat or a turret it turns the gun. Tested and working on Linux and Windows, with the NTSC-U PS2 releases (SLUS-20898 and SLUS-21240).
OpenBF automatically discovers legacy Star Wars Battlefront II (2005) mod folders copied into openbf_data/mods/—including classic addon maps (addme.script + mission.lvl), side/ and fpm/ replacement packs, _LVL_PC/ trees, and loose .lvl world replacements—with manual #1, #2, ... load-order controls, isolated namespaces, game-scoped overrides, and a versioned conversion cache in openbf_data/mod_cache/ (no import button or manual registration required). See docs/mods.md for usage and docs/modding-architecture.md for the technical architecture.
Supported Windows and Linux builds also bundle OpenBF VR (openbf.vr) as a disabled-by-default engine extension:
- Open
openbf-launcher. - Go to the Mods tab.
- Enable content mods (using Up / Down to set override priority) and/or toggle OpenBF VR on (this saves to
openbf_data/extensions.ronwithout recompiling). - Start your OpenXR runtime/headset if using VR, wait for any mod cache conversion to finish, and click Play.
To return to desktop play, disable OpenBF VR in the Mods tab (or click Play in Desktop Mode if OpenXR startup fails). See docs/vr.md for VR controls and troubleshooting, and docs/extensions.md for the extension system architecture.
The engine is written in Rust, with substantial help from AI agents and community contributors. Development uses automated tests and comparisons with the original games in PCSX2, including memory readings and rendered images. Work is at different stages of implementation and verification; an implemented feature is not necessarily fully validated. That scaffolding is published too:
PLAN.md: the goals and the locked feature setengine/CRATES.md: a map of the codeanalysis/: reverse-engineering notes, supporting references, and remaining uncertaintiesdocs/loop/: how the AI loop is run (its rules, its session prompt, the backlog and every work card)scripts/: the build, bake, test-gate and loop tools
openbf's gameplay is its own. It started from the original games, which we studied closely, mostly
through the PS2 versions, the best-documented ones. Where it deliberately differs, the difference is
written down in analysis/plan/FEATURE_SET.md.
No code from the original games is included; the decompilation is used only as a reference for behaviour.
This repository is updated as changes are integrated. GitHub Issues
coordinate feature scope and ownership; docs/loop/cards/ contains detailed implementation notes
and smaller work items. A card without an issue is not automatically available: propose an issue first.
I started this project because I wanted a better Star Wars: Battlefront, and I still want that game for myself. I'd much rather build it together with everyone who loves these games too. Pull requests, bug reports, feature requests, ideas, playtesting and feedback of any kind are welcome and hoped for.
- Found a bug? Open an issue: say what you did, what you saw, which map, and attach a
screenshot if you can. Press F9 in the game right after it happens: that saves a snapshot of every unit's state
to
openbf_data/playtest/last.json. Attach that file too; it usually shows the cause. - Want a feature? Search the issues first, then open
an issue describing the player experience and intended scope. The cards in
docs/loop/cards/provide more roadmap detail. - Want to write code? Choose an unassigned issue, comment that you would like to take it, and wait for confirmed scope and assignment. Assigned issues are reserved. If your idea has no issue, open one before coding. Use one feature per branch/PR and an early draft for larger work. CONTRIBUTING.md explains the workflow and evidence expected.
It's MIT licensed, so you're also free to fork it and take it your own way. If you do, I'd love to hear about it, and even more to see your improvements come back here.