• 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 N1warhead · Oct 02, 2014 at 08:27 AM · fpsframes

Too much FPS, is there a cutoff limit?

Hey guys, I know this is a noobish question. But how come when I hit the 100 FPS (Frames Per Second) mark my game acts as if its as slow as 30 Frames a Second.

I'm assuming it works the same way as a movie, the more frames a second the more of a Slow Motion fluid like motion, which I understand.

But I've seen people player games with WAY more Frames Per Second and it just play as if it were at 60.

Is there a way to cap off the Frames Per Second? Such as still show the 100 FPS but work as if it was at 60. Because it confuses me sometimes thinking I have to much stuff on levels, etc.

Thanks guys.

Comment
Add comment · Show 1
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 NoseKills · Oct 02, 2014 at 05:17 PM 0
Share

What kind of code are we talking about here ? Do you use Time.deltaTime or the current framerate for some calculations in unusual ways?

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by RedDevil · Oct 02, 2014 at 09:25 AM

The amount of frames someone can feel depends on the monitors refresh rate. The refresh rate on 90% of the screens is 59-60 so even if you have 1.0000.0000 FPS you will still feel like it is running on 60 FPS.Now there are monitors that can go to 120 FPS(gaming monitors) and there you can feel the extra FPS.

Comment
Add comment · Show 6 · 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 N1warhead · Oct 02, 2014 at 09:40 AM 0
Share

Yeah I know, but thats where this is getting confusing. When it runs at 60 fps it seems fine. I disable Vsync it goes to like 900, all fine and dandy, it runs fine as if I were running at 60 FPS. But when Vsync enabled, when I hit 90-100 range and beyond when i get it, it seems as if its running in slow motion. Like something that would take me 3 seconds to do will take 6 seconds. But that's only when I am getting a good high FPS. when it ranges from 0 to 89 it runs fine.

avatar image RedDevil · Oct 02, 2014 at 11:51 AM 0
Share

if you put VSync to enabled it should not go beyond 60. VSync or Vertical Sync syncs the game with the refresh rate so maybe you have more then 60.

avatar image Xitech_ · Oct 02, 2014 at 12:34 PM 0
Share

There is no need to lock the frame rate on PC games. If there is something I hate its V-sync.

If your movement goes faster because of more frame rates then you're not using Time.deltatime

avatar image PacByte · Oct 02, 2014 at 12:47 PM 0
Share

Could you tell me your computer specifications?

avatar image NoseKills · Oct 02, 2014 at 04:02 PM 0
Share

I was gonna say the same @levoTNTO , but he says it rons slower when FPS is higher

Show more comments
avatar image
1

Answer by Unitraxx · Oct 02, 2014 at 05:22 PM

If this solely happens with the game you developed then you likely misused the update functions. Look into Time.deltatime and FixedUpdate to make actions/movements framerate independent.

Comment
Add comment · Show 2 · 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 N1warhead · Oct 02, 2014 at 08:19 PM 0
Share

Thanks for all the help guys, I'll look more into the problems...

Pacbyte - I have a Sony Vaio Icore 3 2.4 Ghz Proces with 4 gigs of ram, and apparently close to 2 gig graphics card (1699 megs) of Ram on it.

Levo - here is my walking forward code, I would use AddForce, but I haven't figured out how to make it stop faster it just slides unrealistically lol... But here is my walking forward code (WITH, my animation)

 if (Input.Get$$anonymous$$ey ($$anonymous$$eyCode.W)) {
                                 transform.Translate (Vector3.forward * speed * Time.deltaTime);
                                 anim.SetFloat ("Speed", 1f);
                         } else {
                                 anim.SetFloat ("Speed", 0f);
                         }

I do have it in a FixedUpdate, can that cause the problems? Because I'm using a Rigidbody to work with Physics, but I was just trying to do movement with transform.Translate and everything works fine! Just that slow jerk when I get a bit to many frames.

avatar image N1warhead · Oct 02, 2014 at 08:27 PM 0
Share

I'm gonna try to recreate my movement script as well and use nothing but Rigidbody stuff and see if that helps!

avatar image
0

Answer by N1warhead · Oct 04, 2014 at 01:17 PM

 using UnityEngine;
 using System.Collections;
 // REQUIRED COMPONENTS TO WORK!
 [RequireComponent(typeof (Animator))]
 
 public class Controller : MonoBehaviour {
 
     //private CapsuleCollider col; // This is the Collider for Player.
     private Animator anim;    // This is the Animator for Player.
     public float Speed = 5.0f;
     public float TurnSpeed = 5.0f;
     public float jumpHeight = 10.0f;
     public bool canJump;
 
     // Use this for initialization
     void Start () {
     anim = gameObject.GetComponent<Animator>();
     }
     
     // Update is called once per frame
     void Update () {
 
 
         if (Input.GetKey (KeyCode.W)) {
                 transform.Translate (Vector3.forward * Speed * Time.deltaTime);
                 anim.SetFloat ("Speed", 1f);
             } else {
                 anim.SetFloat ("Speed", 0f);
             }
         if (Input.GetKey (KeyCode.S)){
                 transform.Translate (Vector3.back * Speed * Time.deltaTime);
                 anim.SetFloat ("WalkBack", -1f);
             } else {
                 anim.SetFloat ("WalkBack", 0f);
             }
         if(Input.GetKey (KeyCode.A)){
                 transform.Rotate (0,-5,0);
             }
         if(Input.GetKey (KeyCode.D)){
                 transform.Rotate (0,5,0);
             }
         }
 
 
     void FixedUpdate(){
 
                 if (Input.GetKeyDown (KeyCode.Space) && canJump == true) {
                         if (canJump) {
                 anim.SetBool ("Jump", true);
                 transform.rigidbody.AddForce (Vector3.up * jumpHeight);
                 Physics.gravity = new Vector3 (0, -20, 0);
 
         }
     }
   }
     void OnCollisionEnter(Collision col){
         if (col.gameObject.tag == "Map") {
             anim.SetBool ("Jump", false);
         }
     }
 }
 
 

And here is my trigger script -

 using UnityEngine;
 using System.Collections;
 
 public class ObjectDetection : MonoBehaviour {
     // This accesses the Players Controller.
     public Controller controller;
     
     // This script detects if the player is within a certain height from the tag
     // of "Map"  if map is triggered then allow the jumping to true
     // otherwise can not jump (PREVENTS INFINITE JUMPING)
 
     void OnTriggerEnter(Collider col){
         if (col.gameObject.tag == "Map") {
             Debug.Log ("Object Detected");
             controller.canJump = true;
             }
         }
     void OnTriggerExit(Collider col){
         if (col.gameObject.tag == "Map") {
             Debug.Log ("Object no longer detected");
             controller.canJump = false;
     }
     }
 }
 
Comment
Add comment · Show 2 · 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 N1warhead · Oct 04, 2014 at 01:18 PM 0
Share

For some reason it didn't show my text I put.

Pretty much my FPS is sky rocketing to 110-120 FPS at 8 $$anonymous$$iliseconds.

and my trigger for my JU$$anonymous$$P BOOL in Controller is acting up.

avatar image N1warhead · Oct 04, 2014 at 01:31 PM 0
Share

Okay I'm an Idiot, I just took the jump out the FixedUpdate and it works like a charm now lol... I always read that AddForces and stuff needed to be in a Fixed Update.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

30 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

Related Questions

A node in a childnode? 1 Answer

DateTime rocket launcher timing issue 2 Answers

FPS KIT VERSION 2.0 0 Answers

Hi all. I am new to unity. And the problem is with the FPS of my scene. 1 Answer

Players unexpectedly change positions 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