An open source client for Endless Online written in C#
As of 2020-05-09, this project is relicensed under the MIT license. Older versions of the code are still licensed under the GNU GPLv2 license. The tag gplv2
has been added to the final commit for which this project is licensed under the GPLv2.
Source builds require Visual Studio, the .Net 6.0 SDK, and the .Net 3.1 runtime (for building content with the MonoGame content builder pipeline tool). Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time!
.Net 6.0 runtime is required to run the pre-built binary.
See releases on GitHub for Linux and Windows binaries. .Net 6.0 runtime must be installed.
Download the appropriate release for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon (any platform) or running ./EndlessClient
(Linux).
After installing, clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform.
⚠️ If you have previously built EndlessClient, you mean need to clear your dotnet tool cache and nuget package cache
Run the following commands:
dotnet nuget locals all --clear
- Windows:
rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache
- Linux:
rm -rf ~/.dotnet/toolResolverCache
⚠️ If you get build errors due to formatting
Run the following commands:
- Windows:
dotnet format EndlessClient.sln
- Linux:
dotnet format EndlessClient.Linux.sln
sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/dotnet
dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient
echo '' > EndlessClient/obj/Debug/net6.0-macos/osx-x64/EndlessClient.GlobalUsings.g.*.generated.cs
dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient
Problem: error NETSDK1139: The target platform identifier macos was not recognized.
Solution: run the command sudo dotnet workload restore EndlessClient/EndlessClient.csproj
which will install the macos workload for you.
See the Github issues for planned features. Anything marked with the 'in progress' label is actively being worked on.
Here's a working list of things I want to add that would be additional features on top of the original client specs:
--host
--port
--version
--account_delay_ms
For easily switching servers, there's a version number config setting so it isn't limited to the hard-coded value build into the client by default. This can be set by server operators, or you can use the --version
command line argument.
Since the transition was pretty quick between maps, I added a cool little animation that slowly fades tiles in starting from the player and moving outward. This can be disabled in the config file if you don't like it.
Some of the audio files (sfx) from the original client are malformed. The WAV format includes in the header a length of the file in bytes - and for certain files, this length was different than the actual length of the audio data. The original client was able to read these without a problem, as were programs such as Windows Media Player and Audacity. However, the C# code for loading sound in XNA was throwing an exception for these audio files because of the improper length.
Part of the sound processing involves reading the audio data and rewriting the length to the WAV file if the length in the file is incorrect. This modification will occur for any invalid WAV files.
Activating background music on linux takes a bit of extra work, due to the fact that the music tracks are all MIDI files. The following process was tested on Ubuntu 22.04 (baremetal) and Ubuntu 23.10 (VM over RDP). ALSA driver is required - this should be included on any modern desktop Ubuntu installation.
sudo apt-get install -y fluidsynth fluid-soundfont-gm
fluidsynth --audio-driver=alsa /usr/share/sounds/sf2/FluidR3_GM.sf2 mfx/mfx001.mid
fluidsynth --server --audio-driver=alsa /usr/share/sounds/sf2/FluidR3_GM.sfx
quit
at the terminal prompt to exit the process cleanly.music=on
in the config/settings.ini file. Background music should start playing!For troubleshooting purposes, follow the guide here: http://www.tedfelix.com/linux/linux-midi.html
The in-game experience can be modified for larger displays by setting the following configuration options in config/settings.ini
:
[SETTINGS]
InGameWidth=1280
InGameHeight=720
This enables "resizable" mode, using the default window size specified. The game window can be further resized. The minimum window size is 640*480.
While resizable mode is enabled, hud panels may be toggled on/off. Multiple hud panels may be visible on-screen at once. Hud panels may also be rearranged by dragging and dropping the panel itself to a different area of the screen. Additionally pressing the keyboard shortcut alt
+{num}
will toggle the appropriate panel, with inventory = 1, minimap = 2, etc. alt
+~
will bring the news panel back up, but this panel is subsequently hidden whenever another panel is toggled.
Removing either of these configuration options or setting them to zero will disable resizable mode and the in-game experience will remain unchanged.
There are a few other projects included with the EndlessClient solution that are designed to make the development process much easier.
The core projects are EndlessClient and the EOLib projects under the "Lib" solution directory. They are the only required projects in order for the game to run.
Any projects with a ".Test" suffix in the name contain unit tests. These will be expanded for as much code coverage as possible.
BatchMap is designed to do batch processing and error correction on the original EMF files. When running EOSERV with the default map files, a number of warning messages during map loading will pop up. BatchMap processes files and corrects these errors so that the output of EOSERV is much less verbose when starting up.
BatchMap corrects for a number of errors, including:
BatchMap can easily be modified to take care of other batch processing tasks, such as dumping out values in map files for debugging or comparison.
BatchPub is designed to do batch processing of items within the EIF file. It can be used to bulk change properties in the pubs based on certain criteria.
EOBot has recently been updated with an interpreter to make scripting of bots possible. The scripting language is the unholy offspring of javascript and php (really just inspired by the syntax of those languages). Run EOBot --help
without any arguments to see more information on the command-line parameters it expects.
The default behavior of EOBot when not running in script mode is as a TrainerBot. See TrainerBot.cs
for more details on the implementation.
EOBot is used by https://www.github.com/ethanmoffat/etheos to execute integration tests against server instances.