Author Topic: Connecting to gameservers listed on websites - MegaGlest Gameserver MIME type  (Read 700 times)

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I wrote a shell script (I'd call it mgg_handler_installer), still very experimental, to make it possible to click a link on a website to run MegaGlest and connect to the IP:Port given on said website.
This script is pretty ugly so far, and I haven't even dared to test it, yet. So this is most likely very, very error prone and, if run, could seriously harm your computer (actually I don't think it will but I don't want to be blamed for broken PCs ).

I'd like your (that's primarily but not only Softcoders') opinion on whether or not installing such a MIME type handler on user' systems is a good idea (or not) and whether or not it would be ok to commit this (possibly after modifications). I would put it into source/tools/ for now, because of its experimental nature. If we actually decide that this is a good approach and if it ever grows stable then we could move it to mk/linux/ sometime.

This script is not the handler itself but rather an installer which creates some files (when run with --install, or removes those files when run with --uninstall), setting up a MIME type application/x-megaglest-gameserver, links it to files named *.mgg, and provides a handler script to invoke MegaGlest.

The idea is to have people access, for example, the http://master.megaglest.org web page and click on a server they want to connect to. This would then redirect them to, http://master.megaglest.org/?mgg_host=127.0.0.1&mgg_port=61357. This would trigger a file megaglest-server.mgg with MIME type application/x-megaglest-gameserver to be downloaded - in fact that's already the case now. This file would then be processed on the client and MegaGlest would be run with --connecthost=$ip --use-ports=$port,61357, i.e. directly connecting to the given server.

This script makes use of Freedesktop.org's XDG standard so it should be compatible with every recent graphical Linux desktop. And no, this won't work with Windows. ;-)
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

 

anything