Home

Awesome

OpenFA

A black-box, open-source, re-implementation of the Janes Fighters Anthology's engine.

Latest Release Build Status License

[[TOC]]

Installing OpenFA

  1. Install any of the following games:
    • USNF
    • US Marine Fighters (e.g. USNF with the Marine Fighters expansion)
    • ATF: Advanced Tactical Fighters
    • ATF: Nato (e.g. ATF with the Nato expansion installed)
    • ATF: Gold
    • USNF '97
    • Fighters Anthology
  2. Download the Latest OpenFA Release for your platform and architecture
  3. Extract the downloaded zip file into the install directory of the game
    • Example: C:\JANES\FA
    • openfa.exe should be FA.EXE
  4. Double-click openfa.exe to run
    • Or right-click and drag to create a shortcut wherever you want one

Installing FA Modding Tools

  1. Install any of the following games:
    • USNF
    • US Marine Fighters (e.g. USNF with the Marine Fighters expansion)
    • ATF: Advanced Tactical Fighters
    • ATF: Nato (e.g. ATF with the Nato expansion installed)
    • ATF: Gold
    • USNF '97
    • Fighters Anthology
  2. Download the Latest OFA Tools Release for your platform and architecture
  3. Extract the downloaded zip file into the install directory of the game
    • Example: C:\JANES\FA
    • dump-pic.exe, etc should be next to FA.EXE
  4. Drag and drop assets onto the appropriate tool to perform the action
    • Example: Drag FA_2.LIB onto dump-lib.exe to extract the LIB to FA_2/
    • Example: Drag one or more PIC files onto dump-pic.exe to create PNGs next to those PIC
    • Example: Drag a SH file onto show-sh.exe to open a window showing that shape

Using the Command Line Tools (Detailed)

The command line tools support a wide variety of uses in addition to drag-and-drop that may be accessed from the command line.

  1. Install as above
    • Note: the modding tools come packaged with the normal OpenFA install
  2. Open a command prompt
    • Example: C:\Windows\System32\cmd.exe, but others should work
  3. Change directory into the game directory
    • Example: > cd C:\JANES\FA
  4. Individual CLI command documentation

Why Fighters Anthology

  1. The technology of the original Fighters Anthology engine represents the best of a bygone era of computing. Reverse engineering it lets us understand the severe limits of that era. By extension, it lets us tap into the amazing grit and daring of the creators that built it, despite everything stacked against them.
  2. Since there was no illusion that a game of the era could faithfully simulate a real cockpit, there was a strong focus on the gameplay, in addition to building a facsimile of reality. As computers became powerful enough to be "realistic", it left behind the broad base of people who enjoy flight, but don't have the free time to spend 30+ hours memorizing where all the switches are in each new cockpit. In short, I wanted my mid-tier sims back and Fighters Anthology is the best of the bunch.

Project Status

Specific Format Notes

Development Environment Setup

  1. Pull from git. The main branch if you do not plan to submit changes, or your own fork if you do.
    1. git clone --recursive https://gitlab.com/terrence_too/openfa.git
  2. Move into the newly downloaded directory.
    1. cd openfa
  3. Install the Rust language via rustup.rs
  4. Prepare your testing environment. OpenFA expects a disk_dumps directory with subdirectories for each of the games you own, each containing a cdrom1 and installdir folder (and cdrom2 for FA). No game is required, but you must have at least one game.
    1. mkdir -p disk_dumps/{USNF,MF,ATF,ATFNATO,ATFGOLD,USNF97,FA}/{cdrom1,installdir} disk_dumps/FA/cdrom2
    2. Mount and copy the CD-ROM contents into the cdrom1 and cdrom2 (for FA) directories
    3. Install each game either natively or using dosbox/wine and copy the install folder into installdir.
  5. Optional: Unpack any LIBs that you will need to work on directly. OpenFA will automatically detect unpacked LIB directories that have the same name as the game libs, but with the extension L_B (e.g. with the 'I' folded down into a '_'). So the USNF_3.LIB would have a USNF_3.L_B library. OpenFA's dump-lib utility will automatically make this rename. OpenFA will automatically prefer files in the directory, over the lib if both are present.
    1. cd disk_dumps/FA/installdir
    2. cargo run -p dump-lib -- unpack FA_1.LIB
  6. Run through the setup process in Nitrogen's readme. You will (for the moment) need to download and build terrain data locally.
  7. cargo run; by default OpenFA will use the latest game in disk_dumps if it does not find a game in the current directory. You can use the --game-path, --cd-path, and --cd2-path to select the relevant directories, if needed. CD paths are not needed if you copy the LIBs on the CD into the game directory.

Developing OpenFA (Windows)

There is a variety of software that is needed to build OpenFA. On Windows, the scoop installer is the best way to grab most of these dependencies, but you will still have to install some of them manually. Specifically, you will need the shell that ships with the MSI installer for Git and the latest stable version of Rust via Rustup.

  1. Rust: visit rustup.rs and follow the directions
  2. git (and the Git Bash shell on Windows)
  3. C build tools (VS Build Tools on Windows, LLVM on other platforms)
  4. cmake
  5. ninja
  6. SSL

The Git Bash shell is recommended over CMD or the Windows terminal, even the shiny new one. In particular, I noticed issues with case insensitivity, though the build still ran fine. YMMV.

Git symlinks do not currently create windows symlinks: the mklink command is only available from CMD and is not yet exposed in msys. Once created in a windows CMD shell, however, git will treat the Windows symlink like a normal symlink and not be problematic. You will need to open up a CMD instance with "Run as Administrator" and then type:

> cd C:\Path\To\nitrogen\libs
> del nitrogen
> mklink /D nitrogen ..\nitrogen\libs

Once that is set up, you can test that your development environment is ready by running a quick check.

$ cargo check --all --all-targets
$ cargo test --all --all-targets

If that succeeds, you can build the release by running:

$ cargo build --all --all-targets --release