GithubHelp home page GithubHelp logo

hk1ll3r / unity-all-about-time Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 10.24 MB

A simple Unity project to play around with time related features of Unity.

License: GNU General Public License v3.0

C# 100.00%

unity-all-about-time's Introduction

Unity-All-About-Time

A simple Unity project to play around with time related features of Unity. This project is intended for beginner / intermediate developers to learn about Unity. Covers Time class, RigidbodyInterpolation, QualitySettings, VSync and more.

I've published an in depth blog post about time in Unity and this is the accompanying project for that post. If you are familiar with Unity already, you can dive right into the project. If this readme file and the project seem confusing, feel free to read the blog post. https://medium.com/@nosuchstudio/all-about-time-in-unity-game-engine-4c290d2772c7

On the left side there are controls to change Unity parameters (listed and explained below). On the right side you'll see some stats such as FPS, physics updates per second, real time, game time and screen's refresh rate.

You can access the web build of the project here: https://hk1ll3r.github.io/Unity-All-About-Time/

screenshot

The parameters:

  • Application.targetFrameRate

    How many frames we want rendered per second of real time. -1 is a special value and is different on different platforms.

  • Time.FixedDeltaTime

    The interval at which we want physics step to happen in game time. 0.02 means 50 updates per second of game time.

  • Time.timeScale

    If CaptureDeltaTime == 0: time scale for game time compared to real time.
    If CaptureDeltaTime > 0: time scale for game time compared to capture time.

  • Time.CaptureDeltaTime

    If non-zero, game time advances with each frame rendered, rather than with real time.
    For example if CaptureDeltaTime = 0.02, each frame rendered advances game time by (0.02 * timeScale) seconds.

  • VSyncCount

    Overrides Application.targetFrameRate and renders frames in sync with the screen's refresh rate.

  • RigidbodyInterpolation

    If set to None, the Rigidbody's pose will not change between physics steps.
    If set to Interpolate or Extrapolate, its pose will change in Update() calls between physics steps.

  • Quality Level

    The quality level of the game.

  • Balls

    How many balls to have in the scene.

  • FixedProcessingTime

    How long the call to FixedUpdate() should take in real time? Use this to simulate a physics heavy game in which physics steps take time. Uses Thread.Sleep for simulation.

  • FrameProcessingTime

    How long the call to Update() should take in real time? use this to simulate a graphics-heavy game in which rendering frames takes considerable amount of time. Uses Thread.Sleep for simulation.

unity-all-about-time's People

Contributors

hk1ll3r avatar

Stargazers

 avatar Stanislaw avatar  avatar  avatar jay down avatar amamaam avatar Man Sun avatar S. Tarık Çetin avatar Jesse Talavera avatar wwrzal avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.