BuzzerBeater Forums

Bugs, bugs, bugs > Put at least some random in GE

Put at least some random in GE

Set priority
Show messages by
This Post:
00
263046.2 in reply to 263046.1
Date: 10/3/2014 12:05:29 PM
Neverwinter
CGBBL
Overall Posts Rated:
621621
That's weird, never seen anything like this before!

This Post:
00
263046.7 in reply to 263046.6
Date: 10/3/2014 7:10:10 PM
TrenseRI
III.2
Overall Posts Rated:
36003600
Second Team:
ChiLeaders
That's true, seems like a very easy thing to fix from a programmers point of view, right? Well, not in this case. As Charles once explained this to me, the cause of the problem does not lie in the code (we use server time to change the random seed) but in the language itself (C++) in this case. So, there's no easy fix, but hopefully we might stumble on a solution one day.

From: mplume

This Post:
11
263046.8 in reply to 263046.7
Date: 10/4/2014 3:58:19 AM
Overall Posts Rated:
5050
Maybe you use the server time to change the random seed but in my eyes those two games giving exactly the same results is the proof that the server time don't change the random seed at all.

I hope the are others variables who change the random seed. If not, that means that the random seed stay always the same in the game engine or in other words that there is no random seed at all in the game engine.

Last edited by mplume at 10/4/2014 4:00:15 AM

This Post:
00
263046.9 in reply to 263046.7
Date: 10/4/2014 1:29:26 PM
Overall Posts Rated:
32293229
That's true, seems like a very easy thing to fix from a programmers point of view, right? Well, not in this case. As Charles once explained this to me, the cause of the problem does not lie in the code (we use server time to change the random seed) but in the language itself (C++) in this case. So, there's no easy fix, but hopefully we might stumble on a solution one day.


Server time at the time the game is calculated? Depending on how much precision you're using, given that the games start calculating at the same time every game night for a given nation's games, that could lead to the same duplicate seeds. If it's c++ I'm not sure of the equivalent, but I'd probably use something like DateTime.Now.Ticks in C# to get a unique seed.

This Post:
11
263046.10 in reply to 263046.7
Date: 10/5/2014 1:17:02 PM
Kira Kira Koseki
II.3
Overall Posts Rated:
779779
Second Team:
Yubi Yubi
Personally I'm fine with the games being not-so-random like they are now. There's nothing more annoying for me in a manager game than to lose a game I should easily win, so it's nice that such things don't happen in this game; if you lose, there's almost always a good reason for it...

From: RSX

This Post:
00
263046.11 in reply to 263046.7
Date: 10/6/2014 3:09:02 PM
Overall Posts Rated:
181181
I'm having hard time believing this has anything to do with C++. If you didn't tell you are using random numbers, I would think you are calculating games just off the stuff like player attributes, tactics, lineup, arena, enthusiasm (that seems enough with exception like this, two same games and no training in between). In this case it must be either shitty programming or some really fancy algorithms.

This Post:
00
263046.12 in reply to 263046.9
Date: 10/7/2014 5:39:56 AM
TrenseRI
III.2
Overall Posts Rated:
36003600
Second Team:
ChiLeaders
Server time at the time the game is calculated? Depending on how much precision you're using, given that the games start calculating at the same time every game night for a given nation's games, that could lead to the same duplicate seeds. If it's c++ I'm not sure of the equivalent, but I'd probably use something like DateTime.Now.Ticks in C# to get a unique seed.
@GM-Hrudey: "The value returned generally represents the number of seconds since 00:00 hours, Jan 1, 1970 UTC (i.e., the current unix timestamp).", which is similar something like this 414086872.

Personally I'm fine with the games being not-so-random like they are now. There's nothing more annoying for me in a manager game than to lose a game I should easily win, so it's nice that such things don't happen in this game; if you lose, there's almost always a good reason for it...
@OTT9: There should be at least some variances between similar games though.

I'm having hard time believing this has anything to do with C++. If you didn't tell you are using random numbers, I would think you are calculating games just off the stuff like player attributes, tactics, lineup, arena, enthusiasm (that seems enough with exception like this, two same games and no training in between). In this case it must be either shitty programming or some really fancy algorithms.
@RSX: I'm not sure I understand exactly what you're trying to say, or whether I should feel complimented or offended Of course we use random numbers in many places in the code, that is certain.

Advertisement