Decrease the lag.

Locked
ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 12:00

Summary (a quick, 2-3 sentence summary):

The current game, and codebase is just straight up laggy, especially when compared to other more mature codebases such as /tg/, baystation, /vg/and many others, fixing this is fairly easy and should be considered as a top priority above all other changes.

Benefits (How this will benefit the server and game as a whole):

The game will cause less lag, and framedrops allowing for a smoother game experience.

Details (Description of how you think this would work, the benefits, etc):

Making the game run smoother isn't that hard to pull of if you know where to look, and which tidbits to write, but considering the fact that you guys are closedsource, it might be harder to pull off due to the fact that all public forks are AGPL and won't allow you to pull their code in, so you'll have to come up with your own systems, either way here are some suggestions.
  • Remove ZAS, we don't need proper atmospherics, especially since we don't use them.
  • Implement the goonstation scheduler by Volundr.
  • Implement proper atom and datum pooling.
  • Properly implement qdel instead of using del()
  • Ensure world.cpu never hits 125 or BYOND will 'softlock' for a few seconds.
  • Size down the zlevels, we don't need gigantic zlevels with so much space around, it hogs down on performance.
  • Don't merge all maps into one large DMM that is loaded by the server, this once again hogs down on performance, /tg/ and /vg/ have scripts for maprotation, and there are ways to insert a fresh DMM into the DMB after compiling.
Implementation (Optional, if you have an idea how to implement it):

See details.

User avatar
Stivan34
Registered user
Posts: 192
Joined: 14 Aug 2015, 06:23
Location: Memerines' spess sheep

Re: Decrease the lag.

Post by Stivan34 » 24 Jan 2016, 12:13

You what mateeeeee? You just blew up my brain... +1 to decreasing the lag if that can happen...
Dabbingly dab.


Elite Hunter (596) AKA the MVP who died cause of vent superheating. GG

ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Re: Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 12:17

It can happen, it just depends on the abilities of the developers and the amount of time they are willing to spend on making the game faster, it can be done if you want to invest some time, look at Goonstation and other closed-source codebases that achieved to run without too much lag.

User avatar
forwardslashN
Community Contributor
Community Contributor
Posts: 2495
Joined: 14 Dec 2015, 23:12
Byond: forwardslashN

Re: Decrease the lag.

Post by forwardslashN » 24 Jan 2016, 12:35

+1
"Fixing this is fairly easy."
It's not at all easy, since it requires changes to the codebase on a fairly large scale. Though I agree with you, all of those changes will decrease lag, but I'm not really a fan of removing ZAS. I like my exploding decompression. CM is fairly light on coders, so most of that isn't possible right now without assistance--it might be simpler to take an existing codebase and port changes to it instead.
Last edited by forwardslashN on 24 Jan 2016, 13:08, edited 1 time in total.
Image
The ambivalent giant white baldie in a jungle near you.

User avatar
Logi99
Registered user
Posts: 293
Joined: 26 Jul 2015, 12:32

Re: Decrease the lag.

Post by Logi99 » 24 Jan 2016, 12:56

Sounds good +1
"There's been a new meme. So.."

Marine vs Predator Duels:
Predator Wins: 0
Predator Ties: 1 [Pred bleeded to death and decap'd me at the last sec. Had no AP D:]
Predator Lost: 0

User avatar
Jeser
Registered user
Posts: 1119
Joined: 04 Mar 2015, 00:47
Location: Donetsk, Ukraine

Re: Decrease the lag.

Post by Jeser » 24 Jan 2016, 13:12

Good suggestion, with exact points what to do. I like it, +1
Jeser "Fox" Aushwitz.
Jeser believes only in one thing - common sense.

Image
Image
Apop's permission: Click

ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Re: Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 13:19

\N wrote:+1
"Fixing this is fairly easy."
It's not at all easy, since it requires changes to the codebase on a fairly large scale. Though I agree with you, all of those changes will decrease lag, but I'm not really a fan of removing ZAS. I like my exploding decompression. CM is fairly light on coders, so most of that isn't possible right now without assistance--it might be simpler to take an existing codebase and port changes to it instead.
We don't require ZAS, Removing it is easy and only requires modification to some of the mob loop, and removal of some of the other parts, it doesn't fit in with the entire 'no breaching' rule, and it causes strain on the server.

User avatar
WyattH
Registered user
Posts: 305
Joined: 10 Sep 2015, 22:36

Re: Decrease the lag.

Post by WyattH » 24 Jan 2016, 14:01

-1 ZAS is love, ZAS is life

Without realistic atmos what's the point to spessmans


Also considering the amount of work required for the other changes and that we only have 2 coders while the other codebases have had far more working on them, I just dont see happening realistically...

ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Re: Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 14:09

-1 ZAS is love, ZAS is life
We don't need ZAS or any atmospherics engine due to the fact that we don't allow breaches, we don't need it, let's not waste cycles on it.
Also considering the amount of work required for the other changes and that we only have 2 coders while the other codebases have had far more working on them
I'd love to help wherever needed, but by the looks of it all open coder applications are not replied to.

User avatar
forwardslashN
Community Contributor
Community Contributor
Posts: 2495
Joined: 14 Dec 2015, 23:12
Byond: forwardslashN

Re: Decrease the lag.

Post by forwardslashN » 24 Jan 2016, 14:26

ErikHanson wrote: We don't require ZAS, Removing it is easy and only requires modification to some of the mob loop, and removal of some of the other parts, it doesn't fit in with the entire 'no breaching' rule, and it causes strain on the server.
ZAS aside, those mapping changes alone would be fairly time consuming, though not particularly difficult to make. Modern SS13 code has a lot of optimizations aside those you listed that could do well for CM server performance. Lighting and projectile dynamics, for example. You really should apply if you have the time for it, since the server would only benefit from newer code enhancements.
Image
The ambivalent giant white baldie in a jungle near you.

ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Re: Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 14:34

I'd apply, but as i've posted earlier, it looks like nobody is looking at the current applications, the open ones are left un-answered.

User avatar
forwardslashN
Community Contributor
Community Contributor
Posts: 2495
Joined: 14 Dec 2015, 23:12
Byond: forwardslashN

Re: Decrease the lag.

Post by forwardslashN » 24 Jan 2016, 14:52

Closed source certainly makes it a problem. I don't think you have a real shot at it anyway unless you're somewhat known on the server as a regular player. Also to note, I think Abbysynth is the one who handles the major code changes and they only recently came back from a hiatus. Maybe that will speed things along, but I have no idea.
Image
The ambivalent giant white baldie in a jungle near you.

User avatar
Abbysynth
Registered user
Posts: 465
Joined: 30 Apr 2015, 21:15
Location: Ottawa, Ontario

Re: Decrease the lag.

Post by Abbysynth » 24 Jan 2016, 16:05

All of this is nigh-impossible, we have already spent many hours discussing it. There are efficiency updates in the works, but we cannot use Goon's, TG's, or Bay's code due to them switching to the AGPL license so most of their stuff like Goon's master controller is not available to us. I pushed for us to switch to TG for Alpha but was voted down due to Bay's superior medical system.

So, anything we do for efficiency we need to design ourselves (meaning, myself), which is much more prone to future bugs because I'm honestly not a very good coder.

Wesmas
Registered user
Posts: 141
Joined: 22 Nov 2015, 07:59

Re: Decrease the lag.

Post by Wesmas » 24 Jan 2016, 16:19

Yes, this game and server can be laggy, but just think for a minute. Many large, expensive games are just as poorly optimised, and this is a free thing made from god knows what, which is rumored to be coded worse than our players sanity.
I know the lag can be a pain, but its a part of playing this game. Yes, if they manage to reduce it somewhat it would be nice, but there will always be lag to some degree. This is a game played by people in different contries, online, involving lots of moving things happening very quickly. I know how frustrating it can be to play, and I know this wasnt meant to be a salt post, but things are not always as doable as they seem to outsiders.
This server wasnt built from the ground up, it works on Byond code, the ss13 edits to it, the Bay edits to ss13 and then the server edits into CM. I am sure that if someone was to sit down for the next 6 months and do only optimisation it would be improved. BUT IT WOULD DRIVE THEM MAD! It would also bring updates to a halt as we seem to have less coders than are required.
I am Conner Scott.

User avatar
SecretStamos (Joshuu)
Registered user
Posts: 1291
Joined: 15 Oct 2014, 12:32
Location: Stars & Stripes

Re: Decrease the lag.

Post by SecretStamos (Joshuu) » 24 Jan 2016, 17:36

Additionally, a large source of our lag (lately) is coming from Byond way of limiting traffic.

After a certain amount of players, they suspend traffic for a few seconds if there's a large number of procs being run simultaneously. That's what's been causing the temporary freezes.

ErikHanson
Registered user
Posts: 41
Joined: 23 Jan 2016, 16:17

Re: Decrease the lag.

Post by ErikHanson » 24 Jan 2016, 18:03

SecretStamos (Joshuu) wrote:Additionally, a large source of our lag (lately) is coming from Byond way of limiting traffic.

After a certain amount of players, they suspend traffic for a few seconds if there's a large number of procs being run simultaneously. That's what's been causing the temporary freezes.
That's not BYOND limiting traffic, that's the server hitting >125% CPU which will indeed softlock the game.

User avatar
KingKire
Registered user
Posts: 893
Joined: 30 May 2016, 11:53

Re: Decrease the lag.

Post by KingKire » 24 Jul 2016, 04:23

Was the server optimized? If not, i guess a +1 for me to making the server run faster/ jump higher.
Gaze upon me,
for I have wandered deep into the ancient tombs of knowledge to which lie madness and sorrow, cleansing a path for all those who walk behind me...


...

But seriously, does uh, anyone know the way out?!


~Furthermore, I consider that Floodlights should no longer be destroyed.~

User avatar
forwardslashN
Community Contributor
Community Contributor
Posts: 2495
Joined: 14 Dec 2015, 23:12
Byond: forwardslashN

Re: Decrease the lag.

Post by forwardslashN » 25 Jul 2016, 17:25

We're working on it. Resolved.
Image
The ambivalent giant white baldie in a jungle near you.

Locked