JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.01k stars 612 forks source link

Mutual kills on OpenJK dedicated server #1077

Closed quartznets closed 3 years ago

quartznets commented 3 years ago

Operating system and version:

Debian GNU/Linux 10 (64-bit) Compilled openjkded from the latest master commit

Is this for single player or multiplayer?

Dedicated server

Description of the bug (and if possible, steps to reproduce the bug):

On a dedicated server, mutual kills may happen when the adversaries attack each other and make equal amount of damage. Independently of the game type, this happens in duel, tffa and ffa modes.

I am attaching the config used on the server. nicecfg.txt

Is there any option I should adjust in order to stop this happen?

What did you expect to happen instead?

No mutual kills to happen.

bartrpe commented 3 years ago

I don't really see it as a bug, it's been part of the gameplay since forever. The game just allows kills to happen at the same frame, and there really isn't a reason it shouldn't happen, both when using sabers and guns. It's more/less visible on specific gamemods based on how they handle saber movement, if they change it at all. It's super-rare occurence obviously, but well... if two players hit each other with lightsabers in the exactly same time and both strike each other at the same time - then, well, it works that way :P

It should be happening - when both opponets hit each other at the same time and both deliver enough damage for the kill, well, both should die.

I have small experience with base JKA, but I saw it happen there two times before the era of OpenJK. Both on normal servers on base game without mods. And I've been playing OJP and its various forks since 2008, with all the server executables possible: old linuxjampded, Windows dedicated servers, OpenJK ones with 2016, 2018, 2020 versions, and it still happens there all the time.

There's no bug to speak of IMHO. That's how the game worked since its inception - some people see it once in 1000 duels, others never see it, but that's just how the game worked and OpenJK isn't supposed to change any of the game mechanisms iirc.

quartznets commented 3 years ago

I understand what point you have tried to bring here and agree on that it should be a normal logical behavior of the game, but there are some people like me who play only basejka since 2007 and never saw this happening on pure servers once in their life and when it happened more than 5 times on the OpenJK server running only for 2 days then it becomes quite an obvious and visible issue, not speaking of the fact there are quite a lot of publicly available demos from old Electronic Sports League matches and even if you watch all of them you would never see this to happen.

Also it's worth mentioning that while This project does not attempt to rebalance or otherwise modify core gameplay, unfortunately it does in a very abundant way when it's about a dedicated server, however the fact that most OpenJK developers are unaware of the basejka scene explains such changes as default sv_fps 40, extreme saber blocks and this issue.

It may be considered a bug in case this project really does not attempt to rebalance or otherwise modify core gameplay, because it have never happened on original basejka and would never happen if you run the server for 365 days, but may not be considered a bug if rebalancing the game is alright for OpenJK, however it sounds opposite to what is written in the project's README.

joi1337 commented 3 years ago

^ Correct, I have never seen mutual kill happen on basejka, ja+, lugormod, and you name any other mod running on top of linuxjampded. On OpenJK dedicated, mutual kills start to appear. Reactions? - I think question marks in chat during the match are enough to be mentioned here.

"such changes as default sv_fps 40, extreme saber blocks and this issue." - that too, OpenJK with the real pre-2017 ESL TDM configs are more "blocky" than the regular linuxjampded compilations. I am not sure what is causing this, but the difference is felt and I do not think that it means that the game remains unmodified.

Additionally, I have been hopping between two servers for the past couple of days, both running the same .cfg, one is OpenJK, another one - linuxjampded. Sadly, the difference was spotted by nearly everyone who has at least some kind of experience in how the sabers should behave gameplay-wise.

OpenJK, however, does a good job of eliminating ghosting by replacing it with blocks that should not happen on linuxjampded. That said, choosing between security and original gameplay is hard.

ensiform commented 3 years ago

The reason saber gameplay has changed is simply because the original game code is not optimized at all and seems very specific to OLD handling of floating points presumably. There are no direct or intentional changes in openjk gamecode or model collision however.

quartznets commented 3 years ago

I have compiled jampgame from 4da3702d4fbca73f60b4ff1f4b81fdbaa560742a and also beyond OpenJK, that turned out the OP issue is not OpenJK's fault at all. I have also found out that some early commits of OpenJK are based on https://github.com/Razish/jasdk_modbase and compiling it even on some ancient Linux from 2004 (Slackware 10.0) still gets to this issue reproducible, but with a much more reduced rate. Also, based on what you said, that project already include significant optimizations too and that could be the reason for mutual kills to happen.

Another thing that is irrelevant to the OP issue - the gameplay change significantly compared between builds made on modern Linux distributions and older, using random OpenJK commits from 2013 to 2017. I have tried using Debian 10 with gcc 8.x, Ubuntu 10 with gcc 4.x and Slackware 10 with gcc 3.x and can say that at least a compiler version does impact the gameplay. I am not sure how many jampgame modifications were made during that period but it becomes noticeable when you try to revert back OpenJK year after year and saber mechanics differ each build. It also feels like there are some unrelated things to each other become related and affect the the saber balance, but for now I have no sufficient experience to determine what exactly factors are those. Worth mentioning that I've considered the 'placebo' effect too during all those tests and always invited people to test each build with me, so all this are not only my own observations, but constant tffa's and duels played daily.

However, I could confidently say that jasdk_modbase project feels very close to the original jampgame 1.011 released on 2003, so it maybe a useful information for people who are looking for a decent basejka lib with basic security patches applied to host a server.

quartznets commented 3 years ago

I have researched a bit more and came to a conclusion that it's most probably impossible to replicate the same gameplay mechanics as basejka 1.011 by compilling OpenJK or modbase and even original game code on modern compilers.

While jasdk_modbase is close to the original jampgame, its engine patching method is broken by design and saber blocking behavior is sometimes insane. I have also tried the project called YBEProxy but it's broken by design too, because engine runtime modifications modify the game mechanics as well, and probably "proxifying" the jampgame with another jampgame isn't the most reliable idea out there because I believe it introduces other unexpected issues/behaviors.

By now, the best solution I found to provide the patched base was simply compiling OpenJK dedicated server from 5c50fac9a86b41df13228f15f40c487cca21a931 (without jampgame) and running basejka 1.011 on top of it with sv_filterCommands enabled, that patch most annoying buffer overflow exploits. I have also used YBEProxy code to patch some user commands in SV_ExecuteClientCommand before they get passed to jampgame's API. With this solution, the OP issue still happens, but I suppose bartrpe was right about it's normal for basejka to happen from time to time (but not that often as in OpenJK's jampgame), so I am closing this issue.

quartznets commented 3 years ago

Just a small update after a week of running a server using the last solution I mentioned ( openjkded + jampgame from 2003 ) full of activity - mutual kills stopped to happen completely (same as running linuxjampded + its jampgame).

Also another note, that running that solution does slightly alter the gameplay too but in a good way, because OpenJK's networking code is much better than original.