Hook
More breakout videos from this creator.
Dude people keep cheating in our game just by changing the time. If they can do that, they're not gonna make any in-app purchases. How can we fix it? Exactly. I think we need to make everything run server side instead of on the device itself. Then we have total control. We don't have to trust the client for this kind of information. Okay, that'll work. But won't it make the game super slow, especially if people have bad internet connections? Okay, that's a good point. How about this? We'll calculate and store game state on the client side, like we're already doing. But we'll also do it on the server side, and we'll make sure that the server is the source of truth for this information. Then we can check in from the client to the server every 10 seconds or so. Looks good. Truth on the server. If anything's wrong on the client side, we'll just revert to the server state because we know this is always correct.