Skip to content

Commit

Permalink
Started work on the technical concepts section
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGlenn committed Oct 21, 2021
1 parent f061db9 commit 45e2643
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
13 changes: 13 additions & 0 deletions content/technical/_index.md
@@ -0,0 +1,13 @@
---
title: Technical Concepts
description: Video games are software, and like all software there's a good deal of complexity involved in developing them.
---

This is the part of the handbook where we get into more technical and implementation oriented details, aka, code.

- [Time]({{< ref "time" >}})
- Physics
- [Networking]({{< ref "networking" >}})
- Rendering
- Audio
- Input
26 changes: 26 additions & 0 deletions content/technical/networking.md
@@ -0,0 +1,26 @@
---
title: Networking
description: If you're planning on building a modern multiplayer game, chances are you want to support networked play. Saddle up.
---

Listen... this is a deep topic. Creating games is hard enough as it is when you're worrying about a single machine. The moment you want to do that over the internet in an effective way is the moment you've tripled the amount of time and work it's going to take to build your game.

If you want a curated list of articles, tutorials, and libraries that is separate from this page, be sure to check out [Awesome Netcode](https://github.com/rumaniel/Awesome-Game-Networking) on Github.

To get you started on your journey, here's some useful articles covering various aspects of netcode design:

- [Gaffer On Games](https://gafferongames.com): Glenn Feidler is _"the networking guy"_. His stuff is both high level and detailed and his implementations are usually handrolled C/C++ or in Unity (no Unreal or other engine).
- [Gabriel Gambetta: Fast-Paced Multiplayer Client-Server Game Architecture](https://www.gabrielgambetta.com/client-server-game-architecture.html): He has a nice little series covering the high level concepts with illustrations that helps to outline the problems and the general solution around solving them. Here is an implementation in Unity that someone made demonstrating his solution.
- [Joe Best-Rotheray’s Blog](https://www.codersblock.org/): A game dev who loves netcode. He's producing a hand-rolled networked shooter demo using C++ and covers his netcode strategy over several posts. He also has some articles demonstrating how to replicate physics in Unity.
- [Riot Games - Peeking into Valorant’s Netcode](https://technology.riotgames.com/news/peeking-valorants-netcode): Explains how Riot is trying to optimize Valorant’s netcode to reduce peeker’s advantage, prevent cheating, and keep the simulation running smoothly.
- [Source SDK Networking](https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking): Valve’s own documentation about resolving issues related to netcode latency, cheating, etc.
- [Timelines: simplifying the programming of lag compensation for the next generation of networked games](https://link.springer.com/article/10.1007/s00530-012-0271-3): White paper around the theory of managing timings and lag compensation in networked environments. (Still need to read)
- [Kehom’s Forge](http://kehomsforge.com/tutorials/multi/gdMoreNetworking/part03): Site with articles/blog posts around game development (mainly Godot). Has some nice articles about trying to build a netcode project using Godot.
- [Explaining how fighting games use delay-based and rollback netcode](https://arstechnica.com/gaming/2019/10/explaining-how-fighting-games-use-delay-based-and-rollback-netcode/4/)
- [The Poor Man's Netcode](https://www.gamedev.net/articles/programming/networking-and-multiplayer/the-poor-mans-netcode-r4851/)

Or if you prefer videos:

- [GDC: Networking for Physics Programmers by Glenn Fiedler](https://www.youtube.com/watch?v=Z9X4lysFr64)
- [8 Frames in 16ms: Rollback Networking in Mortal Kombat and Injustice 2](https://www.youtube.com/watch?v=7jb0FOcImdg)
- [Unreal Network Performance](https://www.youtube.com/watch?v=mT8VUVuk-CY)
28 changes: 28 additions & 0 deletions content/technical/time.md
@@ -0,0 +1,28 @@
---
title: Time
description: Time is a critical component to any game and it can quickly become complex once you factor in physics, networking, threads...
---

## Timesteps

{{< hint "todo">}}
Need to provide an introduction to timesteps.
{{< /hint >}}

### Fixed Timesteps

A fixed timestep is an update/tick that executes at a deterministic and constant rate.

We could go further in our explanation, but it's been explained better by so many others. Most notably is Glenn Fieldler's [Fix Your Timestep!](https://gafferongames.com/post/fix_your_timestep/). This is considered critical reading material for game developers, and does a great job explaining the basic implementation of a fixed timestep from the standpoint of C-style pseudo code.

For further reading on the subject, feel free to read any of the following articles:

- [Fixing your time step, the easy way with the golden 4⅙ ms.](https://www.gamedeveloper.com/programming/fixing-your-time-step-the-easy-way-with-the-golden-4-8537-ms-)

### Unity and `FixedUpdate`

Unity supports a fixed timestep as a standard part of their `Time` and `MonoBehaviour` APIs. However, like _any_ timestep (fixed or otherwise), it's important to understand some of the specific mechanics and "gotchas" of its implementation.

The article _[Fix your (Unity) Timestep!](https://johnaustin.io/articles/2019/fix-your-unity-timestep)_ is a great article that allows some of the intricacies of how and when `FixedUpdate` is called in comparison to the standard `Update` method.

If you're looking to solve visual problems (jitter/choppiness) created by the fixed, but sometimes uneven, tick rate of Unity's `FixedUpdate`, be sure to checkout Kinematic Soup's article [Timesteps and Achieving Smooth Motion in Unity](https://www.kinematicsoup.com/news/2016/8/9/rrypp5tkubynjwxhxjzd42s3o034o8).

0 comments on commit 45e2643

Please sign in to comment.