Open source server for the FusionFall client
Go to file
2023-12-19 13:23:58 -05:00
.github/workflows CI/CD improvements 2023-10-10 14:35:07 -04:00
.vscode Fix vscode launch configs for Windows 2023-07-11 13:52:22 -04:00
res Update README & logo 2021-04-15 13:06:39 -05:00
sql Usernames are now case-insensitive 2021-09-20 20:40:12 +02:00
src Shard crash fixes 2023-12-19 13:23:58 -05:00
tdata@8c98c83682 Original Racing Scores Functionality (#257) 2023-10-12 04:42:57 +02:00
vendor The great re-#include 2023-10-08 16:34:18 -04:00
.dockerignore Add .dockerignore file 2023-08-19 18:22:21 +00:00
.editorconfig Normalize line endings 2021-04-30 04:17:34 -04:00
.gitattributes Normalize line endings 2021-04-30 04:17:34 -04:00
.gitignore Ignore .bak files 2023-10-08 16:33:53 -04:00
.gitmodules switched to dumped XDT & moved to a submodule 2020-09-09 12:06:22 -05:00
.vimrc Reword some comments and correct paths in the Readme. 2020-08-28 22:18:28 +02:00
CMakeLists.txt Handle case where cmake is invoked outside root 2023-10-08 16:34:18 -04:00
config.ini added option to disable score capping 2023-12-19 13:18:43 -05:00
CONTRIBUTING.md Updater contributer guide 2023-10-08 16:43:11 -04:00
docker-compose.yml Add Dockerfile and docker-compose 2023-06-30 03:31:45 -04:00
Dockerfile Add Dockerfile and docker-compose 2023-06-30 03:31:45 -04:00
LICENSE.md Bump copyright year to 2023 2023-03-06 21:08:45 +01:00
Makefile [refactor] New buff framework (player implementation) 2023-10-08 16:34:43 -04:00
README.md Update README.md to fix some inaccurate info, move commands to wiki page 2023-10-12 04:00:16 +02:00
suppr.txt Update ASAN suppressions 2021-04-26 17:38:29 -05:00
version.h.in Print server version when starting up. 2020-09-16 20:12:56 +02:00

Current Release Workflow Discord License

OpenFusion is a reverse-engineered server for FusionFall. It primarily targets versions beta-20100104 and beta-20111013 of the original game, with limited support for others.

Usage

Getting Started

Method A: Installer (Easiest)

  1. Download the client installer by clicking here - choose to run the file.
  2. After a few moments, the client should open: you will be given a choice between two public servers by default. Select the one you wish to play and click connect.
  3. To create an account, simply enter the details you wish to use at the login screen then click Log In. Do not click register, as this will just lead to a blank screen.
  4. Make a new character, and enjoy the game! Your progress will be saved automatically, and you can resume playing by entering the login details you used in step 3.

Method B: Standalone .zip file

  1. Download the client from here.
  2. Extract it to a folder of your choice. Note: if you are upgrading from an older version, it is preferable to start with a fresh folder rather than overwriting a previous install.
  3. Run OpenFusionClient.exe - you will be given a choice between two public servers by default. Select the one you wish to play and click connect.
  4. To create an account, simply enter the details you wish to use at the login screen then click Log In. Do not click register, as this will just lead to a blank screen.
  5. Make a new character, and enjoy the game! Your progress will be saved automatically, and you can resume playing by entering the login details you used in step 4.

Instructions for getting the client to run on Linux through Wine can be found here.

Hosting a server

  1. Grab OpenFusionServer-1.5-Original.zip or OpenFusionServer-1.5-Academy.zip from here.
  2. Extract it to a folder of your choice, then run winfusion.exe (Windows) or fusion (Linux) to start the server.
  3. Add a new server to the client's list:
    1. For Description, enter anything you want. This is what will show up in the server list.
    2. For Server IP, enter the IP address and port of the login server. If you're hosting and playing on the same PC, this would be 127.0.0.1:23000.
    3. Lastly Game Version - select beta-20100104 if you downloaded the original zip, or beta-20111013 if you downloaded the academy zip.
  4. Once you've added the server to the list, connect to it and log in. If you're having trouble with this, refer to steps 4 and 5 from the previous section.

If you want to run the latest development builds of the server, compiled binaries (artifacts) for each functional commit can be found here.

For a more detailed overview of the game's architecture and how to configure it, read the following sections.

Architecture

FusionFall consists of the following components:

  • A web browser compatible with the old NPAPI plugin interface
  • A web server that acts as a gateway for launching the game
  • A custom version of the Unity Web Player, which gets loaded as an NPAPI plugin
  • A .unity3d bundle that contains the game code and essential resources (loading screen, etc.)
  • A login server that speaks the FusionFall network protocol over TCP
  • A shard server that does the same on another port

The original game made use of the player's actual web browser to launch the game, but since then the NPAPI plugin interface the game relied on has been deprecated and is no longer available in most modern browsers. Both Retro and OpenFusion get around this issue by distributing an older version of Electron, a software package that is essentially a specialized web browser.

The browser/Electron client opens a web page with an <embed> tag of the appropriate MIME type, where the src param is the address of the game's .unity3d entrypoint. This triggers the browser to load an NPAPI plugin that handles said MIME type, in this case the Unity Web Player.

Note that the version of the web player distributed with OpenFusion expects a standard UnityWeb magic number for all assets, instead of Retro's modified streamed magic number. This will potentially become relevant later, as people start experimenting and mixing and matching versions.

The web player will execute the game code, which will request the following files from the server: /assetInfo.php and /loginInfo.php.

/assetInfo.php contains the address from which to fetch the rest of the game's assets (the "dongresources"). Normally those would be hosted on the same web server as the gateway, but the OpenFusion distribution (in it's default configuration) doesn't use a web server at all! It instead loads the web pages locally using the file:// schema, and fetches the game's assets from a standard web server.

/loginInfo.php contains the IP:port pair of the FusionFall login server, which the client will connect to. This login server drives the client while it's in the Character Selection menu, as well as Character Creation and the Tutorial.

When the player clicks "ENTER THE GAME" (or completes the tutorial), the login server sends it the address of the shard server, which the client will then connect to and remain connected to during gameplay.

Configuration

You can change the ports the FusionFall server listens on in config.ini. Make sure the login server port is in sync with what you enter into the client's server list - the shard port needs no such synchronization.

This config file also has several other options you can tweak, including log verbosity, database saving interval, default account/permission level, and more. See the comments within the config file itself for more details.

If you want to play with friends, simply enter the login server details into the Add Server dialogue in OpenFusionClient. This just works if you're all under the same LAN, but if you want to play over the internet you'll need to open a port, use a service like Hamachi or nGrok, or host the server on a VPS (just like any other gameserver).

Compiling

OpenFusion has one external dependency: SQLite. The oldest compatible version is 3.33.0. You can install it on Windows using vcpkg, and on Unix/Linux using your distribution's package manager. For a more indepth guide on how to set up vcpkg, read this guide on the wiki.

You have two choices for compiling OpenFusion: the included Makefile and the included CMakeLists file.

Makefile

A detailed compilation guide is available for Windows users in the wiki using MinGW-w64 and MSYS2. Otherwise, to compile it for the current platform you're on, just run make with the correct build tools installed (currently make and clang).

CMake

A detailed guide is available on the wiki for people using regular old CMake or the version of CMake that comes with Visual Studio. tl;dr: cmake -B build

Contributing

If you'd like to contribute to this project, please read CONTRIBUTING.md.

Gameplay

The goal of the project is to faithfully recreate the game as it was at the time of the targeted build. While most features are implemented and the game is playable start to finish, there may be missing functionality or bugs present.

Depending on the server configuration, you'll have access to certain commands.

For the public servers: Original has item spawning, the ability to set player speed/jump height, and teleportation enabled (default account level 50). Meanwhile the Academy server is more meant for legitimate playthroughs (default account level 99).

When hosting a local server, you will have access to all commands by default (account level 1).

For a list of available commands, see this wiki page.