Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 pigaroos · Sep 17, 2019 at 09:33 PM · timemanipulationprevention

How to not let player fiddle with time to get rewards faster?

Hello everyone, today I was looking for a way to implement timed rewards, and found there are two ways: one that is really easy to manipulate (just change the device time) and another that relies on a server to fetch the actual time, which is way better. The catch is, it needs an internet connection or it won't work. How do I prevent the player from manipulating the rewards, in a way that is more secure, or maybe that doesn't require an internet connection? Any input is appreciated.

Comment
Add comment · Show 8
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 WarmedxMints · Sep 18, 2019 at 04:25 AM 1
Share

Other than using a server, maybe make changing the time pointless by saving the date & time when they last played and if the date/time is less than the previous playthrough, award them with negative rewards, punish them or display a popup stating that the save is in the future and they have to wait until realtime catches up. That way, if they move their clock forward, what they get is undone when they move it back.

avatar image pigaroos WarmedxMints · Sep 18, 2019 at 04:46 PM 0
Share

I like that idea! But what if they move the clock forward to get the reward earlier ins$$anonymous$$d of moving the clock backwards?

avatar image WarmedxMints pigaroos · Sep 18, 2019 at 04:56 PM 0
Share

It wouldn't matter if you put them in time out and they cannot continue until they get to the realtime they would have got the reward anyway.

Show more comments
avatar image Zaeran · Sep 20, 2019 at 04:21 PM 0
Share

Is this a PC-based game or a mobile one?

avatar image pigaroos Zaeran · Sep 20, 2019 at 11:49 PM 0
Share

This is a mobile-based game

2 Replies

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

Answer by Kishotta · Oct 02, 2019 at 04:44 PM

Always, always, always assume that the client is either wrong, faulty, or malicious.

If these rewards are used in a multiplayer game (and therefor an internet connection is expected), use only the server time. If my device thinks it is 300 years in the future or past, it shouldn't be any business of the server. Just record my login times as they exist on the server.

If these rewards are used in a singleplayer game (and therefor no internet connection is expected), then who cares? The player is spoiling his own fun, and nobody else's.

Personally, in 2019, I think it is reasonable to assume that any player that was able to download your game from an app store also has the ability to be online while playing in order to take advantage of timed rewards, leaderboards, etc.

If you really don't want to go this route and you want to make it more difficult for your players to modify their gamestate manually, you should at least obfuscate your save formats so that system time modifications are the easiest way to "game" your game.

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 pigaroos · Oct 06, 2019 at 11:26 AM 0
Share

Thank you, @$$anonymous$$ishotta . I agree with everything you said.

avatar image
-1

Answer by OlivierHoel · Oct 02, 2019 at 04:53 AM

What about a basic Timer class containing a simple unsigned int, and accumulating Time.deltaTime each frame?

Comment
Add comment · 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

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

115 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiply deltaTime to arrive at point2 in 1.5 sec ? 1 Answer

javascript System time and date? 3 Answers

Camera following Bullet 1 Answer

reloadtime 1 Answer

Collision Detection Issues 0 Answers


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