QBonaventure / mppm

MIT License
3 stars 0 forks source link

Mppm

Never ask what MPPM means. All you need to know is that once it runs, it allows you spawning countless Trackmania game servers, easily search and add tracks, set your game rules, and play! Besides installing MPPM, which is pretty straight forward, you'd never need to fiddle with the system, but only use the web browser app to do it all.

It is managing your game server most tedious tasks, and it's also a in-game controller. Why not use another well established server controller? Well, it was supposed to, and used to. But it brought its lot of troubles to support at least the three main ones: it wasn't efficient and more messy for both the development and the end user. So, it was not planned, but it also packages its own controller.

This brings a few advantages:

And now I can bring why it can shine: Elixir. Elixir is a raising language, based on an industry seasoned platform (Erlang/OTP) and inspired by Ruby for its syntax and environment, built to process very large amount of messages, concurrently and failure proof!

Functionalities

There are 3 main functionalities:

Game servers

In-game UI / Controller

Other tools

Dependencies

We may recommend using asdf to install dependencies. It allows you to install and manage various versions of most common runtimes, as well as to pinpoint specific version of it for any paths.

System

As of now, the application is strictly developed on CentOS 7. However it should work on any Linux distribution.

Erlang/Elixir

Prerequisites

Config

After copying the *.exs.dist files into *.exs, you can:

Using the .env file

You can safely export all the files variables before starting the application using a subshell command, i.e.: (export $(grep -v '^#' .env | xargs) && mix phx.server)

config.exs

(dev|prod).exs

secret.exs

First start

Beforehand

Trackmania servers need ssl certificates to run. On some systems, such as linux distributions based on RHEL, the server will be looking for an inexistant file : /etc/pki/tls/certs/ca-certificates.crt. But we do have ca-bundle.crt, so simply execute # cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt, and you should be good to go!

Without docker

Now you can visit localhost:4000 from your browser.

With Docker

A docker-compose.yml file is provided and can be used as such. It makes use of a .env file that you can copy from .env.dist before editing. docker-compose up and you're good to go!

Elixir / Phoenix resources