Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Jorge.Reto · Jul 03, 2015 at 01:54 PM · webplayerplayerprefsdatetimecheat

playerprefs save date cheat problem

Hi,

I am developing a game for webplayer and I want to add a bonus based on how long the user was offline. To do that, I am saving the date on playerprefs all the time and comparing with the current date. If the difference is bigger than a certain threshold (for example 5secs) I calculate the bonus to offer.

The problem is, if the user changes the computer date he can easily cheat the game! is there a simple way to prevent this?

I could use a webservice to get the correct utc date but if the player lost his web connection the game progress will be lost :S

Even if there isn't a perfect solution how would you deal with this problem?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cherno · Jul 03, 2015 at 02:15 PM 0
Share

If it's an online game, why not just pull the current time from webservice that provides it? I bet there are even countless html copy&paste scripts that are meant to show the time and data on a web page, but you might as well use them for your game to get the time.

avatar image Jorge.Reto · Jul 03, 2015 at 06:46 PM 0
Share

The game I'm developing is not using any webservices at all and doesn't need web connection to play! Imagine for example the user hibernates the computer and turns on again, he may not have his internet connection ready to ask a webservice for the real time! what should I do in this situation? I want the players to keep playing even if they dont have internet connection! just trying to protect against cheating by changing computer time ;)

avatar image Cherno · Jul 03, 2015 at 07:53 PM 0
Share

But, why is it a webplayer game then?

avatar image Jorge.Reto · Jul 03, 2015 at 11:48 PM 0
Share

webplayer because I want it to run on browsers that's all

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by FortisVenaliter · Jul 03, 2015 at 09:30 PM

If it's not an online game, I would try to check a web service anyway. If the web service fails, then fall back to using the local clock.

Unfortunately, this goes back to DRM practices... always online to (try to) stay secure, or allow offline and the possibility of EULA breakage.

But... my point rests on one premise: If the user goes through the trouble of disconnecting from the internet and changing their system clock to cheat an offline game, is that really such a big problem? I look at it like this: If it's not devaluing other players' copies of the game, then the user is entitled to play the game they bought however they want, including cheating. Not everyone agrees with that sentiment, but it can certainly earn you a few points in some players' minds.

So, really, the question comes down to this: Does allowing this cheat devalue the game? For offline games, that answer is no, so the following question is: Do you want your users to play the game how you want them to play, or do you want them to be able to make their own experiences if they really want to?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jorge.Reto · Jul 03, 2015 at 11:50 PM 0
Share

thanks that helped me alot deciding what I'm going to do ;)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Timer that can count Hour difference between two DateTime for android 1 Answer

Copy/Paste from WebPlayer or save as cookie 1 Answer

Formatting Exception when using DateTime for PlayerPrefs 1 Answer

How many variables can I store using PlayerPrefs 1 Answer

PlayerPrefs - Error in webplayer 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges