Questions regarding Retro features
Re: Questions regarding Retro features
Note -- orientation errors of 6 degrees were present in Rebirth 0.58.1 with long packets. In Rebirth 0.55, the largest observed orientation error was 0.6 degrees and the typical was 0.4. At the time, I did not know the cause -- sniper packets was a way to fix the problem without finding it.
I believe I found the problem in the Retro 1.3 work, and removed it. Ship orientation in a PDATA packet was undergoing a lossy transform to save space.
I do not know what the code relationship between Rebirth and XL is, but I would not have expected something introduced between Rebirth 0.55 and 0.57 to have affected your codebase at all. So it is possible XL performance is at the 0.6 degree error level, not the 6 degree error level.
0.6 degrees is on the threshold of affecting the game, but really pretty tolerable. You have to be 25 cubes away for that to turn a dead-on hit into a miss. Had Rebirth 0.58 had this degree of performance, sniper packets probably would never have been written. Still, by the time I found and corrected the problem, it HAD been written, and zero is still less than 0.6.
I believe I found the problem in the Retro 1.3 work, and removed it. Ship orientation in a PDATA packet was undergoing a lossy transform to save space.
I do not know what the code relationship between Rebirth and XL is, but I would not have expected something introduced between Rebirth 0.55 and 0.57 to have affected your codebase at all. So it is possible XL performance is at the 0.6 degree error level, not the 6 degree error level.
0.6 degrees is on the threshold of affecting the game, but really pretty tolerable. You have to be 25 cubes away for that to turn a dead-on hit into a miss. Had Rebirth 0.58 had this degree of performance, sniper packets probably would never have been written. Still, by the time I found and corrected the problem, it HAD been written, and zero is still less than 0.6.
-
Drakona
- Site Admin
- Posts: 1494
- Joined: Fri Aug 30, 2013 5:35 pm
D2X-XL has no connection at all with DXX (actually, it had started at least a year earlier).
You are right: The collision math fix is irrelevant performane wise. But it's more elegant, and why compute some information you already have? If you have understood the math it's also not obscure.
XL always uses long (precise) position packets in its (proprietary) UDP/IP protocol based games. Do you see any accuracy losses involved with those? Btw. proprietary mostly means that it sends additional data packets with XL specific information.
I wasn't aware of the shots being sent in MDATA packets and need to check that. XL hasn't really changed the original data packets, just expanded some and introduced additional ones.
You are right: The collision math fix is irrelevant performane wise. But it's more elegant, and why compute some information you already have? If you have understood the math it's also not obscure.
XL always uses long (precise) position packets in its (proprietary) UDP/IP protocol based games. Do you see any accuracy losses involved with those? Btw. proprietary mostly means that it sends additional data packets with XL specific information.
I wasn't aware of the shots being sent in MDATA packets and need to check that. XL hasn't really changed the original data packets, just expanded some and introduced additional ones.
-
karx11erx
- Posts: 22
- Joined: Tue Jul 08, 2014 7:24 am
XL only has PDATA and naked pdata packets. The latter have no player position and heading info and are used for stuff not depending on it (wall, door and trigger states). There are no mdata packets. PDATA packets are there since d2x-0.2.6, so I guess they are from the original D2 code.
D2X-XL always sends the unprocessed position info in fixint format to the other clients, bit for bit. That's 62 bytes: 12 for the position and velocity each, 36 for the orientation matrix, and 2 for the segment (cube) number. That's also as d2x-0.2.6 did it afaik.
FYI: D2x-0.2.6 is that D2 version from icculus.org that was first using opengl to make D2 work on modern computers. I am actually asking myself whether you are trying to solve problems the Rebirth project has introduced. That is because afaik D2X-Rebirth is based on d2x-0.2.6, too.
Edit:
I just checked the d2x-0.2.6 source code. It doesn't have any MDATA packets, only PDATA and NAKED_PDATA like D2X-XL.
Except for the vector - sphere - intersection issue, I am more and more under the impression that you are trying to fix bugs here that only have been introduced by the Rebirth project. So true to Descent. Go figure.
D2X-XL always sends the unprocessed position info in fixint format to the other clients, bit for bit. That's 62 bytes: 12 for the position and velocity each, 36 for the orientation matrix, and 2 for the segment (cube) number. That's also as d2x-0.2.6 did it afaik.
FYI: D2x-0.2.6 is that D2 version from icculus.org that was first using opengl to make D2 work on modern computers. I am actually asking myself whether you are trying to solve problems the Rebirth project has introduced. That is because afaik D2X-Rebirth is based on d2x-0.2.6, too.
Edit:
I just checked the d2x-0.2.6 source code. It doesn't have any MDATA packets, only PDATA and NAKED_PDATA like D2X-XL.
Except for the vector - sphere - intersection issue, I am more and more under the impression that you are trying to fix bugs here that only have been introduced by the Rebirth project. So true to Descent. Go figure.
-
karx11erx
- Posts: 22
- Joined: Tue Jul 08, 2014 7:24 am
Oh, I see. A lot of the stuff in net_udp.c is from the original network.c file -- D1 original stuff. They switched out the protocol, but the packets themselves mostly haven't changed. That makes more sense. Taking it apart, it was clearly the work of a Real Programmer (http://www.catb.org/jargon/html/R/Real-Programmer.html), and I didn't know any who'd worked on Descent since the source code release. Well, except maybe you.
. . . and looking at the old file now . . . you're RIGHT! Shots used to come in PDATA packets with the full position and orientation attached! ROFL. Hahahahaha.
That means sniper packets are essentially ORIGINAL D1.
ROFL. Hahahahahahahaha!
In fact . . . a LOT of the little netcode fixes I made in 1.3 are essentially reverting things to their original state. I thought I was making improvements, but I was actually undoing Rebirth damage. I wound up unknowingly making the same decisions as the original D1 coders, for the same reasons.
Sheesh.
Excuse me, I need to go die laughing now.
. . . and looking at the old file now . . . you're RIGHT! Shots used to come in PDATA packets with the full position and orientation attached! ROFL. Hahahahaha.
That means sniper packets are essentially ORIGINAL D1.
ROFL. Hahahahahahahaha!
In fact . . . a LOT of the little netcode fixes I made in 1.3 are essentially reverting things to their original state. I thought I was making improvements, but I was actually undoing Rebirth damage. I wound up unknowingly making the same decisions as the original D1 coders, for the same reasons.
Sheesh.
Excuse me, I need to go die laughing now.
-
Drakona
- Site Admin
- Posts: 1494
- Joined: Fri Aug 30, 2013 5:35 pm
Interpreting my comment as prompting you to start hating Rebirth seems a bit far fetched to me, or why would you reply that way? I simply pointed out a fact; One that had actually surprised me when first understanding it, since Rebirth had always been recommended for working so well.
The ironic point of both your findings and the features you are adding is that D2X-XL was always said to be less stable, less "true to Descent" and less suitable for multiplayer matches than Rebirth, and you are actually proving that Rebirth is lacking in exactly these areas while D2X-XL is not. I will probably not convince anybody here of D2X-XL, but I find that rather satisfying.
I certainly have a different perspective on Rebirth than you do, but I'll keep that to myself. I have made myself sufficiently clear about that in the past.
What puzzles me a bit is that you only came back to playing Descent of Rebirth, as if it had been the only Descent mod available. I remember you from the Descentbb: You and Lothar are (or have been) a couple, and I think you might remember me and D2X-XL quite well from my time in that place.
Anyway, I have mainly come here to learn about those bugs you were said to have fixed, and your find of the vector - sphere intersection bug was a very good one and worth my investigation. Plus, it was a pleasure to talk with someone who had an understanding of coding and math.
The ironic point of both your findings and the features you are adding is that D2X-XL was always said to be less stable, less "true to Descent" and less suitable for multiplayer matches than Rebirth, and you are actually proving that Rebirth is lacking in exactly these areas while D2X-XL is not. I will probably not convince anybody here of D2X-XL, but I find that rather satisfying.
I certainly have a different perspective on Rebirth than you do, but I'll keep that to myself. I have made myself sufficiently clear about that in the past.
What puzzles me a bit is that you only came back to playing Descent of Rebirth, as if it had been the only Descent mod available. I remember you from the Descentbb: You and Lothar are (or have been) a couple, and I think you might remember me and D2X-XL quite well from my time in that place.
Anyway, I have mainly come here to learn about those bugs you were said to have fixed, and your find of the vector - sphere intersection bug was a very good one and worth my investigation. Plus, it was a pleasure to talk with someone who had an understanding of coding and math.
-
karx11erx
- Posts: 22
- Joined: Tue Jul 08, 2014 7:24 am