Comments (9)
Followup: this presentation is probably a lot more meaningful (main point is summarized in the slides "Game Packet Types"): https://github.com/catid/shorthair/blob/master/docs/ErasureCodesInSoftware.pdf
Currently, all actions are sent via "Ordered, Unreliable UDP" like player positions, which is advised by the author. But non-instant weapons such as rockets are very close to the "Bomb fired" example and could benefit from "Unordered, 99% Reliable UDP". And actually, I think that players positions could also benefit from this type of UDP packets, since essentially this could avoid jittering and false predictions, which is the main problem of network communications in real time games such as ioq3.
from ioq3.
Re-followup: a generic implementation of Reed-Solomon is available in the Linux Kernel, and there's a userspace port here:
https://github.com/tierney/reed-solomon
It's in C, it's portable, well-tested and under GPLv2, so it should be all clear for use.
from ioq3.
this sounds useful but possibly outside the scope of this project to implement. I would love to see a PR to discuss.
from ioq3.
Thank you @timedoctor :) I don't have enough time right now, maybe I'll give it a shot someday, but using a third-party reed-solomon library like the one above, it would mainly just be a call to encode udp packets before sending, and decoding upon reception (+ adding error correction parameters in the configstring sent from server).
from ioq3.
Here is a c-only library under GPL, so totally compatible with ioq3: http://rscode.sourceforge.net/
from ioq3.
Help needed, if any UDP expert out there, we can make a patch very quickly!
I'm giving it a try, but I'm not sure I'll succeed because I have no idea how to work with network packets of ioq3, but I know reed-solomon error correction code. So I'll document here my advances so someone else can pickup from where I stop if I fail. Hopefully, all the reed-solomon ecc part will be covered, only will remain the network packets implementation ;)
Reading the documentation, the NetChan packets are constructed like this:
Current NetChan design: raw message → Huffman compression → encoding → [optional fragmentation] → netchan packet headers added → UDP send
Ideally, ecc encoding should be placed at the very end, after any other encoding and just before UDP send, in order to allow for maximum decoding:
Proposed NetChan+ECC design: raw message → Huffman compression → encoding → [optional fragmentation] → netchan packet headers added → ECC encoding → UDP send
Indeed, if you do ecc encoding before, then at packet reception, the decoding might fail before the ecc can kick in because of other decoding steps like huffman decompression for example! Whereas if ecc encoding is placed last, the ecc decoding will kick in first, being able to correct both the netchan packet headers, the per-client encoding and huffman decompression (and the raw message of course):
Proposed NetChan+ECC decoding: UDP receive → ECC decoding → netchan packet headers read → [optional defragmentation] → per-client decoding → Huffman decompression → raw message
In other words: ecc decoding protects every steps that are after (but not before).
About the technical implementation, here is the outline:
- The rscode library provides a great and short starting example to implement ecc correction with their library.
- Encoding step: just before UDP send, compute ecc symbols to append to the NetChan message.
- Decoding step: at UDP reception, split the message to recover the original message and separate the ecc symbols (normally it's always the same number of symbols). Then simply use the ecc symbols to correct the message.
check_syndrome() != 0
can be used to check if the message needs correction, and if the correction is successful at the end (by trying to redecode the corrected message using the same ecc symbols, the syndromes should be equal to 0 if there is no error).
from ioq3.
The ECC encoding should be implemented in Netchan_Transmit() and Netchan_TransmitNextFragment() I think, so that it would be totally agnostic to the content.
from ioq3.
There is a limitation with the rscode library (and with any Reed-Solomon codec): it's limited to 256 bits. Since MAX_PACKETLEN is 1300, this means that we will have to compute the ecc symbols in chunks of 256-nb_of_ecc_symbols bits.
So now I think we should add a new function MSG_WriteDataWithECC
and MSG_ReadDataWithECC
which would write or read chunks of 28 bits data and then append 4 ecc symbols. This would implement the CD-ROM correction scheme (the first stage at least).
from ioq3.
See PR #266 for the rest of the discussion and a proof of concept implementation. This should work, but is untested, as I'm sure I'm missing a few nitty gritty details about networking requirements here and there. If you know ioq3 networking and are interested, please help! :D
from ioq3.
Related Issues (20)
- Changes to OpenGL2 Renderer's ComputeShaderColors Function Broke My Particles HOT 2
- CRT filters and warping options.
- OpenGL2: r_mergeLightmaps 1 breaks shaders using internal and external lightmaps
- options shows wrong resolution for custom resolution HOT 2
- OpenGL2: Dlight behavior close to surface HOT 1
- Unknown blend mode 'gl_src_color' leads to black menu screen with the PadMod HOT 3
- opengl1: Add software gamma ramps / overbright
- OpenGL2: Lightmap as an environment map renders incorrect with r_mergeLightmaps 1 HOT 1
- OpenGL2: r_ext_multisample > 0 breaks r_drawSunRays 1 (without HDR or FB-MSAA) HOT 1
- OpenGL2: Flares in mirrors calculate wrong depth and have wrong visibility
- Failing to open x64 game in a path with special characters HOT 3
- OpenGL2: The game is too bright and auto-exposure doesn't match the original
- OpenGL2: Curved surfaces don't use dynamic level of detail
- OpenGL2: Stencil shadow volumes are broken (cg_shadows 2) HOT 1
- OpenGL2: r_shownormals 1 is not implemented
- [Warning] Area 51 (2005) HOT 1
- rendering improvements feedback
- OpenGL2: r_greyscale doesn't affect everything
- OpenGL2: r_anaglyphMode causes 2D and HUD models to be transparent
- opengl1: Skybox in OpenGL 1.1 displays black lines at edges
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ioq3.