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 dissidently · Mar 17, 2011 at 07:36 AM · iostouchtimereactionprecise

reaction game: measure time of touch exactly?

Imagine a simple reaction game. on iOS touch device.

I set a texture to change color signifying it's time for the player to respond.

How do I exactly measure the time of the touch from the time of the display of the "go touch the screen" signal regardless of the frame rate of the app?

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

1 Reply

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

Answer by Jessy · Mar 17, 2011 at 01:34 PM

You can only get input in a frame. There is no exact timing(*); the lower your framerate, the less accurate timing is. If you're not taking pausing into considering, you can just store the Time.time when you like, and then subtract than from a later Time.time to get the delta. If pausing is coming into play, then you probably just want to add Time.deltaTime, every frame, to a variable that starts at zero.

(*) FixedUpdate is an option, but it should only be used when your input is directly related to physics. If you put too much in FixedUpdate, or make fixedDeltaTime too low, then the concept of FixedUpdate will become meaningless because there won't be enough horsepower to keep the higher framerate up for anything.

Just make sure your framerate is good. People don't sense time very meaningfully at the 30-60 fps level.

Comment
Add comment · Show 4 · 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 dissidently · Mar 18, 2011 at 06:08 AM 0
Share

so to within a 60th of a second is the most accurate a "reaction test" game could be using Unity and iOS?

avatar image Jessy · Mar 18, 2011 at 06:37 AM 0
Share

No, you can run it faster, but the screen tops out at 60 fps. Do you really, seriously think that greater precision is going to help your game? 16.7 ms is less than you're going to find almost every musician/producer using, for audio buffer delay. You can't even hear that difference as a separate sound; it just makes a comb filter. http://en.wikipedia.org/wiki/Flanger

avatar image dissidently · Mar 18, 2011 at 07:15 AM 0
Share

it's important for the scoring system that it be be as responsive as possible in my game concept. however, imagine a reaction tester. $$anonymous$$ost folks are between .25 and .4 seconds. 1/60th of sec accuracy means only 9 variations in ti$$anonymous$$g possible in that swamped range.

And when folks start getting good, bringing it down to .2 to .25 there's only 3 different ti$$anonymous$$gs. ... and from what you're saying, the whole game must be sped up to get better/more accurate ti$$anonymous$$gs? $$anonymous$$eaning animations, sounds etc must be $$anonymous$$imized to get the performance?

avatar image Fattie · Jan 23, 2016 at 05:09 PM 0
Share

Just for anyone reading this, "so to within a 60th of a second is the most accurate a "reaction test" game could be using Unity and iOS?" It's totally inconceivable, on a touch screen device, to have any app at all that has input where time frames smaller than that are relevant.

Just TBC in games that "display" a very accurate, like two decimals, "reaction speed" - you simply randomly choose a value for the last digit or so. Every time you've ever played a game and you've seen that, that's what you're seeing.

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

1 Person is following this question.

avatar image

Related Questions

Multi touch not working on iOS (does work on Android) 1 Answer

Detecting Multiple Touches on same frame IOS 2 Answers

Sometimes, a touch can not be determined 0 Answers

Small question about converting from Android to iOS 1 Answer

Delta touch trembling 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