- Home /
Anti-Hacking
I am making a game where I want items to be bought in an online store and added to account. I do not want my players to be able to hack my game and give themselves free items all in the client. (I think this is how hacking works and if I am wrong please let me know!)
Some ideas I thought about:
Making a html page and have it hosted on a website and have my game steal the text from the webpage and convert it into items
PROS: I already know where to get started on programming this.
CONS: If I want to make a new account I need to manually update the website, this is a major con and I do not know how to go around this one.
Make my collection scene become a server and host the server on my computer.
PROS: I dont think that this can be hacked.
CONS: I would have to redo my collection scene(not a really big deal) and I would have to have the server run on my computer until I make enough money to buy a dedicated server. Also I think I need a server for each player's collection open on my computer and that can become really cumbersome for my internet and computer.
Make a command prompt with account name's and items run as a server on my computer to reduce lag on my computer and the server. It would only hold strings of the player names and items.
PROS: reduce lag compared to idea number 2.
CONS: server running on my computer and I have no idea where to start with this idea. I dont want to have to do port forwarding for the players to connect to the command prompt when it sends data. I dont want logmeinhamachi required for the players.
I just thought about maybe having a file on the computer and have it encrypted? How would I cipher and decipher it? Also wont players be able to hack the client and find out how to decipher the text?
I know Blizzard's Hearthstone game does something like this but I dont know how they do it.
I do not know how to go about this and any help is greatly appreciated!
the problem with an html page is that the users have full access to the source code. I agree with buying server space but you could always start you server at home for test purposes. and buy server space later if your game ends up with reasonable traffic. Setting up a static IP address and forwarding a port for a server at home can be done with almost any router and is pry more simple than you think if you look up a you tube turorial you can do it in a couple hours. I personally use node.js which is popular and free for setting up a server. once you install it you can recieve and send responces with under a dozen lines of code and you write in javascript.
i've done some basic encryption. and there is much you can do with them to answer your needs. if you didn't want users sharing your downloads or looking them up on the internet you could always have the server send back something encrypted according to there username or device ID. or maybe just a small unlock file that would only work with his name or machine.
i can give you a basic encription I wrote that does like what i'm talking about if you want it let me know and i will convert to answer and post it.
Answer by kscarlett · Jun 11, 2017 at 08:14 PM
You'll want to store the player's accounts and the items they have in a database (like MySQL) and use something like PHP to interact with the database from your game. This will need to be hosted, and I'd really recommend not hosting it on your computer, but on a very cheap VPS somewhere.
Sounds pretty good to me and I'll look into this more, Thanks!
Answer by patmaherjfm · Jun 11, 2017 at 08:14 PM
i have done some php and mysql programming, i haven't done much app development yet. however, my approach would be to create a php ( or something similar ) web store php would store accounts and items in a mysql database. your app, would connect to the same mysql database to confirm login details, and then collect the items the user has.
this is the short version, and will get more complicated dependent on how many uses are accessing it.
It could be that this approach is not the way to go, :)
Also, take a look at vmware, i have installed linux, with a php/mysql webserver for testing, on a virtual machine, this is technically a VPS ( Virtual Private Server).
better still, you can download a preinstalled server, and run it in vmware.
https://solutionexchange.vmware.com/store/products/turnkey-lamp-appliance
Your answer
Follow this Question
Related Questions
Protection from Reverse Engineering/Hacking 1 Answer
Protection from hacking "In app purchase" on Android/iOS 3 Answers
Best way to handle server side inventory management? 0 Answers
Unity networking tutorial? 6 Answers
Optimizing Headless Servers 2 Answers