Home

Awesome

LibreMaple Client: a fork/continuation of JourneyClient

License C++ standard clang++ version Maplestory version

JourneyClient

JourneyClient is a custom, made-from-scratch game client for Maplestory. JourneyClient is written in C++ and was created by Daniel Allendorf in 2015.

The LibreMaple project aims to make a version of Maplestory that is 100% free and open on both the server and client sides, to preserve the freedom of its users and enable creativity and collaboration around the game. As such, the LibreMaple project takes the JourneyClient as a starting point.

LibreMaple aims to make the client cross-platform (GNU+Linux/macOS/Windows NT/FreeBSD/etc.) as well, so decisions are made with a cross-platform mindset as well as a free software one.

Supported versions

The client is currently compatible with GMS version 83 servers. For the UI file (UI.nx), one from GMS version 154+ should be used.

How to compile/install

Unix-like systems excluding macOS (GNU+Linux, FreeBSD, etc.) (may also work for Unix-like Windows subsystems like Cygwin, MinGW, or WSL)

Dependencies

(Note for Solus users: sudo eopkg it -c system.devel)

Most of these dependencies should be available from your package manager (pacman, apt, dnf, zypper, pkg, xbps-install, eopkg, yum, etc.), but for all dependencies listed with a version number, make sure to check that the version your package manager gives you is high enough. If your package manager doesn't have something or doesn't have a high enough version, you may have to install it using instructions from the relevant website and/or use auxilliary package management (yaourt, PPAs, copr, etc.).

Instructions

$ git clone https://github.com/Libre-Maple/LibreMaple-Client.git
$ git clone https://github.com/NoLifeDev/NoLifeNx.git nlnx

# The next command is probably best replaced by navigating to
# https://sourceforge.net/projects/asio/files/latest/download
# and downloading from there to get the latest stable version of ASIO.
$ wget https://downloads.sourceforge.net/project/asio/asio/1.12.1%20%28Stable%29/asio-1.12.1.tar.bz2
$ mkdir asio
$ tar xf asio-* --strip-components=1 -C asio/
$ rm asio-*

$ git clone https://github.com/glfw/glfw.git

# Again, the following command can be replaced by just going to
# https://sourceforge.net/projects/glew/files/glew
# and downloading the latest version of GLEW.
$ wget https://downloads.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0.tgz
$ mkdir glew
$ tar xf glew-* --strip-components=1 -C glew/
$ rm glew-*

$ git clone git://git.sv.nongnu.org/freetype/freetype2.git freetype

$ git clone https://github.com/lz4/lz4.git

# Again, the following command can be replaced by just going to
# https://www.boost.org/users/download/
# and downloading the latest version of Boost.
$ wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
$ tar xf boost*
$ rm boost*.tar.gz
$ mv boost*/ boost/

$ git clone https://github.com/skystrife/cpptoml.git

$ git clone https://github.com/imneme/pcg-cpp.git

$ export CC='/usr/bin/clang'
$ export CXX='/usr/bin/clang++'

$ cd freetype
$ sh autogen.sh
$ ./configure
$ make
$ cd ..

$ cd glew
$ make
$ cd ..

$ cd glfw
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ../..

$ cd lz4
$ make
$ cd ..

$ cd LibreMaple-Client
$ mkdir build
$ cd build
# Build type may also be `Release`, `RelWithDebInfo`, or `MinSizeRel`.
# Additionally, pass in the argument `-DNATIVE_BUILD=1` if you desire a native-
# only build (`-march=native`).
#
# Specify `-DCMAKE_CXX_COMPILER_LAUNCHER=ccache` if you are using ccache.
$ cmake -DCMAKE_BUILD_TYPE=Debug -GNinja ..
# Or `ninja -jN` with N being the number of CPU cores you wish to utilize.
$ ninja
# For `Release` and `MinSizeRel` builds only:
$ strip JourneyClient

If all this is successful, you should have the executable in your current directory (LibreMaple-Client/build).

macOS

Dependencies

Instructions

$ git clone https://github.com/Libre-Maple/LibreMaple-Client.git
$ git clone https://github.com/NoLifeDev/NoLifeNx.git nlnx

# The next command is probably best replaced by navigating to
# https://sourceforge.net/projects/asio/files/latest/download
# and downloading from there to get the latest stable version of ASIO.
$ wget https://downloads.sourceforge.net/project/asio/asio/1.12.1%20%28Stable%29/asio-1.12.1.tar.bz2
$ mkdir asio
$ tar xf asio-* --strip-components=1 -C asio/
$ rm asio-*

$ git clone https://github.com/glfw/glfw.git

# Again, the following command can be replaced by just going to
# https://sourceforge.net/projects/glew/files/glew
# and downloading the latest version of GLEW.
$ wget https://downloads.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0.tgz
$ mkdir glew
$ tar xf glew-* --strip-components=1 -C glew/
$ rm glew-*

$ git clone https://github.com/lz4/lz4.git

# Again, the following command can be replaced by just going to
# https://www.boost.org/users/download/
# and downloading the latest version of Boost.
$ wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
$ tar xf boost*
$ rm boost*.tar.gz
$ mv boost*/ boost/

$ git clone https://github.com/skystrife/cpptoml.git

$ git clone https://github.com/imneme/pcg-cpp.git

$ export CC='clang'
$ export CXX='clang++'

$ cd glew
$ make
$ cd ..

$ cd glfw
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ../..

$ cd lz4
$ make
$ cd ..

$ cd LibreMaple-Client
$ mkdir build
$ cd build
# Build type may also be `Release`, `RelWithDebInfo`, or `MinSizeRel`.
# Additionally, pass in the argument `-DNATIVE_BUILD=1` if you desire a native-
# only build (`-march=native`).
#
# Specify `-DCMAKE_CXX_COMPILER_LAUNCHER=ccache` if you are using ccache.
$ cmake -DCMAKE_BUILD_TYPE=Debug -GNinja..
# Or `ninja -jN` with N being the number of CPU cores you wish to utilize.
$ ninja
# For `Release` and `MinSizeRel` builds only:
$ strip JourneyClient

If all this is successful, you should have the executable in your current directory (LibreMaple-Client/build). However, it probably will not run right away, since the paths that the executable looks for dylibs on will be wrong.

In order to fix this, gather up the following files, copying them to wherever you find most appropriate if desired (you may want to put them all into the same directory as the executable for ease of use). All paths shown here are relative to the base directory where you cloned all of the repos and extracted the tarballs:

Now that you have the locations of these dylibs, you can change the executable to point to them. Like this, for example:

$ install_name_tool -change /usr/local/lib/libGLEW.2.1.0.dylib ./libGLEW.2.1.0.dylib JourneyClient
$ install_name_tool -change /usr/local/lib/liblz4.1.dylib ./liblz4.1.8.2.dylib JourneyClient

Windows NT (Windows 7, 8, 10+) (64-bit only, i.e. amd64/x86_64)

Dependencies

Instructions

$ git clone https://github.com/Libre-Maple/LibreMaple-Client.git
$ git clone https://github.com/NoLifeDev/NoLifeNx.git nlnx

$ git clone https://github.com/ubawurinna/freetype-windows-binaries.git freetype

$ git clone https://github.com/skystrife/cpptoml.git

$ git clone https://github.com/imneme/pcg-cpp.git

Navigate to https://sourceforge.net/projects/asio/files/latest/download and download asio-X.Y.Z.zip, whatever the latest version is (asio-1.12.1.zip as of this writing).

Use 7-Zip to extract the contents of the asio ZIP file to a directory called asio.

Navigate to http://www.glfw.org/download.html and download the 64-bit Windows binaries (called glfw-3.2.1.bin.WIN64.zip as of this writing).

Use 7-Zip to extract the contents of the glfw ZIP file into a directory called glfw.

Navigate to http://glew.sourceforge.net/ and download the "Binaries: Windows 32-bit and 64-bit" ZIP file (called glew-2.1.0-win32.zip as of this writing).

Use 7-Zip to extract the contents of the glew ZIP file into a directory called glew (make sure that the contents are at the top level of glew, you want glew\bin, not glew\glew-2.1.0\bin).

Navigate to https://github.com/lz4/lz4/releases and download the latest version of LZ4 for "win64" (called lz4_v1_8_2_win64.zip as of this writing).

Use 7-Zip to extract the contents of the LZ4 ZIP file into a directory called lz4.

Navigate to https://www.boost.org/users/download/ and download the latest version of Boost for Windows (called boost_1_67_0.7z as of this writing).

Use 7-Zip to extract the contents of the Boost 7z file into a directory called boost.

Notice here that we assume the installation directory of LLVM is the default one. If you don't use the default installation directory, you will have to tweak CMakeLists.txt yourself:

$ SET CC="C:\Program Files\LLVM\bin\clang.exe"
$ SET CXX="C:\Program Files\LLVM\bin\clang++.exe"

$ cd LibreMaple-Client
$ md build
$ cd build

Use the following two commands if CMAKE_BUILD_TYPE is to be Debug (you may wish to add an additional /mN flag, with N being the number of CPU cores you wish to utilize for compilation):

$ cmake -G "Visual Studio 15 2017 Win64" -T "LLVM-vs2017" -D CMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang.exe" -D CMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -D CMAKE_BUILD_TYPE=Debug ..
$ cmake --build . -- /v:d /property:Configuration=Debug /property:Platform=x64

CMAKE_BUILD_TYPE here may also be Release, RelWithDebInfo, or MinSizeRel. If you want to use one of these build types, use these commands instead, setting CMAKE_BUILD_TYPE to the desired value (we use Release here as an example):

$ cmake -G "Visual Studio 15 2017 Win64" -T "LLVM-vs2017" -D CMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang.exe" -D CMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -D CMAKE_BUILD_TYPE=Release ..
$ cmake --build . -- /v:d /property:Configuration=Release /property:Platform=x64

If all this is successful, you should have the executable (JourneyClient.exe) in LibreMaple-Client\build\Debug for debug builds, or LibreMaple-Client\build\Release for release build types. However, it probably will not run right away, since the paths that the executable looks for DLLs on will be wrong.

In order to fix this, gather up the following files, copying them to be right next to the executable. All paths shown here are relative to the base directory where you cloned all of the repos and extracted the ZIP files:

Compiler

LibreMaple is built against the latest version of Clang (6.0.X as of this writing), again for cross-platform considerations and efficiency. The GCC (version 8.1.X as of this writing) is another excellent choice, especially for those on GNU+Linux operating systems (or other OSs which default to GCC), but GCC is not officially supported by LibreMaple.

That being said, don't be shy to file issues involving GCC or to make PRs to improve ease of use/compatibility with it.

C++ details

JourneyClient was originally developed under the C++14 standard. However, LibreMaple strictly uses the C++17 standard and makes use of C++17 features.

In addition, this project (sort of) follows the ISO C++ Core Guidelines. A complete copy of the guidelines is available here.

More specific guidelines can be found in "code-guidelines.md".

Configuration

The build can be configured by editing the Journey.h file. The following options are available:

LibreMaple uses crypto (JOURNEY_USE_CRYPTO), and also uses ASIO (JOURNEY_USE_ASIO) to maintain cross-platform compatibility.

Dependencies

CategoryDependencyLicenseDepends onHeader only?Optional?
(De)compressionLZ4BSD 2-Clause-NoNo
Error checkingxxHashBSD 2-Clause-NoYes
NX libraryNoLifeNXAGPL v3+LZ4NoNo
GraphicsGLFW3zlib/libpngOpenGL supportNoNo
GraphicsGLEWModified BSD/MITOpenGL supportNoNo
GraphicsFreeTypeFreeType-NoNo
AudioSDL2_mixerzlib/libpngSDL2NoNo
NetworkingAsio (standalone; no Boost)Boost-YesNo
PRNGPCG (C++ implementation)Apache 2.0/MIT-YesNo
ConfigcpptomlMIT-YesNo
GeneralBoost (Bimap, Container)Boost-YesNo

Licensing

GNU AGPL v3+

All LibreMaple/JourneyClient code is © 2015-2016 Daniel Allendorf, 2018-2019 LibreMaple Team, licensed under the GNU Affero General Public License version 3 or higher (GNU AGPL). See "LICENSE" for the full text.

That implies a few things. For one, that makes this work a work of free software, including both the source code and any binaries created from it. According to the Free Software Foundation:

A program is free software if the program's users have the four essential freedoms:

As the above text implies, derived/modified works are encouraged, and due to the nature of the GNU AGPL, all such works are free software as well (also licensed under the GNU AGPL).