Learn about fundamental latency compensation methods that provide clients with a smooth, real-time experience.
The goal is to have a demo program that draws a basic shape on the screen that can be moved by the player via keyboard input. In the background there will be a client-server application utilizing latency compensation.
- Basic application handling keyboard input and sending real network messages between a client and server (dumb client)
- Graphics for player 1 client view of a circle
- Add intentional server delay and/or tick rate to make differences more noticeable
- Client-side prediction
- Server reconciliation
- Entity interpolation
- Graphics for server view
- Networking for player 2 client, which only receives the position of player 1
- Graphics for player 2 view
- Toggleable GUI for each technique and latency/tick rate
- Add graphics to enhance demonstration
- Add variable timestep and velocity-based position calculation to all programs
- Add gifs to repo front page
- Handle any number of entities
- Add references
- cross-platform (eventually, linux preferred right now)
- client-side prediction
- entity interpolation
- refactor and clean up code to be more reusable
- wrap SDL in idiomatic C
- utilize some sort of Result<T, E> type to wrap the C layer
- boost::outcome
- https://github.com/bitwizeshift/result
- std::expected
- utilize some sort of Result<T, E> type to wrap the C layer
Heavily influenced by https://www.gabrielgambetta.com/client-server-game-architecture.html
- SDL2
- C 20
- make
- CMake
Don't actually need all of these for this program, but it's what their docs recommend.
sudo apt-get install \
build-essential \
git \
make \
pkg-config \
cmake \
ninja-build \
gnome-desktop-testing \
libasound2-dev \
libpulse-dev \
libaudio-dev \
libjack-dev \
libsndio-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxcursor-dev \
libxfixes-dev \
libxi-dev \
libxss-dev \
libxkbcommon-dev \
libdrm-dev \
libgbm-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
libegl1-mesa-dev \
libdbus-1-dev \
libibus-1.0-dev \
libudev-dev \
fcitx-libs-dev \
libpipewire-0.3-dev \
libwayland-dev \
libdecor-0-dev