• Welcome to Vice City Multiplayer.
 

[Beta] Multimode Server (MMS)

Started by stormeus, April 22, 2011, 10:57:25 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

stormeus

Table of Contents

Multimode Server (MMS)
So this is a little project I started a few days ago when I noticed that SA:MP servers have the ability to rotate between game modes, while VC:MP doesn't offer such a feature. Though I can't recode the VC:MP server itself, I've made a wrapper that lets you (almost) seamlessly rotate between multiple gamemodes on one server.

By having a separate process handle the actual rotation, editing the actual server configuration and spawning servers, it's now possible to have a mode rotation such as Bomb da Base, followed by Capture the Flag, in a similar way as GTA:IV's multiplayer. To make good use of it, you could string multiple gamemodes by using GameModeExit() while running the multimode server. Once the gamemode stops, so will the server. After it detects that the server's been shut down, it'll reload it with the next available gamemode.

If you want to shut down the multimode wrapper, go to the multimode console and press Ctrl + C. You can also use Ctrl + C on the server console to skip that gamemode.

Beta
MMS is currently in open beta. It should be stable enough for server enthusiasts to use. However, use on production servers is not endorsed by myself and will be done at the server owner's own risk.

Right now, MMS does not support Squirrel servers. Implementation for Squirrel will take time.


Installation
Unzip multi-svr(.exe) and multimode.cfg to your server's folder. That's all there is to it.

Configuration
Open multimode.cfg in Notepad (nano or vim on Linux) or any code editor. The config file works so that each line counts as a game mode. If you had two game modes: mode1 and mode2; your multimode.cfg file would look like this:


mode1
mode2


Download



Source Code


Mirrors always welcome!

Screenshots (Click for full size)



NOTE: "Mode1" was a typo across all the testing gamemodes. It's just to illustrate that the server is capable of rotating between multiple gamemodes.

Todo
Feature suggestions and bug reports can be made in this thread.


  • Implement support for Squirrel servers.

thijn

I don't wanna open this unless I see the source code.

Also, A bit more documentation would be nice..


stormeus

#2
Quote from: thijn on April 22, 2011, 04:34:11 PM
I don't wanna open this unless I see the source code.

Also, A bit more documentation would be nice..

Post updated. Here's what I added:
Quote
Source code: http://www.mediafire.com/?3cwa6oj5so5yj53 (3.53kb)
Quote
To make good use of it, you could string multiple gamemodes by using GameModeExit() while running the multimode server. Once the gamemode stops, so will the server. After it detects that the server's been shut down, it'll reload it with the next available gamemode.

If you want to shut down the multimode wrapper, go to the multimode console and press Ctrl + C. You can also use Ctrl + C on the server console to skip that gamemode.
Quote
Screenshots:
(Click for full size)




NOTE: "Mode1" was a typo across all the testing gamemodes.  It's just to illustrate that the server is capable of rotating between multiple gamemodes.

Quote from: yazeen on April 22, 2011, 03:37:25 PM
You Got to be Fucking Kidding me! is this Real/Fake anyway i cant wait to try it!

No joke, it's real. ;)

Morphine

Man with the brain on his duty. :)
Can't wait to give this a personal try. Sounds great!

stormeus

Quote from: Morphine on April 22, 2011, 10:01:09 PM
Man with the brain on his duty. :)
Can't wait to give this a personal try. Sounds great!

Thanks, Morph. :)

By the way, the Linux version should be ready by late tonight. I just have to test it, but I don't have a VM set up to compile and test it under. I have an Ubuntu Server ISO ready to go.

BIG[H]

o_O?               






Perfect Time and Perfect Script Nice Job stormeus .That's what i want :)
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

Morphine

I've been told by stormeus that this little feature has barely reached alpha.. so testing will only show you the earliest parts of it. :)

stormeus

Quote from: Morphine on April 23, 2011, 12:59:44 AM
I've been told by stormeus that this little feature has barely reached alpha.. so testing will only show you the earliest parts of it. :)

Yeah. The real beta starts when Squirrel compatibility is added and it's compiled for Linux. Right now, this is mostly experimental, but stable enough to not cause your computer to explode.

StriKe

I edited your post and deleted most of your useless spams in forum
Can't you see this ?
« Last Edit: April 22, 2011, 09:30:45 PM by StriKe »

Skirmant

So you "reverse engineered" the VCMP server? I believe the source code would be worth sharing :P
I know advance mIRC, average C++, basic Pawn & Squirrel, very basic Java Script.

stormeus

#10
Quote from: Skirmant on April 23, 2011, 12:36:43 PM
So you "reverse engineered" the VCMP server? I believe the source code would be worth sharing :P

Not exactly reverse engineering. It's just a wrapper around the VC:MP server that rotates gamemodes. This is pretty much how MMS works:


  • Load multimode.cfg and count each line as ./gamemodes/line.amx
  • Check that each gamemode is valid. Quit if one isn't.
  • Infinite Loop

    • Check that the mode being loaded is valid. If not, use the first mode.
    • Load server.cfg and replace the gamemode0 line with gamemode0 line 1
    • Save server.cfg
    • Try to launch the server. Quit if it doesn't.
    • Wait for it to finish.
    • Close server handles and get ready to use the next mode.
    • Repeat loop.

The source code is already available for download.


Edit: April 23 @ 22:30 (GMT-6)


Updated
Changelog:

  • Stable enough for Beta testing.
  • MAJOR: Linux version has been compiled and is ready for testing.

The probability of a Squirrel release aren't looking so good for the near future. I managed to get a Squirrel server package after a little bit of searching, though the way I see it, the only way to support Squirrel would be to have multiple server installations and rotating through each rotation.

Whoops, I might've been looking at the mIRC server. Squirrel should be do-able.

BIG[H]

In what case it can be useful ??
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

yazeen

Dude This Dosend Swith the gamemode while the game is running!  When Server Crashes or when we turn off the server it swithes to other gamemode! but we must re-enter the game! i Kinnda like it caz noone can crash our server if we put the both gamemode the same when someone crashes it automattically Runs again! Say Bye bye to Pawno server   Crashing Softwares. Good Work!

Skirmant

Quote from: yazeen on April 24, 2011, 02:16:22 PM
Dude This Dosend Swith the gamemode while the game is running!  When Server Crashes or when we turn off the server it swithes to other gamemode! but we must re-enter the game! i Kinnda like it caz noone can crash our server if we put the both gamemode the same when someone crashes it automattically Runs again! Say Bye bye to Pawno server   Crashing Softwares. Good Work!

Don't see how this can stop "crashing software". Server goes online, crasher takes it down again by sending trash data. The only actual way you could stop crashing software is by making "mirror ports" for all servers. For example you set real and fake port in config. And master server links your fake port with the real port. In other words, master server only shows your fake port and is you are able to connect with it when the master server is online.   
I know advance mIRC, average C++, basic Pawn & Squirrel, very basic Java Script.

stormeus

Quote from: Skirmant on April 24, 2011, 04:16:25 PM
Quote from: yazeen on April 24, 2011, 02:16:22 PM
Dude This Dosend Swith the gamemode while the game is running!  When Server Crashes or when we turn off the server it swithes to other gamemode! but we must re-enter the game! i Kinnda like it caz noone can crash our server if we put the both gamemode the same when someone crashes it automattically Runs again! Say Bye bye to Pawno server   Crashing Softwares. Good Work!

Don't see how this can stop "crashing software". Server goes online, crasher takes it down again by sending trash data. The only actual way you could stop crashing software is by making "mirror ports" for all servers. For example you set real and fake port in config. And master server links your fake port with the real port. In other words, master server only shows your fake port and is you are able to connect with it when the master server is online.  

It doesn't stop the server from crashing, but it can automatically restart the server if it crashes. For example, if you had only one gamemode called "mode," all you need to put in multimode.cfg is
mode

Run multi-svr, and once the server closes, it'll automatically go to the "next" mode, which is mode.


I also see my thread has been stickied. Thanks, guys. ;D