Open source server for the FusionFall client
Go to file
dongresource b79bc56b31 Implement NPC spawning.
Protected by a simplified GM system. Either everyone is a GM (local
servers) or nobody is (public servers).
2020-08-25 04:28:42 +02:00
res added radio's logo, started NPCManager 2020-08-19 17:21:35 -05:00
src Implement NPC spawning. 2020-08-25 04:28:42 +02:00
.gitignore Removed CRs from .gitignore and an outdated comment in config.ini. 2020-08-25 00:11:54 +02:00
.vimrc Added .vimrc configured for the 4 spaces style. 2020-08-25 00:11:54 +02:00
appveyor.yml AppVeyor: Build all protocol versions on Linux (#21) 2020-08-21 16:39:30 -04:00
CMakeLists.txt PROTOCOL_VERSION, test items, MOTD fix (#18) 2020-08-21 12:38:45 -05:00
config.ini Implement NPC spawning. 2020-08-25 04:28:42 +02:00
LICENSE.md Use regular old MIT license 2020-08-20 16:17:53 -04:00
Makefile Add player revive, vehicle mount/dismount and more (#33) 2020-08-24 16:04:56 -05:00
NPCs.json fixed NPC scrape 2020-08-21 18:08:42 -05:00
README.md No need to unpack zero-length packet structs. 2020-08-25 01:08:02 +02:00
warps.json load warps into memory in NPCManager::init 2020-08-23 11:26:25 -05:00

AppVeyor Discord

OpenFusion is a landwalker server for FusionFall. It currently supports versions beta-20100104 and beta-20100728 of the original game.

Further documentation pending.

Usage

tl;dr:

  1. Download the client+server bundle from here.
  2. Run FreeClient/installUnity.bat once

From then on, any time you want to run the "game":

  1. Run OpenFusionRelease/winfusion.exe
  2. Run FreeClient/OpenFusionClient.exe

Currently the client by default connects to a public server hosted by Cake. Change the loginInfo.php to point to your own server if you want to host your own.

You have two randomized characters available to you on the Character Selection screen, one boy, one girl. You can also make your own character and play through the tutorial. The tutorial can be skipped by pressing the ~ key.

If you want, compiled binaries (artifacts) for each new commit can be found on AppVeyor.

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 MIME type application/vnd.unity, where the src param is the address of the game's .unity3d entrypoint.

This triggers the browser to load an NPAPI plugin that handles this MIME type, the Unity Web Player, which the browser looks for in C:\Users\USERNAME\AppData\LocalLow\Unity\WebPlayer. The Web Player was previously copied there by installUnity.bat.

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.

FreeClient/resources/app/files/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 loads the web pages locally using the file:// schema, and fetches the game's assets from Turner's CDN (which is still hosting them to this day!).

FreeClient/resources/app/files/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 OpenFusion/config.ini. Make sure the login server port is in sync with loginInfo.php. The shard port needs no such synchronization. You can also configure the distance at which you'll be able to see other players, though by default it's already as high as you'll want it.

If you want to play with friends, you can change the IP in loginInfo.php to a login server hosted elsewhere. 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).

If you're in a region in which Turner's CDN doesn't still have the game's assets cached, you won't be able to play the game in its default configuration. You'll need to obtain the necessary assets elsewhere and set up your own local web server to host them, because unlike web browsers, the game itself cannot interpret the file:// schema, and will thus need the assets hosted on an actual HTTP server. Don't forget to point assetInfo.php to where you're hosting the assets and change the src param of both the <embed> tag and the <object> tag in FreeClient/resources/files/index.html to where you're hosting the .unity3d entrypoint.

If you change loginInfo.php or assetInfo.php, make sure not to put any newline characters (or any other whitespace) at the end of the file(s). Some modern IDEs/text editors do this automatically. If all else fails, use Notepad.

Compiling

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 in the wiki for people using regular old CMake or the version of CMake that comes with Visual Studio. tl;dr: cmake -B build

"Gameplay"

Notice the quotes. This is not a full-fledged game that can be played. It's what's called a landwalker; enough of the server has been implemented to allow players to run around in the game world, and not much else.

To make your landwalking experience more pleasant, you can make use of a few admin commands to get around easier:

Movement commands

  • A /speed of around 2400 or 3000 is nice.
  • A /jump of about 50 will send you soaring
  • This map (credit to Danny O) is useful for /warp coordinates.
  • /goto is useful for more precise teleportation (ie. for getting into Infected Zones, etc.).

Item commands

  • /itemN [type] [itemId] [amount] (Refer to the item list)

Nano commands

  • /nano [id] (1-36)
  • /nano_equip [id] (1-36) [slot] (0-2)
  • /nano_unequip [slot] (0-2)
  • /nano_active [slot] (0-2)