Page 1 of 1

Understanding Multiplayer GZdoom

Posted: Tue Jan 16, 2007 15:07
by Disciple-X
I used to play Zdoom online all the time using a program called DoomServ. The program is long dead, but it was a lobby driven connector that supported all the startup Zdoom command line params. The good news, as some or a lot of you may know, is that GZdoom supports these exact same command lines, thus making multiplayer GZdoom possible.

In the old days of Zdoom v1.22, 1on1 matches on Doomserv were constant and it also allowed you to see how well you pinged to other people in the lobby. Even 56k-to-56k internet games were very playable as long as you had a ping of 250 or below to the other player. How you ask? I notice that many places that tell you how to set up GZdoom net commands fail to mention the "-dup x" command. DUP is a form of frame skipping that was used a great deal for Zdoom net games, however... DUP may be very dependent on the old 35fps method that Zdoom v1.22 used. GZdoom has uncapped FPS, so -dup may or may not provide acceptable results like it used to. So, I am going to explain how things were done exactly with DoomServ when v1.22 Zdoom was being used for net games. Try these commands out based on the ping of the person you are trying to play against. This is being explained with a Windows9x, 2000, or XP related OS in mind

First, for time saving reasons, make a basic shortcut link to GZdoom anywhere that you want. Right click on the created shortcut and then go to properties, then click the "shortcut tab." In the target box, go all the way to the end of the line and put one space after "GZdoom.exe. Now get ready to add your commands, but before you do, there are a couple of more steps to remember. First, you and the people/person playing have to have the exact same IWAD version, exact same PWAD version, and both the host and the client have to match the command lines exactly, or you will have issues when trying to play (only difference being that the host uses "-host x" and the client uses "-join IP"). Also, when experimenting with -dup, try using "cl_capfps 1-0" by typing it in into the Zdoom console. Now... on to the commands...

I have set up the command forms to mirror the host/client, and when setting up your commands, remember, you have to MATCH 100%

"X"= Numerical or name, take out commands that you do not intend on using.

person hosting
------
gzdoom.exe -file x.WAD -host x -warp xx -skill x -deathmatch 1 -altdeath -dup x +set cl_capfps x

person joining
------
gzdoom.exe -file x.WAD -join IP -warp xx -skill x -deathmatch 1 -altdeath -dup x +set cl_capfps x

-deathmatch 1 = deathmatch mode, omit this if you are doing a cooperative game or type -deathmatch 0

-altdeath = turn on respawn for weapons and items.

-skill = skill level 1-5, 5 is generally used for most DM games.

1on1 games = -host 2.

There is a weaponstay command as well, but I forgot if it was -weaponstay or some other command.

The host should always execute first, this will then cause GZdoom to startup, but you will notice that it is going to pause and then say "waiting for players." Now the Client starts up and will soon connect.

Finding out your IP is pretty easy, if in a win9x environment, click the start button, run, then type "winipcfg." If in a 2000 or XP environment, find the command prompt option in the start menu somewhere, run it, then type "ipconfig."

In old Zdoom, if the person had a 200-250 ping, -dup 2 was used. If they had a 300-350 ping, -dup 3 was used. essentially, if the 3 digit number started with 2, 3, etc, then you would use -dup 2, 3, etc. People who had DSL or Cable and pinged extremely well to one another would not even need -dup. Also, 8 players max are possible, as long as the host specifies the number of players correctly using the "-host x" command, but I do not know how playable it will be going over more than 3 players.


Obviously this is the complete manual approach to multiplayer GZdoom, but perhaps someone will write a lobby driven GZdoom specific program sometime soon.

Posted: Wed Jan 17, 2007 8:09
by Nash
Well, there have been discussions on the ZDoom forum about integrating Skulltag's multiplayer code into ZDoom. And recently, Carnevil (creator of Skulltag) has shown some interest in collaborating with the ZDoom team.

So what that'll hopefully mean is that ZDoom (and therefore GZDoom) will eventually have in-game joining which will improve multiplayer overall.

Posted: Wed Jan 17, 2007 10:21
by Graf Zahl
I still wonder why everyone thinks that Skulltag's netcode will be the solution to all problems.

Posted: Wed Jan 17, 2007 12:34
by Cutmanmike
People just want a doom where you can just click and play online I guess, and play against people you don't know.

Posted: Wed Jan 17, 2007 18:02
by Disciple-X
That would be nice, but for now I beleive all we can do is rough it out until someone decides to implement better net play for Zdoom.

Currently, Zdaemon is the best way to do the whole "point and click" net play that was mentioned, but then again... it is under fire lately due to cheating incidents and its recent shotty implementation of "un-lagged" net code. Not to mention that Zdaemon is far from focused on OpenGL implementation in light of the other security related issues.

Posted: Thu Jan 18, 2007 0:10
by EndResult
Not to hijack the thread or anything (I guess it's kind of on topic) - but after looking through the forums, the FAQ, the wiki, and other places, I was kind of hoping someone could give me an answer. Is GZDoom working successfully for anyone playing multi over the internet ? Over LAN it's great, but so far we've had no luck getting it working over the net - host waits, 2nd person joins, host sends "All here," 2nd person just sits there saying "Sending ACK" over and over (my wording may be off a bit, don't have it in front of me). So it seems we're connecting but it never "completes."

We've disabled any firewalls, set ourselves up as DMZ on our routers, even tried using Hamachi (works great for tons of other games when you don't want to worry about opening up ports, etc). Nothing's worked so far :(

So, my apologies for asking something that's probably been answered somewhere (that I couldn't find), but is the multi code just broke for internet play somehow? Or is it working and there's just something we're missing? I'm going to try it with some other people to rule him out later, but figured I'd post and ask too. Thanks for any help, sorry again to hijack your thread (but good info in that post too, thanks Disciple).

Edit: Sorry didn't even mention - we're running the latest build of GZ, both running XP Pro, both on cable modems - have tried different wads, no wads...

Posted: Thu Jan 18, 2007 6:04
by Disciple-X
Well, there was one command we used that would generally lift the connection problems, I believe it was "-extratic". Also, try a basic 1on1 net game first, then step it up for more players later. I know you said you looked at the Wiki, but the info I provided was off the top of my head, so when I saw the wiki, I saw things that not even I have tried.

all below is from the Zdoom Wiki

-altdeath

Informs ZDoom that you will be playing a deathmatch game and sets the dmflags cvar so that items other than invulnerability and invisibilty respawn after being picked up. Only player 1 needs to specify this.

-deathmatch

Informs ZDoom that you will be playing a deathmatch game and sets the dmflags cvar so that weapons stay behind when a player picks them up. Only player 1 needs to specify this.

-dup x

Causes ZDoom to transmit fewer player movement commands across the network. Valid values range from 1-9. For example, -dup 2 would cause ZDoom to send half as many movements as normal.

-extratic

Causes ZDoom to send a backup copy of every movement command across the network.

-host x

This machine will function as a host for a multiplayer game with <x> players (including this machine). It will wait for other machines to connect using the -join parameter and then start the game when everyone is connected.

-join host's IP address[:host's port]

Connect to a host for a multiplayer game.

-net console-number hosts ...

Informs ZDoom that you will be playing a network game. Using the -host/-join parameters instead is strongly recommended because they are much easier to use.

-netmode 0

Uses Doom's classic peer-to-peer network model. In this model, every computer talks to every other computer in the game, so the amount of traffic generated by this model grows exponentially with the number of players in the game, to the point that if you have more than four players, you should seriously consider using -netmode 1 instead. Even with only three or four players, you might want to use -netmode 1. For only a two player game, it doesn't really matter which netmode you use.

-netmode 1

Uses a master/slave network model. Instead of every computer talking to every other computer, the slaves only talk to the master, and the master relays all the packets to the other computer. Hence, the amount of traffic generated by this model grows linearly with the number of players in the game. Perhaps the most important consequence of this is that with -netmode 1, firewalled computers can join in a network game so long as the master (player 1) is not firewalled. This netmode is incompatible with the -net option, so you must use -host/-join to use netmode 1 (which you should be doing anyway).

-port x

Specifies an alternate IP port for this machine to use during a network game. By default, the port 5029 is used.

EndResult, give me a PM on the forums if you are interested in exchanging other contact information for the sake of debunking the GZdoom net play issue. I'd gladly help you try out all of these net commands or net games.

Posted: Fri Jan 19, 2007 16:44
by Cutmanmike
http://www.odamex.net/

Try this out, it's kinda new.

Posted: Fri Jan 19, 2007 19:08
by Snarboo
How is that a GZDoom multiplayer solution?

Posted: Mon Jan 22, 2007 4:07
by Disciple-X
It is not a "GZdoom" multiplayer solution, but a multiplayer solution in general. Of course, using that to play Doom online will aim to recreate Doom2.exe v1.9 mainly, adding a certain number of new multiplayer features on the side. Odamex is also built off of older Zdoom v1.22.

Posted: Mon Jan 22, 2007 4:09
by Snarboo
Ah, I see. :) I thought this thread was about GZDoom multiplayer only.

Posted: Mon Jan 22, 2007 17:56
by Disciple-X
that was the idea, but I have no problem letting someone "impose." doing so will only state the obvious regarding the poster's intentions. ;)