Inventive Dingo forums Inventive Dingo forums
News:
 
*
Welcome, Guest. Please login or signup. November 25, 2024, 12:13:03 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: How to make a dedicated server  (Read 28456 times)
Chris
Administrator
*****
Posts: 410


Developer


View Profile WWW
« on: February 02, 2009, 12:53:11 am »

You will need

  • A paid-up copy of Mayhem Intergalactic (the demo won't do)
  • An internet connection
  • The port you're hosting on (7465 by default) must be allowed through any firewalls you're running
  • If you're behind a NAT router (most home users are, especially if there is more than one computer connected to the internet in the house), then the port you're hosting on must be forwarded through the router. See "Troubleshooting" below.

Basic operation

Add the --dedicated-server option to the command line when starting the game, like this:

mayhemig.exe --dedicated-server

You can do this either using the Windows command line, cmd, or by creating a shortcut to mayhemig.exe on your desktop and then adding the --dedicated-server option to it.

Steam: mayhemig.exe can be found in C:\Program Files\Steam\steamapps\common\mayhem intergalactic

Non-Steam: mayhemig.exe is wherever you installed the game (by default, C:\Program Files\Mayhem Intergalactic)


What about dedicated LAN servers?

By default, dedicated servers will announce their presence to the entire internet. If you'd prefer to create one just for LAN play, add --lan to the command line as well:

mayhemig.exe --dedicated-server --lan

Configuration

Configuration is done using options.ini, which can be found in the folder %appdata%\MayhemIntergalactic. You can change the server's name by typing servername=Your Server Name under [general]. To password-protect the server, type serverpassword=yourpassword under [general]. Certain other in-game options can also be set here. For example, here is Mayhem Central's options.ini, which as well as setting the server name also sets the AI intelligence to Highest:

Quote
[general]
servername=Mayhem Central

[ai]
intelligence=6


Troubleshooting

Q: Help! Nobody can connect to my server!

A: There are two usual causes for game networking errors: Firewalls and routers.

The first thing to try is to turn off all your firewalls. If that fixes the problem, turn the firewalls back on and add appropriate exceptions. If your firewall works on a per-application basis, you just need to allow the Mayhem Intergalactic program full access to the internet. If you're having problems with hosting the game, you may also need to allow incoming connections on the port that you're hosting on (the default port is 7465, but you can change it to any port on the "create server" screen).

If you've turned off all your firewalls and people still can't join the game that you're hosting, and especially if you have more than one computer in your house, then you probably have a router issue. Most home routers are Network Address Translation (NAT) routers, which means they share one public IP address between multiple computers. Each computer shares that one public IP address, but has its own private IP address.

Computers on the internet only know your public IP address, and all information directed to any computers in your house is sent to that public IP address. So your router needs to know how to sort that information and deliver it to the private IP address (this is the step that puts the "NAT" in "NAT router").

For normal web browsing, email, etc., the router is smart enough to figure it out on its own. But if you're hosting a server (for example, a Mayhem Intergalactic game server) then you need to tell your router that you're doing that, so that the router knows where to send incoming connections.

Telling the router that you're hosting a server is called "port forwarding". It's a little complicated to set up, but you only have to do it once.

Different routers have different methods for forwarding ports. The first step is to find out your router's brand and model number. This will usually be written on the side of the router, and on the packaging that came with it. For example, my router has "D-Link DI-704P" on the side. D-Link is the brand, DI-704P is the model number. Yours will probably be different.

A router physically looks like a little box, and has all of your computers' network cables plugged into it. (Or, if you use wireless networking, it might have an antenna instead.) It will typically also have another network cable plugged into your modem, which your ISP will have supplied (or required you to buy). Occasionally the modem and router are integrated into one unit.

Once you've found your router's model number, visit this page at PortForward.com and search the page for it. Click on your model number, and then go to the "Default Guide". You'll get a detailed guide, specific to your router, on how to set up port forwarding. When it asks for a port, put in 7465, unless you changed that number on the "Create game" screen. You should forward both TCP and UDP.


You haven't answered my question

Post your question below, and I'll answer it and/or amend this guide.
« Last Edit: February 02, 2009, 12:58:48 am by Chris » Logged
Stixsmaster
Space cadet
*
Posts: 24


View Profile WWW
« Reply #1 on: February 02, 2009, 01:45:49 am »

May I suggest to make it easier for steam users to mention that...

to get things working to instead of using a shortcut way like the non steam users may have to...just do the following...

Go to your "Games" tab then right click the game then click on the "Properties" button in the menu that pops up...then after that click on the "Set launch options..." button under the "General" tab...in that add the command line "--dedicated-server" and then click on "OK" and that is it...

---Stixsmaster
Logged
Chris
Administrator
*****
Posts: 410


Developer


View Profile WWW
« Reply #2 on: February 02, 2009, 04:42:55 am »

Yes, that will also work. I figured I wouldn't mention it since it means you have to go back and delete that option if you actually want to play the game, which could get inconvenient. A shortcut is more work to set up initially, but you only have to do it once.
Logged
Kumlekar
Eats planets for breakfast
****
Posts: 140



View Profile
« Reply #3 on: February 06, 2009, 08:03:14 am »

How do I setup a desktop shortcut to launch the dedicated server?  I've been doing it through steam.
Logged

What is Six Times Nine
Forty-Two!

Jp may have played mayhem before it was cool, but I play while its cool! *

* "Cool" is defined as the period of time in which Kumlekar plays a game.
Chris
Administrator
*****
Posts: 410


Developer


View Profile WWW
« Reply #4 on: February 06, 2009, 09:18:04 am »

To set up a dedicated server shortcut:

1. Find mayhemig.exe. For Steam copies, it's in C:\Program Files\Steam\steamapps\common\mayhem intergalactic (substitute "C:\Program Files\Steam" for wherever you installed Steam). Otherwise, it's simply wherever you installed the game (by default, C:\Program Files\Mayhem Intergalactic).

2. Right-click on mayhemig.exe and choose "Create shortcut".

3. Drag the created shortcut to the desktop (or wherever you want it).

4. Right-click on the shortcut and choose Properties.

5. Add the following to the end of the Target field: --dedicated-server

At this point the Target field should contain something similar to: "D:\Games\Steam\steamapps\common\mayhem intergalactic\mayhemig.exe" --dedicated-server

Double-clicking this shortcut will start a dedicated server. You won't get any notification that anything has happened (sorry), so you may wish to fire up another copy of the game and make sure your server is visible and functioning.
Logged
Kumlekar
Eats planets for breakfast
****
Posts: 140



View Profile
« Reply #5 on: February 07, 2009, 02:17:03 am »

The target field contains: "F:\Program Files\Steam\Steam.exe" -applaunch 18600"
Logged

What is Six Times Nine
Forty-Two!

Jp may have played mayhem before it was cool, but I play while its cool! *

* "Cool" is defined as the period of time in which Kumlekar plays a game.
Chris
Administrator
*****
Posts: 410


Developer


View Profile WWW
« Reply #6 on: February 07, 2009, 02:59:02 am »

That's the target field that you get if you use Steam to create the shortcut. I prefer not to do that, since Steam labels you as "in-game" if you use that method. That's why I suggested making a shortcut to mayhemig.exe directly. Smiley
Logged
teufelernie
Space cadet
*
Posts: 6


View Profile
« Reply #7 on: February 14, 2009, 10:23:52 pm »

hmm did somebody tried to get the server workin on a linux based system with w.i.n.e.?  Roll Eyes
Logged
Chris
Administrator
*****
Posts: 410


Developer


View Profile WWW
« Reply #8 on: February 15, 2009, 12:19:06 am »

I've had reports that the game does work under Wine. Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM