hi,I am working on a "massive single player online game", whatever that means :). This will actually be a card game with 3d animations that you will play by yourself. The game will require an internet connection to play, as it will have a tightly integrated social system to drive engagement.
I'd also like to have the server be authoritative for some basic stuff - since it's a single player game, I can't really be authoritative for much, since the game has no verifiable rules - the game allows players to just play cards and watch the animations with some local interactions/random effects. But at least I can do some basic sanity checks, such as "does this user have this card, and did they actually pay for it", "have they played this card already in this game", "have they played a card within the right time limit, as in has it been at least X seconds", etc...
Just to clarify - the game doesn't actually have server-verifiable "rules" per se, it's not like Solitaire where I could simulate the game being played on the backend. The game just allows players to play cards and watch the animations on the screen. The "rules" are arbitrary and defined by the person playing the game, so there's nothing to verify in that regard.
Since the game is single player and there are no server verifiable rules in the game I know that this will be easy to hack since a malicious and smart player could eventually build a proxy to respond to the calls on behalf of my game server and allow players to download pirated versions of the app in an app store with all of the IAP assets already in the build.
I have an idea that I wanted to run past you guys about adding an additional layer on top of the basic sanity checks to protect the assets from being pirated. Basically - the game client will come bare bones and you won't be given any cards up front except for the "gifts" you receive as a new player. This means the graphics & animations won't be on the device until the moment you open that card in a pack you purchased. The server keeps track of what cards the player opened in the packs.
Here's the trick now: the animation files themselves will be encrypted and the client won't be given the key. Then, when the game client goes to "play mode", he calls out to the server and says "I'm about to play a game using these 10 cards" - the server verifies he purchased those cards and then sends him the 10 seperate keys for those animation files. The game client would load the animations from disk, decrypt the files, and then throw away the key and never persist the decrypted animation files.
In essense, the only way a malicious person could now obtain assets they don't own is some person would have to first attach a debugger to a mobile game client, find the keys in memory in the exact moment it's sent from the server, and then build a server proxy which would respond with those keys to anyone who downloads the pirated game. OR, they'd have to dump the decrypted animation files to disk - and then make the game logic jump over the decryption sequence (I'm not sure how hard that is to do).
This feels sufficient enough for me that it would be a big enough barrier to prevent hacking at least to some reasonable extent. In addition, I could cycle the animation files + keys on a monthly basis if I really wanted to.
Any thoughts on this? Is this just absolutely insane? Is there a better way? Is this just a waste of my time and I'm missing something obvious? I know that credit card processing companies have used similar methods (perhaps outdated) to store credit card numbers.
I''ll still need to prove the concept by making sure this isn't too memory /CPU intensive on a mobile device (e.g. iPhone + Android).
Thanks for any feedback!
↧