Anonymous | Login | Signup for a new account | 2025-07-27 09:05 UTC | ![]() |
My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001956 | Zandronum | [All Projects] Bug | public | 2014-10-11 20:20 | 2018-09-30 23:36 | ||||
Reporter | Ijon Tichy | ||||||||
Assigned To | Dusk | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 1.3 | ||||||||
Target Version | 1.4 | Fixed in Version | 1.4 | ||||||
Summary | 0001956: Clientside ACS calls are bulkier than one would expect bandwidth-wise | ||||||||
Description | For whatever reason, two clientside ACS calls per tic sends 10KB/s worth of bandwidth. For tracer scripts, which must have the tracer drawing clientsided if they don't want to disconnect everyone online, this is not desirable for any large amount of pellets (like, say, a minigun with realistic fire rates). If there's any way to minimize the size of these calls, it should be pursued so that weaker connections (people still use dial-up!) can handle online play more easily. | ||||||||
Steps To Reproduce | 1) Start local testing server with scriptlag.pk3, and cheats on. 2) Open up some network monitoring tool. I used iftop. 3) Join local testing server. 4) give "Pistol Beam" 5) Hold down +attack with the Pistol Beam out. 6) Note the sudden 8KB/s jump. | ||||||||
Additional Information | I adapted Metroid: Dreadnought's Chroma Storm for this. Hence the FABULOUSNESS. | ||||||||
Attached Files | ![]() | ||||||||
![]() |
|
Dusk (developer) 2014-10-11 20:31 edited on: 2014-10-12 01:28 |
Hmm. The arguments are sent as three longs and the map name is sent as a string. We could probably cut down on those. |
Watermelon (developer) 2014-10-11 21:14 edited on: 2014-10-12 01:49 |
Interesting its sending the map name, that should be at most a single byte I'm guessing. |
Dusk (developer) 2014-10-12 01:36 edited on: 2014-10-12 01:37 |
To cut down on the args, we could send a byte header for them. For each of the three args, let (header >> (2 * arg)) & 8) be 0 if the arg is not sent, 1 if sent as byte, 2 if sent as short and 3 if sent as long. In the best case this chops off 11 bytes (a common case where args are all 0), at worst it adds one byte if all 3 args are sent and are at least 2^16 (AFAIK a very rare corner case). |
Watermelon (developer) 2014-10-12 01:55 edited on: 2014-10-12 02:01 |
I was thinking about what you said there, and I have an idea: void SERVERCOMMANDS_ACSScriptExecute( ULONG ulScript, AActor *pActivator, LONG lLineIdx, char *pszMap, bool bBackSide, int iArg0, int iArg1, int iArg2, bool bAlways, ULONG ulPlayerExtra, ULONG ulFlags ) Using what you said, arg1/arg2/arg3 can be cut down to 2 bits. Since it's weird to send a byte/short to represent 24 bits, here's a possible idea: 0x00 = no args (don't read a byte for this argument) 0x01 = arg is a byte 0x02 = arg is a short 0x03 = arg is a long This would require 6 bits total (2 bits per 3 args). We can also bundle the two booleans into 1 bit each. This is 2 more bits. Therefore we can put all the header information in 1 byte. The map can be a byte and reference the map index number, so that saves probably on average 4-5 bytes. Net inflate: 2 bytes Net deflate: approx 8-17 bytes (probably 17 a lot when sending 0/0/0 args). Sounds like a good gain! This should lead to most commands being 8-9 bytes in size, rather than 26-27 that they are now. |
Dusk (developer) 2014-10-12 12:59 |
Quote This is exactly what I said in my post. Here's what I have in mind:'http://pastebin.com/kKBspCh8 [^]' In the best case this would be 9 bytes total should the map be sent as a byte index. |
Dusk (developer) 2014-10-12 23:41 |
'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-request/78 [^]' Note that this will cause a merge conflict when merging to 2.0. Just overwrite SERVERCOMMANDS_ACSScriptExecute with this new one. |
Torr Samaho (administrator) 2014-10-13 19:10 |
The "Beam Pistol" example from'https://zandronum.com/tracker/view.php?id=1956 [^]' doesn't work properly anymore if I apply your patch. For instance, if I use the Beam Pistol on Doom2 MAP01 from the player 1 start the beam doesn't originate from the player body. Did you test this example? |
Dusk (developer) 2014-10-19 09:44 |
'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-request/86 [^]' Yeah I forgot to test the beam pistol with this. Problem was that the code didn't take negative numbers into account. |
Torr Samaho (administrator) 2014-10-19 16:07 edited on: 2014-10-19 16:14 |
The updated patch seems to work with the example wad now, but it doesn't solve the problem: The net traffic is still very high when firing the pistol. I'll have a closer look at what's going on. EDIT: The influence of SVC_ACSSCRIPTEXECUTE is negligible for the example wad. SVC_GIVEINVENTORY is eating all the bandwidth. |
cobalt (updater) 2014-10-19 19:39 |
Issue addressed by commit ce30242c5baf: - significantly optimized the SVC_ACSSCRIPTEXECUTE packet, making server-to-client ACS script calls not use up as much bandwidth (fixes 1956) Committed by Teemu Piippo [Dusk] on Sunday 19 October 2014 12:41:49 Changes in files: docs/zandronum-history.txt | 1 + src/cl_main.cpp | 74 +++++++++++++++++++++++++----------- src/p_acs.cpp | 2 +- src/p_lnspec.cpp | 50 ++++++++---------------- src/sv_commands.cpp | 92 +++++++++++++++++++++++++++++---------------- src/sv_commands.h | 2 +- 6 files changed, 130 insertions(+), 91 deletions(-) |
Dusk (developer) 2015-03-16 01:28 |
Since this modified a rather integral CLIENTSIDE feature, if there were any problems, surely we would've heard of them by now.. |
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
Supporters: | No one explicitly supports this issue yet. |
Opponents: | No one explicitly opposes this issue yet. |
![]() |
|||
Date Modified | Username | Field | Change |
2014-10-11 20:20 | Ijon Tichy | New Issue | |
2014-10-11 20:20 | Ijon Tichy | File Added: scriptlag.pk3 | |
2014-10-11 20:31 | Dusk | Note Added: 0010510 | |
2014-10-11 21:14 | Watermelon | Note Added: 0010511 | |
2014-10-12 01:28 | Dusk | Note Edited: 0010510 | View Revisions |
2014-10-12 01:36 | Dusk | Note Added: 0010519 | |
2014-10-12 01:37 | Dusk | Note Edited: 0010519 | View Revisions |
2014-10-12 01:37 | Dusk | Note Edited: 0010519 | View Revisions |
2014-10-12 01:47 | Watermelon | Note Edited: 0010511 | View Revisions |
2014-10-12 01:48 | Watermelon | Note Edited: 0010511 | View Revisions |
2014-10-12 01:49 | Watermelon | Note Edited: 0010511 | View Revisions |
2014-10-12 01:49 | Watermelon | Note Edited: 0010511 | View Revisions |
2014-10-12 01:55 | Watermelon | Note Added: 0010521 | |
2014-10-12 01:56 | Watermelon | Note Edited: 0010521 | View Revisions |
2014-10-12 02:00 | Watermelon | Note Edited: 0010521 | View Revisions |
2014-10-12 02:00 | Watermelon | Note Edited: 0010521 | View Revisions |
2014-10-12 02:01 | Watermelon | Note Edited: 0010521 | View Revisions |
2014-10-12 12:59 | Dusk | Note Added: 0010527 | |
2014-10-12 19:54 | Dusk | Assigned To | => Dusk |
2014-10-12 19:54 | Dusk | Status | new => assigned |
2014-10-12 23:41 | Dusk | Note Added: 0010561 | |
2014-10-12 23:41 | Dusk | Status | assigned => needs review |
2014-10-13 19:10 | Torr Samaho | Note Added: 0010572 | |
2014-10-13 19:14 | Torr Samaho | Status | needs review => feedback |
2014-10-19 08:42 | Dusk | Status | feedback => assigned |
2014-10-19 09:44 | Dusk | Note Added: 0010631 | |
2014-10-19 09:44 | Dusk | Status | assigned => needs review |
2014-10-19 16:07 | Torr Samaho | Note Added: 0010634 | |
2014-10-19 16:14 | Torr Samaho | Note Edited: 0010634 | View Revisions |
2014-10-19 19:39 | cobalt | Status | needs review => needs testing |
2014-10-19 19:39 | cobalt | Target Version | => 1.4 |
2014-10-19 19:39 | cobalt | Description Updated | View Revisions |
2014-10-19 19:39 | cobalt | Steps to Reproduce Updated | View Revisions |
2014-10-19 19:39 | cobalt | Note Added: 0010636 | |
2015-03-16 01:28 | Dusk | Note Added: 0011835 | |
2015-03-16 01:28 | Dusk | Status | needs testing => resolved |
2015-03-16 01:28 | Dusk | Fixed in Version | => 1.4 |
2015-03-16 01:28 | Dusk | Resolution | open => fixed |
2018-09-30 23:36 | Blzut3 | Status | resolved => closed |
Copyright © 2000 - 2025 MantisBT Team |