Skip to content

Lockl00p/fallout1-ce-WASM

 
 

Repository files navigation

Fallout Community Edition

Fallout Community Edition is a fully working re-implementation of Fallout, with the same original gameplay, engine bugfixes, and some quality of life improvements, that works (mostly) hassle-free on multiple platforms.

Oh, also, credit where credit is due. I used the pull requests from dje4321 and bit-hack to fix some issues. Mainly, bit-hack fixed saving on linux systems, and dje4321 fixed some corruption on the prerendered cutscene.

Video of it working (and instructions on how to do it). With firefox, you can't save... well, you kinda can, but it's weird. https://youtu.be/EB6Jsm0oMzM

Thank you guys!

There is also Fallout 2 Community Edition.

Installation

You must own the game to play. Purchase your copy on GOG or Steam. Download latest release or build from source. You can also check latest debug build intended for testers.

For Webassembly, building from source is roughly the same as with Linux except you must have emsdk {Install from here}(https://emscripten.org/docs/getting_started/downloads.html), and instead of the normal cmake command, you would use emcmake cmake {source directory} to output a js file you can use, and emcmake cmake {source directory} -DHTML="true" to output a standalone html file! You may also use emcmake cmake {source directory} -DPRELOAD="${directory to preload}" , but this will take a lot of memory when actually running the game so beware!

If you opt for the standalone HTML file, you're going to have to upload all of the game files into the game's filesystem. So, it's a sort of tradeoff between memory usage and ease of access. Also, the audio is... not the best. Oh also if you want to click the escape button without unfullscreening, you could fullscreen with f11.

Windows

Download and copy fallout-ce.exe to your Fallout folder. It serves as a drop-in replacement for falloutw.exe.

Linux

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout folder somewhere, for example /home/john/Desktop/Fallout.

  • Alternatively you can extract the needed files from the GoG installer:

$ sudo apt install innoextract
$ innoextract ~/Downloads/setup_fallout_2.1.0.18.exe -I app
$ mv app Fallout
  • Download and copy fallout-ce to this folder.

  • Install SDL2:

$ sudo apt install libsdl2-2.0-0
  • Run ./fallout-ce.

macOS

NOTE: macOS 10.11 (El Capitan) or higher is required. Runs natively on Intel-based Macs and Apple Silicon.

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout folder somewhere, for example /Applications/Fallout.

  • Alternatively you can use Fallout from MacPlay/The Omni Group as a base - you need to extract game assets from the original bundle. Mount CD/DMG, right click Fallout -> Show Package Contents, navigate to Contents/Resources. Copy GameData folder somewhere, for example /Applications/Fallout.

  • Or if you're a Terminal user and have Homebrew installed you can extract the needed files from the GoG installer:

$ brew install innoextract
$ innoextract ~/Downloads/setup_fallout_2.1.0.18.exe -I app
$ mv app /Applications/Fallout
  • Download and copy fallout-ce.app to this folder.

  • Run fallout-ce.app.

Android

NOTE: Fallout was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. Current control scheme resembles trackpad usage:

  • One finger moves mouse cursor around.
  • Tap one finger for left mouse click.
  • Tap two fingers for right mouse click (switches mouse cursor mode).
  • Move two fingers to scroll current view (map view, worldmap view, inventory scrollers).

NOTE: From Android standpoint release and debug builds are different apps. Both apps require their own copy of game assets and have their own savegames. This is intentional. As a gamer just stick with release version and check for updates.

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout folder to your device, for example to Downloads. You need master.dat, critter.dat, and data folder. Watch for file names - keep (or make) them lowercased (see Configuration).

  • Download fallout-ce.apk and copy it to your device. Open it with file explorer, follow instructions (install from unknown source).

  • When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. The game will start automatically.

iOS

NOTE: See Android note on controls.

  • Download fallout-ce.ipa. Use sideloading applications (AltStore or Sideloadly) to install it to your device. Alternatively you can always build from source with your own signing certificate.

  • Run the game once. You'll see error message saying "Could not find the master datafile...". This step is needed for iOS to expose the game via File Sharing feature.

  • Use Finder (macOS Catalina and later) or iTunes (Windows and macOS Mojave or earlier) to copy master.dat, critter.dat, and data folder to "Fallout" app (how-to). Watch for file names - keep (or make) them lowercased (see Configuration).

Configuration

The main configuration file is fallout.cfg. There are several important settings you might need to adjust for your installation. Depending on your Fallout distribution main game assets master.dat, critter.dat, and data folder might be either all lowercased, or all uppercased. You can either update master_dat, critter_dat, master_patches and critter_patches settings to match your file names, or rename files to match entries in your fallout.cfg.

The sound folder (with music folder inside) might be located either in data folder, or be in the Fallout folder. Update music_path1 setting to match your hierarchy, usually it's data/sound/music/ or sound/music/. Make sure it match your path exactly (so it might be SOUND/MUSIC/ if you've installed Fallout from CD). Music files themselves (with ACM extension) should be all uppercased, regardless of sound and music folders.

The second configuration file is f1_res.ini. Use it to change game window size and enable/disable fullscreen mode.

[MAIN]
SCR_WIDTH=1280
SCR_HEIGHT=720
WINDOWED=1

Recommendations:

  • Desktops: Use any size you see fit.
  • Tablets: Set these values to logical resolution of your device, for example iPad Pro 11 is 1668x2388 (pixels), but it's logical resolution is 834x1194 (points).
  • Mobile phones: Set height to 480, calculate width according to your device screen (aspect) ratio, for example Samsung S21 is 20:9 device, so the width should be 480 * 20 / 9 = 1067.

In time this stuff will receive in-game interface, right now you have to do it manually.

Contributing

Here is a couple of current goals. Open up an issue if you have suggestion or feature request.

  • Update to v1.2. This project is based on Reference Edition which implements v1.1 released in November 1997. There is a newer v1.2 released in March 1998 which at least contains important multilingual support.

  • Backport some Fallout 2 features. Fallout 2 (with some Sfall additions) added many great improvements and quality of life enhancements to the original Fallout engine. Many deserve to be backported to Fallout 1. Keep in mind this is a different game, with slightly different gameplay balance (which is a fragile thing on its own).

License

The source code is this repository is available under the Sustainable Use License.

About

Fallout for modern operating systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 94.9%
  • Java 3.8%
  • CMake 1.1%
  • JavaScript 0.1%
  • HTML 0.1%
  • Objective-C++ 0.0%