-
-
Notifications
You must be signed in to change notification settings - Fork 393
- < 8000 /li>
Combat screen, obstacles and their position on the battlefield should be recorded in the scenario save files #7146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How is this a bug? Currently it works this way: there is a random seed saved in the save file, and obstacle generation is based on this seed. But the implementation of random generator may be different depending on OS/compiler/etc, so there is a guarantee that you will get the same results (same obstacles on the battlefield in this case) on the same machine, but there is no guarantee that you'll get the same results on the different machine (although on another machine you will also get the same results on the same tile, but not necessarily the same as on the first machine). Why do you expect the same results in the first place? No one promises that. |
Hi, @oleg-derevenetz |
Yes, in OG you'll get the same obstacles on the same tile in different playthroughs. But is that a good thing? Currently you'll get the same obstacles on the same tile during the same playthrough (on the same machine), but during the next playthrough it would be different. I believe it's good and not bad at all, because it adds variety to the game. |
Sure! That's great to replay the map with a completely different battlefields. |
That's because random distributions (such as |
Hello @oleg-derevenetz and @Branikolog,
Is this type of functioning used elsewhere in fheroes2? For example, for the progression of the primary and secondary skills of the hero, for the spells of the mage guilds and shrines, for the number of creatures of the wandering creatures, etc., etc., etc.? In the original game, everything that has to be done randomly is done at the beginning of the scenario, then everything is fixed, randomness doesn't come into play anymore. With Heroes 2, tournaments were organized with a save file from the beginning of the game as a starting point, so that all the participants had exactly and strictly the same game conditions. So currently, if I understand correctly, the player can start a scenario on a desktop PC, make a save, load that save on his portable PC and have something different than if he had played the scenario only on his desktop PC. So extrapolating, he wins on his desktop PC and he loses on his portable PC because he got different conditions from the same save file. Taking another example, we can say that depending on whether we load the same file to generate the employees' pay on different computers, the salaries will not be the same. Fheroes2 being a remake of Heroes 2, it is important that everything that is random is determined at the beginning of the scenario and is not subject to change afterwards. |
No, that's not how it works in the original game. Original game is using seeds as well, but they just use some "home-grown" pseudo-random generator implementation that generates the same sequence of pseudo-random numbers from the same initial seed everywhere, regardless of the specific OS, machine, etc. fheroes2 uses pseudo-random generator from C++ standard library, which may produce different sequences on different machines, because its implementation (or rather, the random distributions used by it) is not required to be platform-agnostic by any of existing C++ standards.
Yes, that pseudo-random generator from
These employees should not use the random generator then :) |
Hello @oleg-derevenetz,
That was my point.
Oops...
This was to emphasize the fact that the user expects the same result from the same save file no matter where it is used. |
Preliminary checks
Platform
Windows
Describe the bug
At the start of the scenario, all obstacles and their position on the battlefield should be determined for all squares where a fight can take place.
This should also be recorded in the scenario save files.
Here a screenshot from a saved scenario where the configuration of the obstacles is different.
Note: This scenario comes from another player on a different configuration than the one on which it was loaded.
In fheroes2:
Screenshot from the scenario video:
Screenshot from the saved scenario:
Save file
Related issue (with save file Scared Golems.zip): #7141.
Additional info
Scénario loaded in version 1.0.3 7084.
The text was updated successfully, but these errors were encountered: