Author Topic: The problems with multiplayer  (Read 6850 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
The problems with multiplayer
So it's common knowledge that FSO multiplayer is generally not considered playable. As somebody who has actually attempted it (as recently as today, in fact), I feel like I can safely say that common knowledge in this regard is correct: in both PVP and PVE, any latency greater than that of a LAN connection is basically untenable; there's a lot of shooting of empty space in order to deal damage involved, the UX is lousy (can't look at the server list without disconnecting yourself from chat because...?), and it's just generally the least-upgraded portion of a codebase that's otherwise been seeing lots of incremental improvements over the past decade-and-change.

However, it's undeniable that there used to be people who played multiplayer with retail FS2. This led to a question: does retail actually behave differently than FSO in multiplayer, on a fundamental level?

Having recently done a direct IP game as both host and client with the retail executable, I feel that I can confidently state that it does not.

Which leads to other question questions, like: did people tolerate lag more back in the 90s, or were they just generally playing with lower pings?

Another possibility is that, since retail locked multiplayer difficulty but FSO does not (and it's therefore possible, although not recommended, to play multi on Insane with FSO), do difficulty level changes simply make the problems of latency more pronounced (e.g. AI ships maneuvering more, players running out of energy faster and making misses more costly, etc.)?

If anyone who used to play multiplayer back in the day is still around, I'd love to hear some firsthand experiences, especially if you can compare it to a recent build of FSO. If anyone would like to get a multiplayer game going for the purposes of testing or comparison, I'd be happy to assist there as well.

Finally, if anyone has any ideas for simple changes for how multiplayer could be made more user-friendly (assuming that anybody who had ideas for improving the notcode itself would've already spoken up by now, but hey, if you have ideas there, I'd love to hear them, too), I'm all ears.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: The problems with multiplayer
Likely, people have tolerated lag since it was more consistent than today's connections, in particular on home networks that use a wireless router or any ISP that has a wireless link somewhere. Higher traffic on the servers might also be to blame.

Client side, the hitboxes of the weapon projectiles might have been larger than they are now. A larger hitbox means it's easier to score a hit against a target, but also means "narrow miss" don't happen.

I seem to remember some visual aids in the multiplayer code that are supposed to help visualize how the engine handles the physics and positioning. Something about B-splines and maybe cones of uncertainty?
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
Re: The problems with multiplayer
At least some of it, I suspect, has to do with the variety of connection speeds now as opposed to when the game was designed. People's level of lag and desync can vary much more wildly.

Desync was pretty much expected for a period of time encompassing about FS2 multi to MechWarrior 3 multi; nobody would be where they actually appeared to be in a match and people didn't like it but they got used to it. People hadn't tolerated that before, though, with Duke Nukem 3D's or Doom's multi communities doing all they could to fight this sort of issue, and after FS2 people stopped tolerating it again pretty quickly with games like Battlefield 1942. Today that sort of thing can sink a game. FS2 existed in a brief space of time where having netcode that did that sort of thing was considered "okay".
"Load sabot. Target Zaku, direct front!"

A Feddie Story

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: The problems with multiplayer
Well if the problem isn't bugs so much as the fundamental design of multiplayer, that means that a refactor is needed. Which is going to be difficult given that none of the coders on here play multi that much.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The problems with multiplayer
Client side, the hitboxes of the weapon projectiles might have been larger than they are now. A larger hitbox means it's easier to score a hit against a target, but also means "narrow miss" don't happen.
I can assure you that the experience with the retail executable and FSO running retail data is exactly the same; it's no easier nor harder to score hits in retail multiplayer.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
Well if the problem isn't bugs so much as the fundamental design of multiplayer, that means that a refactor is needed. Which is going to be difficult given that none of the coders on here play multi that much.

As some of you know (especially in SCP), I am interested in improving the netcode and have been taking steps in that direction, such as removing outdated code (IPX support) and switching to cross-platform networking technology (Boost Asio).

However, as many of you also know, I am legally blind now and can no longer play FS2 or other FSO-based games. Thus I'm concerned that I'm eventually going to hit a wall where I  can't contribute any further because I just don't see well enough to debug an issue.

Well actually, I can complete FS2 Training Mission 3 where you shoot the drones, although it takes a little while. If I can do that, maybe my vision is good enough to do this? EDIT: It'd help if there were no nebula images and just a plain black starfield. Larger HUD gauges wouldn't hurt either.

In short, I'd like to give it a shot. :) But I can't promise how far I'll be able to take it.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: The problems with multiplayer
Well I've managed to get time to start FREDding and coding again so my offer to help still stands. I managed to get FS2_Open to compile and run on my Banana Pi so I can once again run a standalone for testing too.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: The problems with multiplayer
Well actually, I can complete FS2 Training Mission 3 where you shoot the drones, although it takes a little while. If I can do that, maybe my vision is good enough to do this? EDIT: It'd help if there were no nebula images and just a plain black starfield. Larger HUD gauges wouldn't hurt either.

In short, I'd like to give it a shot. :) But I can't promise how far I'll be able to take it.
I know the HUD gauge scaling can be tweaked via tables, and I'm sure someone could whip up some high-contrast textures if it'd help you out. :)

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
Well I've managed to get time to start FREDding and coding again so my offer to help still stands. I managed to get FS2_Open to compile and run on my Banana Pi so I can once again run a standalone for testing too.
Cool. The first step IMO is to gain a deep understanding of how the existing netcode works through documenting it. We'll continue the discussion elsewhere to avoid derailing this thread.

I know the HUD gauge scaling can be tweaked via tables, and I'm sure someone could whip up some high-contrast textures if it'd help you out. :)
Cool. Changes like these aren't pressing since they probably wouldn't be needed for quite a while, but it's good to know that they are possible.

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: The problems with multiplayer
It's good to have it confirmed that retail was just as difficult to score hits.  It means we haven't drifted multiplayer to being worse via expanded packets sizes or less efficient handling or something.  But it does indicate that not just a refactor, but probably an entirely new multiplayer model would be required to gain significant improvement, unless there's things in the existing multiplayer code that upon analysis are found to be obviously wrong and inefficient.  It's happened with the engine's performance multiple times over, so maybe it could happen with the multiplayer code.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Current projects: GVCa Tanen, Vasudan Imperium
    • Steam
    • User page on the FreeSpace Wiki
Re: The problems with multiplayer
However, as many of you also know, I am legally blind now and can no longer play FS2 or other FSO-based games. Thus I'm concerned that I'm eventually going to hit a wall where I  can't contribute any further because I just don't see well enough to debug an issue.

Well actually, I can complete FS2 Training Mission 3 where you shoot the drones, although it takes a little while. If I can do that, maybe my vision is good enough to do this? EDIT: It'd help if there were no nebula images and just a plain black starfield. Larger HUD gauges wouldn't hurt either.

In short, I'd like to give it a shot. :) But I can't promise how far I'll be able to take it.

This is terrible, I'm so sorry. I would definitely be willing to help you out per Mongoose's suggestion. Assuming you're willing to play with just retail data and not MediaVPs, I can create an alternate set of high-contrast maps, effects, and backgrounds for you in a couple hours. (Note to coders: this could be fun to use with a cel shader.)

In the meantime if you increase your gamma and/or the ambient lighting settings, that should help with the contrast issue. For the HUD, you could try playing at a lower resolution; all the interface art would be proportionately sized up.

Finally, if you haven't yet, you may find yourself able to play Windmills without much trouble. :)
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 
Re: The problems with multiplayer
As Mongoose said, you can just enable HUD scaling in a table instead of playing at a lower resolution.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
Thanks, guys! :) High-contrast artwork for retail assets would likely help, although I'm not totally sure what they'd look like. Being able to turn off the background (nebula images would help a lot, and I can try increasing the gamma and making the HUD gauges larger. Granted, I still won't be able to play it as an actual player (other than Windmills apparently?), but for the purposes of multi testing, those changes would likely  help a lot.


Anyway, back to the OP:

The issue of multi being unplayable today while playable in the past has been bugging me. It doesn't make sense. Connection speeds are much faster since the late 90's/early 00's, with higher bandwidth and probably lower latencies (or at least not higher), and the Internet is likely at least as reliable as it was then if not more so, meaning there shouldn't be issues with more packets getting dropped and having to be retransmitted. So why was it playable then and then totally unplayable now?

One thing that probably has changed, however, is how people configure the game. Because connections were slower (lower bandwidth), people probably had lower (less demanding) settings for the multi/network options. I bet people nowadays use very high network settings. Maybe that's part of the problem? The options control how many objects are included in object updates, probably other stuff too.

Looking at the retail FS2 launcher's network options, I see the labels are very different from wxL's. I revised those labels in wxL which were based on 5.5g's a while back with help from KyadCK, but maybe we chose the wrong labels, given however the engine uses those settings.

I'm going to do some code reading and look more carefully at what factors the multi/network options, both in-game and in the launcher, control, then report back with some settings values I'd like people to try.

In the meantime, if people want to experiment with those settings, go right ahead. I'd suggest trying both a recent build of FSO and FS2 retail. Don't forget about the multi in-game options in addition to the launcher options.

Note that the code "assumes *nix (OS X/Linux/*BSD/etc.) players are on a broadband/LAN connection :wtf: so for players on those platforms, changing the connection type in the launcher actually does nothing, and the value listed in the launcher for connection type is meaningless. No idea why it was written that way. :nono:

EDIT: Correction.
« Last Edit: February 25, 2016, 01:48:10 am by jg18 »

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
Haven't had as much of a chance as I'd like to look into the code on this, but I had another thought:

You know how when emulators for old games like DOSBox run too fast, the game can get jerky or otherwise have poor performance? I wonder if something like that could be going on here. Computers are surely much faster than they were in 1999. With the standalone, you can set a frame cap, and it defaults to 30. Maybe that's the rate at which the server was intended to run?

I don't think there's a way to cap the frame rate when you're hosting the game on your own machine, but as mentioned, with the standalone you can cap the frame rate. You can either try chief's Unix standalone (ask him for login credentials) or I can set up a Windows standalone on my desktop for you to play on, provided you can find one more person to test, since I don't think I can play if I'm running the standalone. I live in U.S. Pacific Time. Windows standalone might be better since I don't know how well the Unix one works with setting frame cap and displaying FPS.

The idea is to try moving the frame cap up and down and see if there's a point where the game becomes more playable.

Mind you, the frame rate calculations use the same inaccurate 32-bit floating point math that was causing the supr high server pings, dunno if that'll be an issue. Probably should use builds with the ping fix that I've been working on so that you have accurate ping values.

Also, I'd suggest going into the in-game multi options menu and if your object update is set to LAN, reduce it to high. IIRC the LAN setting removes all limits  on object update rate, so  likely only usable if you actually are playing on a LAN. Reminds me of a label in wxL that should probably be fixed...

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The problems with multiplayer
I don't think there's a way to cap the frame rate when you're hosting the game on your own machine
You can use the "MaxFPS" configuration value (that's in the registry on Windows, or the config file otherwise) to specify an FPS cap between 16 and 120 FPS (anything outside that range will result in the default of 120, although vsync and performance will of course determine whether or not you actually get 120 FPS).
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
I don't think there's a way to cap the frame rate when you're hosting the game on your own machine
You can use the "MaxFPS" configuration value (that's in the registry on Windows, or the config file otherwise) to specify an FPS cap between 16 and 120 FPS (anything outside that range will result in the default of 120, although vsync and performance will of course determine whether or not you actually get 120 FPS).
Good to know, thanks. The advantage of the standalone is that you can adjust the frame cap on the fly through the standalone GUI, whereas if you're hosting the game, you'd have to shut down the game, adjust the frame cap, and restart it.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: The problems with multiplayer
The more I study the netcode, the more I think capping the frame rate is worth a try. It's not a long-term solution, but it'll tell us if higher frame rates are part of the problem.

I'd try capping the frame rate at 30 or perhaps a bit higher like 35 or 40. Set it for all clients and the server and see if the game becomes any more playable.

Might even be worth trying a bit below 30 like 25 although the game itself is probably less playable at that frame rate.

Also try varying the object update level specified in the in-game multi options menu. I wouldn't set it any higher than "High" (that is, not LAN).

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Current projects: GVCa Tanen, Vasudan Imperium
    • Steam
    • User page on the FreeSpace Wiki
Re: The problems with multiplayer
JG18, I've made good on my promise and put together a high-contrast set of textures and backgrounds for you. I played a few missions, both open space and nebula, without my glasses, and managed pretty well; the main difficulty was in weapons and target management due to the HUD illegibility.

Hope this helps.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Caligma

  • 25
Re: The problems with multiplayer
I started playing this game a few months after it was released. I think the major internet access back then was dial-up 56k, T1, ADSL, DSL, and cable. So long as I played with somebody hosting on a cable modem, I did not see any noticeable lag. T1 was moderate lag from time to time, ADSL moderate lag on a more consistent basis, and DSL had slight lag.

I think lag now is more noticeable because of the faster connection speeds. We might have seen lag back in 2000, but recognized it as normal game play. In any case, I still can't get multiplayer to work on FSO and it's extremely complicated compared to retailer online :)

 
Re: The problems with multiplayer
Please, please, yes, please. I've spent hours trying to get a LAN game set up which isn't helped by the wikis not matching the actual settings. The multi log says it's not actually detecting the IP address.
When I did get the game running in MP last year (almost the same setup, what gives?!) there was a noticeable shudder to the gameplay. Is it because the ships get put in places based upon just the delivered information, and the game does no guessing of where people would be? I've not seen any rubber-banding so that's what I'd suspect.