Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS: New Timing and Latency section (DOCF-1179) #1994

Merged
merged 25 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9b6e879
Timing and latency section
duckets Sep 3, 2024
b7aac50
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
duckets Sep 3, 2024
824f4db
removed stray escape characters in code samples
duckets Sep 3, 2024
c1ca398
Small edits and formatting fixes
duckets Sep 4, 2024
72504b5
Formatting pass
duckets Sep 4, 2024
980e27f
fix broken link
duckets Sep 4, 2024
e885d83
minor edits
duckets Sep 4, 2024
30978c8
ongoing corrections from peer review WIP
duckets Sep 18, 2024
343d88f
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
duckets Sep 25, 2024
40ef239
renamed file link fixes
duckets Sep 25, 2024
669e8a5
Merge remote-tracking branch 'origin/docf-1179-fixedupdate-vs-update'…
duckets Sep 25, 2024
faa6438
Completed landing page links section
duckets Sep 26, 2024
ed28ae2
fixed broken link (xref not working)
duckets Sep 26, 2024
6352eb0
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
duckets Sep 27, 2024
f9aa7bb
Update Packages/com.unity.inputsystem/Documentation~/timing-input-eve…
duckets Sep 30, 2024
b9b49ca
Update Packages/com.unity.inputsystem/Documentation~/timing-select-mo…
duckets Sep 30, 2024
cb59eac
Update Packages/com.unity.inputsystem/Documentation~/timing-select-mo…
duckets Sep 30, 2024
e4fdd5e
Update Packages/com.unity.inputsystem/Documentation~/timing-optimize-…
duckets Sep 30, 2024
f1a105b
Update Packages/com.unity.inputsystem/Documentation~/timing-optimize-…
duckets Sep 30, 2024
336f3c9
Update Packages/com.unity.inputsystem/Documentation~/timing-mixed-sce…
duckets Sep 30, 2024
2201f7e
Update Packages/com.unity.inputsystem/Documentation~/timing-mixed-sce…
duckets Sep 30, 2024
489ea04
Update Packages/com.unity.inputsystem/Documentation~/timing-select-mo…
duckets Sep 30, 2024
b0da146
Update Packages/com.unity.inputsystem/Documentation~/timing-select-mo…
duckets Sep 30, 2024
744411f
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
duckets Oct 2, 2024
e088c49
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
AlexTyrer Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
623 changes: 623 additions & 0 deletions Docs/SVG Source/TimingEventGrouping.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,822 changes: 1,822 additions & 0 deletions Docs/SVG Source/TimingFixedUpdateFastFPS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
962 changes: 962 additions & 0 deletions Docs/SVG Source/TimingFixedUpdateSlowFPS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
336 changes: 336 additions & 0 deletions Docs/SVG Source/TimingInputsPerFrame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
* [Events](Events.md)
* [Layouts](Layouts.md)
* [User Management](UserManagement.md)
* [Timing and latency](timing-and-latency.md)
* [Input events queue](timing-input-events-queue.md)
* [Select an input processing mode](timing-select-mode.md)
* [Optimize for dynamic update](timing-optimize-dynamic-update.md)
* [Optimize for fixed update](timing-optimize-fixed-update.md)
* [Avoid missed or duplicate events](timing-missed-duplicate-events.md)
* [Mixed timing scenarios](timing-mixed-scenarios.md)
* [Supported Input Devices](SupportedDevices.md)
* [Pointers](Pointers.md)
* [Touch support](Touch.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
uid: timing-latency
---
# Timing and Latency

Input Timing refers to the topic of exactly when the Input System receives and processes input from devices.

Latency is the amount of time between the user providing some input, and the user receiving a response to that input. For example, the time between a button press and your game’s character moving on-screen. In fast-paced input scenarios such as action games, even tiny delays between the user's input and your game responding can be noticeable and affect the feel of your gameplay.

In addition to the effects of latency, timing can affect one-off discrete events such as when a button press starts or finishes. Checking for these at the wrong time can result in missed or duplicate events.

To minimize input latency, and to avoid missed or duplicate events, it helps to understand how the Input System processes events in relation to Unity's frame updates, physics updates, and fixed updates. This will help you make decisions about how to read and respond to input in your game or app.

| **Topic** | **Description** |
| :------------------------------ | :------------------------------- |
| **[Input events queue](timing-input-events-queue.md)** | Understand how and when the Input System receives and processes input from devices. |
| **[Select an input processing mode](timing-select-mode.md)** | How to select an appropriate **Update Mode** which controls when the Input System processes queued input events. |
| **[Optimize for dynamic update](timing-optimize-dynamic-update.md)** | How to optimize input for use in `Update` calls. |
| **[Optimize for fixed update](timing-optimize-fixed-update.md)** | How to optimize input for use in `FixedUpdate` calls. |
| **[Avoid missed or duplicate events](timing-missed-duplicate-events.md)** | How to avoid missing or duplicated discrete input events like when a button was pressed or released. |
| **[Mixed timing scenarios](timing-mixed-scenarios.md)** | How to optimize and avoid problems when using input in both `Update` and `FixedUpdate` calls. |
Loading