How to set up netplay for multi-player retro arcade games using MAME and Kaillera

1 3814
Avatar for CryptoWyvern
3 years ago

Recently I've been getting back into retro arcade games from the 1990s, especially my favourite genre: beat 'em ups. Tribute Games Inc. just dropped a release trailer for a brand new Teenage Mutant Ninja Turtles beat 'em up which has renewed interest in these types of games, and I couldn't be more psyched.

With that in mind, I wanted to see if I could get some old school beat 'em ups working with some friends via netplay. Unsurprisingly, since these games were never designed to be played online, it's no simple matter to set up. But fortunately for us, plenty of smarter-than-me minds have applied themselves to the problem!

There are two ways I've gone through to get retro arcade games working over netplay via the MAME emulator. The first is Fightcade. It's a newer system (1.0 released 2015; current 2.0 released 2017) so it's got a slick interface and takes care of the complex things for you behind the scenes. The downside is, like the name implies, it's focused on two player fighting games and a two player limit is enforced for all games. So three player and four player games, which many beat 'em ups allow, are out.

The other solution is an older (2007!) program called Kaillera. Kaillera is basically a mini server you start on your PC and allow other players to connect to it. The server receives the inputs from all players, controls the timing, and distributes all inputs back to everyone playing the game. The downside here is that whoever is running the server needs to have a fast internet connection, and everyone playing should have as low latency to the server as possible, or your game will be laggy. Playable, but definitely laggy.

It took me a while to get Kaillera working and I had to use the collective knowledge from several FAQs, blogs and forum posts to do it. I thought I would compile all that I learned into a step by step walkthrough that hopefully helps you avoid pitfalls and WTF moments. This guide assumes you're using a PC running Windows 10. Let's start!

Installing MAME32 Plus Plus with Kaillera

First, head on over to the Kaillera download page and download the very first link: "Mame32 Plus Plus v0.119". This package contains the MAME Arcade emulator and also the Kaillera server all in one. Once you've downloaded the zip file, create a folder in your C:\Program Files (x86)\ directory called "MAME32 Plus Plus" and unzip the contents there. If done correctly you should have a big list of "artwork", "avi", "bkground", "cabinets" etc. folders in the "MAME32 Plus Plus" folder.

Scroll down to the bottom of the folder to find the "mameppkgui.exe" file and right click it. Select "Properties", then under the "Compatibility" tab, check "Run this program as an administrator". Hit "OK" to exit. Up to this point, all the friends you want to play arcade games with will have to do the above also.

Next you'll have to decide who's going to run the server. For the purposes of this guide, I'll assume that's you, but it should be the player with the fastest internet and/or whoever is centrally located so network latency between you all is minimized. I strongly recommend that whoever is running the server not do so over wifi. Use a computer that is physically connected to your modem via ethernet.

Router port settings

Being the host of the server means you're going to have to poke some holes in your gateway for specific ports Kaillera uses. Your gateway is the router or modem that stands between your computer and your DSL or cable internet line. You can usually find it by copy-pasting http://192.168.1.1/ or http://192.168.0.1/ into your browser's address bar. I hope you remembered the credentials you entered when you set it up!

If your modem or router's setup page doesn't appear at either of those links than do this to find your gateway: Hit the Windows "Start" icon and type "cmd"; click the "Command Prompt" link that pops up. In the window that appears, type "ipconfig" and press Enter. A bunch of IP addresses will pop up and you're looking for the ones that begin with 192.168.#.#. If you're running a VPN (or have any other kind of multiple network connections) you may see an entry for it here as well. I'm sorry to say, unless you're really savvy with your VPN's internal settings, you'll have the most luck with Kaillera if you turn it off completely. Your friends too.

In the command prompt window where you typed "ipconfig" there will be one row called "Default Gateway" with an IP address to the right. This IP address is the address of your router. Leave the command prompt window open (you'll need it later) and type "http://[Default Gateway IP]/" into your browser's address bar, where [Default Gateway IP] is the Default Gateway IP address from the command prompt window.

Okay, so hopefully you've remembered the credentials to log into your router. Since all brands of routers are different, unfortunately here you might have to do some internet digging of your own. What you're looking for is a "Port Forwarding" menu, which will probably be under an "Advanced" settings area of some kind. If you can't find it, do a web search for your router brand and model and "port forwarding" and you should find a guide that will help you find it.

Once you've found it, you should see a list of all the ports currently being forwarded, or an empty list with an "Add new" (or something similar) button if your router isn't yet forwarding any ports. Hit the "Add new" button and let's add the first port to forward.

The default port the Kaillera server uses is 27888, and you should get all your friends to follow the instructions below to open this port on their own routers as well. If you're worried about open ports, you can always disable them again after sessions. Here's what you want to set up:

There will be a field called "IP Address". The IP address associated with the port will be the IP address of your PC on your network. Remember the command prompt window I told you to leave open? That IP address will be two lines above the "Default Gateway" line and called "IPv4 Address". Type that address into the form for opening the port. Next there should be a field (or two fields) labeled "Public Port" or "Service Port". This is the external facing port you would like your router to stop ignoring and start forwarding to you. Type 27888 into the field. (If there are two fields, just ignore the second one).

Next there will be a field (or two fields) labeled "Private Port" or "Internal Port". This is the port on your PC you want the external messages to be forwarded to, in this case also 27888. Type it in!

Finally there will be a field called "Traffic Type" or "Protocol". For this port, you want it accepting both TCP and UDP types of traffic, so select "Both" or "All". All other fields you should be able to ignore. Hit the "Save" button (or whatever it's called) to confirm your selections. Depending on your router brand, you may have to "Save" again globally to confirm the changes, and you may even have to restart your router, but don't restart yet, because there is one more set of ports to open.

Only the router with the PC running the central server will need to open these ports, your friends won't have to. Follow the same instructions as above, but instead of 27888 and "Both"/"All" settings, you'll want to use the following settings instead:

Public Port/Service Port: 1000-6000

Private Port/Internal Port: 1000-6000

Traffic Type/Protocol: UDP only

The "IP Address" will be the same as the one you used before. Note that it's a range of ports, so if your form has two fields, type "1000" in the first field and "6000" in the second field. If there's only one field, type "1000-6000". Save (and save again) and you're done, but don't restart your router just yet. There is one more setting to change, and that's DMZ. Again, only you as the host will need this setting.

DMZ is short for De-Militarized Zone. It's basically the granddaddy of port forwarders as it will try to forward all incoming port traffic to the ports of a specific machine on your network. Your Kaillera server may work without enabling DMZ, but if not, remember where to find it in your router's web interface. If your friends have problems connecting to your game server, enable it and set your PC's IP address as the Host IP Address. If you enable it, you should probably disable it again after each session.

That's it for router config! Because everyone's router interface is different, it's pretty much the toughest part, if you ask me. Restart the router if it asks, and let's move on.

Finding ROMs

Now this part is a bit tricky because in many jurisdictions it's technically illegal to have ROMs in your possession unless you also own the original hardware. This makes it unwise to link to them directly. However there are plenty of sites out there only too happy to let you download some while looking at their ads. Personally though, I prefer the curated links that can be found waaaaaaaay down at the bottom of this page under the "Arcade" heading. Use the "MAME 0.229 ROMS" link (the version number might be later than 0.229 depending on when you read this article) since these are all "merged" ROMs. Merged means that they contain the main game, but also alternate and older versions of the game so they're more likely to run in an older MAME engine like MAME32 Plus Plus. For the purposes of this guide, let's grab The Simpsons, which is a 4-player beat 'em up. The filename for the game is "simpsons.zip". Easy, right?

Download the zip file and copy it to the "roms" folder in your "MAME32 Plus Plus" folder. Do not unzip it. It should come to rest here:

C:\Program Files (x86)\MAME32 Plus Plus\roms\simpsons.zip

All your friends will also need to download this ROM and copy it to their own "roms" folders on their machines. Now we can finally open MAME32 Plus Plus!

MAME32 Plus Plus setup

When you first open the program, you'll see a big list of items in a left-hand column, an empty central panel, and an info panel on the right with the MAME32 Plus Plus logo. First, let's get your Kaillera server set up. Only you (or whoever's running the central server) will need to perform these next few steps.

From the menu bar along the top of the window, click "Options" and then "Kaillera Server Options..." Here you can set the Name, Location, Website and other cosmetic details for your game server. The important fields here are "Server Port" which you should set to 27888, the "Server IP" which you should set to your PC's IP (the same one you forwarded the ports to) and the "Connection Type" which you will set to "Internet". Set "Connection restriction" to "Disabled" for now, but you can set it to a higher threshold if you want to open up your server to more players later and want to limit joiners to only those with low latency.

Set up the rest however you like and click "OK" to save the changes.

Prep the ROM for netplay

This next part will need to be performed by you and all your friends who want to play the game together. From the main MAME32 Plus Plus screen, click the "All Games" item in the far left-hand list. A big list of all games the system supports will appear. There are hundreds! Scroll down to "Simpsons, The (4 Players)". Right click the entry and select "Audit". The MAME system will check the ROM and verify that its checksum is correct and the window that pops up should show you a message that says "ROM check: Passed". Hit "OK" to close the window, and if you look back to the big list of All Games in the center pane, you should notice that the icon to the left of "Simpsons, The (4 Players)" has turned green. Nice!

You'd think at this point that the game would be ready to play, but it isn't. To avoid a bit of a WTF moment (remember I mentioned those?) you and your friends should close/exit the MAME32 Plus Plus program and restart it. Once it's back open, click the "Available" item in the left hand menu column. You should now see "Simpsons, The (4 Players)" appear as the sole item in the center pane. Now it's ready to play.

One last thing before we get to setting up the server... MAME32 Plus Plus comes configured for keyboard input only by default. If you and your friends want to play with controllers (don't use Switch controllers; this version of MAME doesn't like them) you'll all have to enable joystick input.

All of you should click "Options" in the top menu bar, and then select "Default Game Options..." In the window that pops up, select "Controllers" from the left hand menu. Check the "Enable joystick input" checkbox. While you're here, you should probably also check "Enable multiple keyboards" too. I'm not sure what it does, but it seemed to help things work when I was working on this guide. Click "OK" to save the changes and you're done here.

Server setup

Now it's time for you, as the host, to start your game server. In the top menu bar, click "File" and then "Start Kaillera Server". You should get a popup message saying "Start Kaillera Server Succeeded!"

Now that the server is running, everyone needs to join it... including yourself! To join your server, right click "Simpsons, The (4 Players)" in the center pane and select "Kaillera NetPlay..." This will open a window that starts populating with all the public servers registered with the main Kaillera server. From this window you can set your username, and "Connection type" which you and all your friends should set to "LAN (60 keyframes/s)" for the best experience.

The servers that appear in the list are almost all services running on dedicated webservers with fast internet connections. In the future you and your friends may choose to join a particular one of these servers instead of the one you created, but for now we'll use your own. Due to the nature of running the Kaillera server on your own PC, your server may or may not appear as an option in the list, but that doesn't matter because we don't really need it. We're just going to join everyone up directly by IP.

Before any of your friends join, you should join the server yourself. This is easily done because the server is running on your own machine. Click the "Enter IP..." button, and in the field that pops up, type "localhost:27888" and press Enter (or click the "Connect" button). The chat and staging window for your server should pop up. If it didn't... did you remember to start it using "File" >> "Start Kaillera Server"?

Once you've joined the server, you'll need to get all your friends to join the server via IP as well. However, they can't use the "localhost" shortcut. They'll need your actual, internet-facing IP address. To find this, just do a web search for "what's my IP address" and the results page should display it. Copy that address and send it to your friends with ":27888" tacked onto the end. It should look something like this:

10.20.30.40:27888

Direct your friends to right-click "Simpsons, The (4 Players)", select "Kaillera NetPlay...", set their usernames and choose "LAN (60 keyframes/s)" as the "Connection type", then click "Enter IP...", paste the IP and port you sent them into the field and press Enter to connect. They should begin appearing in your staging window. Hooray!

A note about your internet-facing IP: Most ISPs these days will give you a static IP address for as long as your modem is connected to their network. If your modem restarts, you'll probably be issued a new IP, so you can't just assume you always have the same IP; you'll need to check each time. There are internet services out there such as https://www.noip.com that can provide you with a generic hostname that stays the same even if your internet-facing IP changes, but for now that's outside the scope of this guide.

Some older ISPs won't give you a static IP however, and it will change regularly or with each and every request you make to resources on the internet. In this case, you will be forced to use the no-ip service, or get one of your other friends to run the server OR try using one of the existing Kaillera servers that popped up in the server list window. C'est la vie.

Start a game

From here, it's pretty simple: Click "Create new game" and under the "S" menu, select "Simpsons, The (4 Players)" and the bottom of the window will change from a list showing all the current games running on your server (currently empty), to a setup area for the game you are creating. All the friends who joined your server should now select the game you created from the list and click the "Join" button to join it, up to four players. Everyone's ping time will appear here so you can see if anyone will potentially bog down the game once it begins.

After everyone's joined the game, click "Start game". The game will pop up in a new window and you should be assigned slots based on your position in the "New game" window. So you, as the player to create the game, will be "Player 1", the next person "Player 2" and so on. The buttons to insert coins, depending on player position, are 5, 6, 7, and 8, while the "Start" buttons are 1, 2, 3, and 4, OR (in the case of The Simpsons arcade game) a button on each player's controller. You might have to play around with it a bit to make sure each person has their coin insert and start buttons found and functioning.

Everyone can double check (and change) inputs for the game by pressing the Tab key and selecting the "Input (this game)" option. You'll have to select inputs one at a time to change so it can get a bit tedious. Hopefully it won't be necessary.

After all that, enjoy playing!

Final notes

MAME itself (this version at least), has no volume knob. To adjust the volume of your game, right click the speaker icon in your Windows taskbar and choose "Open Volume mixer". Then scroll to the listing for your game and adjust the volume slider for it.

You and all your friends should be careful not to perform too many other tasks outside the game window that cause it to lose focus. If the delay between each of you gets too large, it may become more than the game can handle and you will desync. Try to stay focused on the game, so you don't need to restart it from the beginning. Capiche?

Session finished? Remember to disable the ports you opened and the DMZ option in your router config interface if you want to stay on the safe side. Also re-enable your VPN if you disabled it. It's just peace of mind.

Much thanks goes out to the authors of the following posts, pages and FAQs, from which I compiled this guide:

  1. http://www.kaillera.com/faq.php

  2. http://www.carigamers.com/cms/forums/index.php?topic=9956.0

  3. http://www.winkawaks.org/step-by-step.htm

3
$ 0.11
$ 0.10 from @RufusYoakam
$ 0.01 from @Shounenbat
Avatar for CryptoWyvern
3 years ago

Comments

I had no idea there were so many ways to use MAME! I used it mostly for 80s arcade games, but it looks like the emulator has developed since the turn of the century.

$ 0.00
3 years ago