albertz / openlierox

OpenLieroX - Liero clone / Worms realtime / 2D shooter
http://openlierox.net
Other
262 stars 59 forks source link

Randomized numbers in projectiles should be like in LX56 #264

Open albertz opened 13 years ago

albertz commented 13 years ago

Converted from SourceForge issue 2795663, submitted by albertzeyer

Pelya said once in mailinglist that he thinks that the way we are getting random numbers for projectiles have changed after my cleanup. It's important that it stays equal to have the same behaviour everywhere and I also tried hard to keep the behaviour; but seems that Pelya has figured out cases where it is different now.

Pelya, can you please say more exactly in which cases it is different now? Please nail it down to the revision where it has changed.

Or why do you think that it is different now?

albertz commented 13 years ago

Submitted by pelya

So I've did some test.

Beta1 compared to LX56, with 15 FPS, has way different physics - projectiles slice through the dirt, and explode inside, making it look like cheese. Don't know about random numbers. Tested by shooting SS into the dirt. Beta2 compared to LX56 looks more close, but still has different physics.

Beta8 compared to Beta2 has different physics, and different random numbers. Tested by shooting Uzi and SS from MatrixMod, and watching how it spreads. Beta8 compared to Beta3 still has different random numbers. Beta2 compared to Beta3 has different random numbers, but more-or-less same physics.

Then I've got suspicious, and tested Beta9 with Beta9, and Beta8 with Beta8, and Beta5 with Beta5 in the same way, with SS from StarWars mod. Only first SS shot had the same bullet pattern, every other shot was different in different OLX windows. So the whole random-number thingie gives nothing for syncing projectiles, and can be removed I think, or replaced with something better.

albertz commented 13 years ago

Submitted by albertzeyer

Beta1 should be equal to LX56. There haven't been any code changes in physics (between Beta1 and LX56) as far as I know. Have you tried both with 15 FPS or just Beta1? Anyway, with such low FPS, a lot of other factors could make it feel different. It's not really compareable (and also not really interesting to be compared at all). Use 84 FPS (or at least something high enough for fluent gameplay).

The way we have used the random numbers (for projectile spawning) has never changed AFAIK (I mean the code). Please compare the code from Beta8 to Beta1 (CClient::ProcessShoot I think).

As far as I understand the code, the randomize behaviour should be equal everywhere. Could you perhaps debug the code a bit (only for Beta9) to see why it is not synchronised?

Anyway, this bug report itself is about the randomize behaviour between Beta9 and LX56. Is it really noteable different (or not more different than between two Beta9s or two LX56s)? If not, I guess this bug becomes less important.

albertz commented 13 years ago

Submitted by pelya

I cannot run LX56 faster than 30 FPS in virtual machine. Both Beta1 and LX56 FPS were set to 15.

As for me I don't notice any difference between randomness of SuperShotgun shot pattern when playing Beta9-to-Beta9 or Beta9 to anything else - in both cases they are different on different OLX screens.

albertz commented 13 years ago

Submitted by albertzeyer

Ok, then we kind of had this bug since LX56. :P