Hi folks,
I am going to build a strategy game and in need of suggestions:
1.If I use a timer to count time when building a construction, should I rely on system time (will be affected when user change their phone clock)?
2.About data, now I can work with JSON and text file to save and load data, is it better if I use SQLite? How about performance if I continue read/write on text file?
I intend to make an offline game (play vs AI) for normal user only. In case user find a way to hack or cheat building time or gold, any suggest to optimize and secure this?
I wanna sell gold as IAP but if it's easy to hack, we should consider artifact/special item as IAP
Sorry, I am so noobie so I ask too much. Thank you
Comments
Depending on the data and the number of accesses and where the data resides, locally or on the server. However JSON can be converted to a Lua table easily and accessed, but you need to still save the data somewhere.
If you make it an offline game, then you can manage it only as long as you run the app, because one can quit the app, change the time and then restart to fool the system that the time is up. You can also use a small component of your server to provide the time than the system clock which can be used to control the cheating up to a great extent.
If you would save the data in a database or as data files, it can be hacked to have things that have not even been purchased. However IAP if done well (i.e. checked everytime can help prevent hacking of the same up to a large extent)
The point to note is that if you want to make an offline game, then things like IAP, etc would require internet access and the moment you have that, it would make better sense to have online functionality right from the start and incorporate the points to note well in advance.
These are just some of my thoughts, there could be other thoughts and ideas.
Likes: thanhquan1512, hosamred
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
I still consider encrypting my data when user exit game. Can anyone share experience for secure IAP data?
Ultimate Games on Appstore
Ultimate Games on Google Play
Like:
1-
-Usually people will reverse back their time settings sooner or later. So always write the system time on some DB (Txt, sql vs..) while exiting game.
-While opening the game check this variable with the system time again. In normal cases
system time should be bigger than this time. (like If user is not travelling far far away to another country which has time difference )
-Warn the user with a warning like do'not cheat bla bla ....
2-You said you want to sell gold through your game. So whenever user presses that button you will already need internet connection while connecting ios or google api connect to some outsource time service and check system time from there.
Of course these are not perfect solutions and the only real preventation method seems like checking an outside timer.