Anonymous | Login | 2024-11-23 08:23 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0002583 | VCMI | Multiplayer | public | 2016-10-30 22:30 | 2024-11-14 21:58 | ||||
Reporter | SXX | ||||||||
Assigned To | Ivan | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 0.98g | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0002583: Multiplayer: RNG distribution is not consistent between compilers / platforms | ||||||||
Description | Today we tested some MP with dydzio and one thing we find out is that map init could desync even if seed perfectly match. We use "mt19937" and it's do it's just very well. While I did very little research it's looks like std distribution functions don't have deterministic results across platforms and compilers. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Notes | |
(0006984) Dydzio (developer) 2017-03-15 21:30 |
http://stackoverflow.com/questions/34903356/c11-random-number-distributions-are-not-consistent-across-platforms-what-al [^] Seems we need to write custom consistent distribution (best way imo) or use boost or equivalent like http://www.pcg-random.org/ [^] for random number generation. |
(0006985) Warmonger (administrator) 2017-03-16 17:28 |
Where exatly do we use random distributions? I don't remember any case, so probably it's not that important part after all. |
(0006987) Dydzio (developer) 2017-03-17 09:43 |
@Warmonger Check lib/CRandomGenerator.cpp -> CRandomGenerator::getIntRange for example. There are some typedefs used, defined at the top of lib/CRandomGenerator.h |
(0006995) SXX (administrator) 2017-03-19 02:48 |
Keep in mind that integers are not problem there, but float are. |
(0008987) Ivan (developer) 2024-11-14 21:58 |
No longer relevant - RMG is server-only now |
Issue History | |||
Date Modified | Username | Field | Change |
2016-10-30 22:30 | SXX | New Issue | |
2017-03-15 21:30 | Dydzio | Note Added: 0006984 | |
2017-03-16 17:28 | Warmonger | Note Added: 0006985 | |
2017-03-17 09:43 | Dydzio | Note Added: 0006987 | |
2017-03-19 02:48 | SXX | Note Added: 0006995 | |
2017-05-22 22:02 | SXX | File Added: 10M.zip | |
2017-05-22 22:08 | SXX | File Added: 20M.zip | |
2017-05-22 22:08 | SXX | File Deleted: 20M.zip | |
2017-05-22 22:08 | SXX | File Deleted: 10M.zip | |
2024-11-14 21:58 | Ivan | Note Added: 0008987 | |
2024-11-14 21:58 | Ivan | Status | new => closed |
2024-11-14 21:58 | Ivan | Assigned To | => Ivan |
2024-11-14 21:58 | Ivan | Resolution | open => fixed |
Copyright © 2000 - 2024 MantisBT Team |