Skip to content

About

No description, website, or topics provided.

Resources

Stars

41 stars

Watchers

1 watching

Forks

Repository files navigation

future_rust_cop

Future Cop: L.A.P.D. (1998) running natively on modern Windows, Linux and macOS, written in Rust.

fcop takes the original game's program and recompiles it into native code when it starts, using iced-x86 and Cranelift. Everything the game expects from Windows and DirectX (graphics, sound, videos, network play) is rebuilt in Rust, with OpenGL for the 3D graphics.

This project contains no game files. You need your own copy of the game.

A mission in widescreen at 1920x1080

Two players in split screen Precinct Assault The main menu
Two players in split screen Precinct Assault The main menu

Contents

How to play

Requirements

  • The PC version of the game, US or German. fcop tells you if your version is not supported.
  • Windows or Linux (64-bit) with OpenGL 3.3, or macOS on Apple Silicon.
  • On Linux you also need ALSA (or PipeWire/PulseAudio) for sound and libudev for gamepads. Every normal desktop distribution has them.

Installation

  1. Download the latest version from the releases page and unpack it: fcop-...-windows-x64.zip for Windows, fcop-...-linux-x64.tar.gz for Linux. On macOS, see macOS below.

  2. Add the game.

    Choose one of these ways:

    Option What you have What to do
    A an image of your CD (.iso or .bin) put it next to fcop.exe (Linux: fcop) or into game_files
    B the CD itself copy everything on it into game_files
    C the game installed on your PC copy the game's folder into game_files
  3. Start fcop.exe (Linux: run ./fcop in its folder). You can also use the launcher fcop-launcher.exe (Linux: fcop-launcher).

On the first start fcop finds the game, checks it and sorts out what it needs:

Folder What goes there
game_files/FCopLAPD FCopLAPD.exe, febmp.bin and the missions folder
game_files/Video the videos

Everything else in game_files is moved to the recycle bin (on Linux and macOS it is deleted).

The first start takes a second or two longer, because fcop compiles the game once. After that it starts right away.

macOS

fcop for macOS (Apple Silicon) is an app.

  1. Download fcop-...-macos-arm64.dmg from the releases page and double-click it. A window opens with fcop.app and your Applications folder: drag fcop onto Applications. Start it from there (started from the Downloads folder, macOS does not run it).
  2. Start fcop. The app is not signed with a developer certificate, so macOS blocks the first start. Open System Settings > Privacy & Security and click Open Anyway.
  3. Add the game. The window says that the game files were not found. Click Open Folder, put your CD image (or a copy of the CD, or your installed game folder) into it, and start fcop again.

The app keeps its files in ~/Library/Application Support/fcop: the game and your settings in game_files, the log in fcop.log.

Where your files are

What Where
Settings game_files/FCopLAPD/registry.txt
Key bindings game_files/FCopLAPD/controls.txt
Gamepad bindings game_files/FCopLAPD/gamepad.txt
Secondary gamepad bindings game_files/FCopLAPD/gamepad-secondary.txt
Saved games game_files/FCopLAPD/save.cfg
Log (if something goes wrong) fcop.log next to fcop.exe on Windows, the terminal on Linux and macOS

Menu music

The menus play a random selection of the PC mission music. All tracks are enabled by default except the joke music. In Preferences → Audio, select the tracks to include, or clear them all to turn menu music off. The Music Volume slider controls its volume. No sound export is needed.

You can also add the PlayStation menu track. Choose one of these ways:

Option What you have What to do
A nothing download FE.MIS from PCGamingWiki and put it into game_files/PS1
B an image of the PlayStation CD (.bin with .cue, or .iso) put the image into game_files
C the PlayStation CD itself copy CW/FE.MIS from the CD into game_files/PS1

If using the launcher, enable Use PlayStation menu music to include this optional track. It can also be selected or deselected in Audio preferences.

What is new

Graphics

  • High resolutions and widescreen
  • Fullscreen (Alt+Enter)
  • Anti-aliasing and sharper texture filtering
  • Higher frame rates, up to unlimited, without changing how the game plays
  • Videos as large as the window allows
  • Replacement textures (HD textures)

You find all of this in the game's Preferences. During a mission, "Display" in the pause menu opens them too, and changes show right away.

Controls

  • Player 1 plays with the arrow keys

  • A new camera close behind the robot

  • Gamepads, in the menus too

  • Mouse buttons can be assigned to actions, including the side buttons

    In the Keyboard dialog, select an action and press the mouse button you want. For the left button, click the selected action a second time.

More

  • Modern graphics effects: shadows, lighting and more
  • Network play over the local network or the internet
  • Sounds export: all sounds and music as WAV files
  • Autosave: your menu progress is saved after each mission and when you confirm exit, to game_files/FCopLAPD/autosave.cfg, separate from the manual saves in save.cfg. It is loaded when the game starts; loading a manual save overrides it.
  • Skip Intro Videos in Preferences (off by default) skips the logo and intro videos at startup.
  • Help in the menu offers the help video, the credits video or the PlayStation manual (opens in your browser). The credits no longer play when you quit.

Modern graphics effects

fcop can add effects the original never had. They are all optional, and you can turn each one on or off while playing.

You find them in Preferences, in the 3DFX Options, behind the button Advanced Graphics....

Effect What it does
Ambient Occlusion soft shading in corners and where objects meet the ground
Dynamic Lights explosions, muzzle flashes, rockets and police lights light up their surroundings
Lit Smoke smoke is lit by those lights (needs Dynamic Lights)
Heat Distortion the air shimmers above fire and explosions
Bloom bright lights glow
Perspective-Correct Textures textures no longer warp on large surfaces
Depth Buffer fixes things showing through each other (on by default)
Shadows real shadows from the sun: Screen-Space or Shadow Map
Tonemapping richer bright colours: Soft, AgX or ACES

The PlayStation look: three more boxes sit right in the 3DFX Options, below the gamma slider. They are on by default.

Option What it does
Texture Coloring lit textures can get up to twice as bright (the PC version cut them off)
PlayStation Colors the first mission's textures in their PlayStation colours
PlayStation Shading the contrast of the original software renderer

Gamepads

Up to two gamepads are supported, and you can plug them in while the game is running. They work alongside the keyboard. You change their buttons with "Gamepad" in Preferences or in the pause menu.

The default layout (Xbox controller):

Button Action
Left stick move
Right stick turn
RT gun
LT heavy weapon
A jump
B special
X action
Y change target
LB / RB jink
Back map
R3 camera
L3 transform
Start pause
D-pad free to use

The sticks are analog: push them a little and the robot moves slowly. (Not in network games.)

Transforming has a binding of its own (the game's way, Action and Change Target together, still works): L3 on the pad, C on player 1's keyboard and NumPad3 on player 2's. It is the last row, Transform, in the Keyboard and Gamepad dialogs. "Choose Controller Profile" in the Gamepad dialog also offers "DualSense (PS1)", the PlayStation version's layout.

Choosing a profile and saving the dialog also replaces that player's secondary bindings with the profile's defaults. Open Gamepad and choose Secondary bindings... to edit alternate bindings. Save changes with OK before switching binding pages. Both bindings work alongside the keyboard. The dropdown under each player in the Gamepad dialog selects a connected controller without changing that player's bindings. Automatic uses the connection order, and Disabled turns off controller input for that player. Selections last for the current session; select them again after restarting. The glyph style selector in the Gamepad dialog offers Auto, Xbox, and PlayStation; Auto uses PlayStation glyphs for recognized Sony controllers and Xbox glyphs for other controllers.

The pads vibrate as on the PlayStation: lightly while the robot transforms, and strongly when it is hit, fading out again. Each player can switch it off with the "Vibration" box in the Gamepad dialog.

"Advanced Rumble" (off at first, below Vibration) adds effects the PlayStation version did not have: explosions nearby, stronger the closer they are, and a kick when you fire. Enemies, buildings and towers that blow up rumble too, bigger ones harder. Fast guns buzz lightly, slow launchers give a heavy thump.

In menus and dialogs, the D-pad or left stick moves, A selects and B goes back. Holding a direction repeats; stick hysteresis helps prevent accidental changes near diagonals. Only one controller navigates at a time: another can take over when the current controller releases its menu controls or disconnects. Gameplay assignments are unchanged.

If Steam Input exposes both an emulated controller and the physical Sony controller, try Steam Input: prefer non-Sony controllers in the launcher's Gamepad tab. Close the game, enable the option, press Save, and launch again. It is off by default. When enabled, it hides recognized Sony devices whenever any non-Sony gamepad is detected; this is a workaround, not automatic device pairing, and can hide a genuine second Sony controller. Turn it off for mixed direct-controller setups. A Sony controller remains available when no non-Sony gamepad is detected. FCOP_STEAM_INPUT=1 enables the same filter for direct launches (0 disables it). Steam layouts that also send keyboard or mouse input may still need adjustment in Steam.

Network play

One player chooses Host Game, the others Join Game.

Only the host has to open these ports:

Port What it is for
TCP 47624 the game itself
UDP 47624 finding games on the local network

The players who join don't need to open anything.

Firewall (Windows)

The first time you host, Windows asks if fcop may use the network. Allow it for private networks.

If you clicked "no", open PowerShell as administrator and run:

New-NetFirewallRule -DisplayName "Future Cop TCP" -Direction Inbound -Protocol TCP -LocalPort 47624 -Action Allow -Profile Private
New-NetFirewallRule -DisplayName "Future Cop UDP" -Direction Inbound -Protocol UDP -LocalPort 47624 -Action Allow -Profile Private

The game is not found

  • Different network or VPN: type the host's IP address into "Host Address" in the Join dialog.
  • Over the internet: the host's router has to forward TCP and UDP port 47624 to the host's computer.

Replacement textures

You can replace the game's textures with your own, for example sharper HD versions.

How it works

The game keeps its textures on pages of 256x256 pixels, each full of small pictures. Every page has its own name, a code like 0123456789abcdef.

To replace a page, put a PNG with that code in its name into game_files/Textures (subfolders are fine):

  • the name can start with anything, e.g. street_0123456789abcdef.png
  • transparency works, soft edges too
  • up to 4 times larger (1024x1024)

To turn replacements off, start fcop with FCOP_HD=0.

Making your own

  1. Export: run fcop export in a terminal in fcop's folder.

    This cuts every page into its single pictures, e.g. a part of the robot or a piece of the street. You find them in game_files/Textures/pieces, one folder per page. Each folder also has:

    • page.png: the whole page
    • layout.png: where each picture is on the page
    • a .json file per picture, showing where it is used on the model. Handy if you want to redraw it from scratch.
  2. Edit the pictures in any image editor. Keep the file names. They may be up to 4 times larger.

  3. Import: run fcop import. Your pictures are put back into pages, and the game uses them from its next start.

Running fcop export again does not overwrite your edited pictures.

texview

tools/texview is a small viewer for the exported pictures. Build it with cargo build --release in its folder, then open the pieces folder with it (or drag a folder onto it).

It shows the pictures by mission, how they sit on the model, the original next to your version, and where each one is on its page. Pictures you changed are marked orange. When you save a picture in your image editor, texview shows the new version at once.

Key Action
Up / Down previous / next folder
Left / Right previous / next picture
G show grid
O show original
E open in image editor
+ / - / 0 zoom
Ctrl+F search

Textures the game makes while playing

A few textures only appear during play (like the HUD's message icon). To get them, start fcop with FCOP_DUMP_TEXTURES=1 and play. Every new texture is saved to game_files/Textures/dump.

Sounds export

Run fcop export-sounds in a terminal in fcop's folder. It saves all sound effects, voices and music of the game to game_files/Sounds as WAV files. sounds.txt lists which missions use each sound.

Launcher

The launcher, autosave, the menu music from the PC missions and the gamepad device choice and secondary bindings come from FlukieL's fork.

Windows launcher screenshot Windows launcher settings screenshot

fcop-launcher.exe beside fcop.exe (Linux: fcop-launcher beside fcop; not in the macOS app) installs the game from a PC disc image (images beside it are found by themselves; the image is never moved or changed), sets the game's options and starts it. Using it is optional: fcop.exe alone works as before.

Tab What it does
General the PC disc image, skip the intro videos, modern dialogs (preview)
Video resolution, frame rate limit, fullscreen, V-Sync, frame rate display, anti-aliasing, texture filtering
Audio volumes, the menu music tracks, the PlayStation menu track (a PS1 disc image or FE.MIS)
Gamepad Vibration and Advanced Rumble per player, the Steam Input filter, diagnostics, reset bindings
Saves back up and restore saves, settings and bindings (fcop-backups beside the launcher), the game folder
Tools export and import textures, export sounds

Save writes the settings (the game's to game_files/FCopLAPD/registry.txt, the launcher's to fcop-launcher.cfg); close the game first. Reload reads them again. Play saves, installs the game if needed, compiles it once and starts it.

Building it: cargo build --release --manifest-path launcher/Cargo.toml (its own crate, with egui; the title font is Orbitron, SIL Open Font License, launcher/assets/OFL.txt).

An experimental alternative menu shell with mission statistics is hidden for now; FCOP_ALT_MENU=1 turns it on for testing (src/platform/alternative_menu.rs, proposed achievements in docs/achievements.md).

A complete modern game interface and a fully compilation-free game executable are not yet available.

Building

cargo build --release
cargo run --release -- path/to/FCopLAPD.exe

Without a path, fcop uses the game_files folder as described above. The tests (cargo test --release) need no game files.

For development, fcop --cache-only path/to/FCopLAPD.exe requires a compatible compiled.bin generated by the same fcop executable. It refuses to recompile guest functions if the cache is missing or incompatible. --prepare path/to/FCopLAPD.exe creates the cache, and --validate-cache path/to/FCopLAPD.exe checks it without starting the game. Runtime hook stubs and trampolines are still compiled, so this is not a fully compilation-free executable.

macOS app

tools/macos-app.sh builds target/fcop.app and packs it into one file to share: target/fcop-<version>-macos.dmg. How players use it: macOS.

GitHub builds the app of a branch when the workflow macOS app is started by hand (gh workflow run macos-app.yml --ref <branch>). To get it, open Actions > macOS app, then that run, and download it under Artifacts (you must be signed in to GitHub). The download is a zip that holds the app's zip.

How fcop works inside and what is still open: CLAUDE.md and PLAN.md.

About

No description, website, or topics provided.

Resources

Stars

41 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages