There is another way, but it isn't accurate unless many people play you map/mod. Read each player's banks, get the largest int, add 1, and write it to all banks. This will essentially update everyone's bank with a number that is at least somewhat near the correct number. If you ever want to find out, jump in a game, and open the bank afterwards.
This does not work. Let's say we have four players. Player A and B play 5 games with eachother. Their bank ints raise to 5. Player C and D play 5 games with eachother. Their bank ints raise to 5 as well. Now all players play together. Everyone get's the int 6. This is wrong since the total amount of games played is 11.
I've actually considered a way to do this with banks before. The only way I could think of was to store a unique id for each game and count the amount of ids in the bank. When you play with someone who has an id that you don't have, you take it. However, this as well will only work if the game is somewhat popular and a lot of people play with eachother.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This does not work. Let's say we have four players. Player A and B play 5 games with eachother. Their bank ints raise to 5. Player C and D play 5 games with eachother. Their bank ints raise to 5 as well. Now all players play together. Everyone get's the int 6. This is wrong since the total amount of games played is 11.
I've actually considered a way to do this with banks before. The only way I could think of was to store a unique id for each game and count the amount of ids in the bank. When you play with someone who has an id that you don't have, you take it. However, this as well will only work if the game is somewhat popular and a lot of people play with eachother.