Page 1 of 1

gameID sometimes ZERO when it should be always unique

Posted: 04 Sep 2008, 21:29
by TradeMark
gameID gives me string like "00000000000000000000000000000000" sometimes. (when should be random, like: c5075e482b42fdcc8a31c0f7b84cfe33)

I was hoping i could check unique replays easily by this value in the replaysite im doing, but its not possible since there is this flaw (so i need to generate own unique IDs then).

Oh and seems like those games are shorter than games with correct gameID value.

And i noticed winningAllyTeam is -1 always when gameID is zero.

Is that winningAllyTeam thing fixed in next release anyways? its kinda weird how it sometimes gives -1 even when game was ended and some team won.

Re: gameID sometimes ZERO when it should be always unique

Posted: 04 Sep 2008, 21:32
by Tobi
Do these two phenomenons *always* happen at the same time?

Re: gameID sometimes ZERO when it should be always unique

Posted: 04 Sep 2008, 21:42
by TradeMark
Now I scanned through my ~1200 replays, here the new data:
when gameid is zero, winningAllyTeam = -1 (80%) or 0 (20%)

Also when winningAllyTeam is zero (and gameid is zero), the filesize is really small: 1028-1542 bytes. And when its -1 filesize is 1185-89200 bytes.

Edit: seems like all those games with gameid = zero havent even started at all.

Edit 2: yeah that must be it.

Maybe put winningAllyTeam into -2 when game wasnt started at all? then its easy to filter games which are rubbish.

Re: gameID sometimes ZERO when it should be always unique

Posted: 05 Sep 2008, 18:18
by TradeMark
can anyone verificate what makes this zero gameID ? so i can continue programming knowing what im doing...

Re: gameID sometimes ZERO when it should be always unique

Posted: 05 Sep 2008, 19:25
by Kloot
The game ID is not generated or sent until the game actually
starts, if a player exits before everybody has readied up then
it won't be initialized (ie. remain 0) for that player's demo and
winningAllyTeam will be -1. Both cases are expected behavior.