A simple networked physics demo for the Godot engine using state synchronization and UDP

Note: This demo has been ported to Godot3. The original Godot2 version is located here for posterity.

State Synchronization Demo

In light of what I've learned since I made the snapshot interpolation demo, I have decided to write a new demo for Godot illustrating a technique called state synchronization. This is now my recommended approach for networked physics using Godot.

Both the client and the server run the physical simulation. State snapshots are sent from the server to the client at a high rate. The client stores the most recent update and then interpolates toward it, which has the effect of smoothing the motion of bodies in the simulation.

To start a dedicated server with the headless version of Godot type, "godotserver -server" in the project directory.

Features

  • Sequence checking for state updates
  • Linearly interpolated error correction for position and rotation
  • Experimental state expiration

Todo

  • Jitter buffer
  • Snap state when distance is greater than some threshold
  • Compression

Credits

Ryan Roden-Corrent for the port to Godot3

License

Copyright (c) 2015 James McLean
Licensed under the MIT license.

Similar Resources

User interface engine and widget library for Ebiten

User interface engine and widget library for Ebiten

Ebiten UI A user interface engine and widget library for Ebiten Ebiten UI is an extension to Ebiten that provides an engine to render a complete user

Nov 5, 2022

Rule engine implementation in Golang

Rule engine implementation in Golang

"Gopher Holds The Rules" Grule-Rule-Engine import "github.com/hyperjumptech/grule-rule-engine" Rule Engine for Go Grule is a Rule Engine library for t

Jan 3, 2023

Business Process eXecution Engine

Problem: creating and maintaining robust business systems Creating a proof-of-concept business system is relatively easy. Happy execution path, no cat

Oct 28, 2022

vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI

vkectl Introduction vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI(Command Line Interface). It is written in

Aug 26, 2022

Simple CLI using spf13/cobra and Flink REST API

Flinkctl Flinkctl is a simple CLI written on Go using Cobra created to facilitate my team's daily basis work with multiple Flink clusters at Azion Tec

Aug 16, 2022

Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022

A simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager.

ssmh This is a simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager. Installation brew install mi

Dec 10, 2021

Gowget - A simple wget tool built using golang to download files from the internet whether it is zip

gowget wget built using golang About: A simple wget tool built using golang to d

May 21, 2022

A simple shopping list that keeps track of a users shopping list using charm.sh tools

Terminal Shopping List This repo is a practise project for learning practical Go. I have chosen to use a toolset called Charm as it provides a rich se

Jan 13, 2022
Comments
  • Fixed: Body rotation in Godot 3+

    Fixed: Body rotation in Godot 3+

    In the current demo for Godot 3+, rotation seems to be acting weird. It often rotates in the wrong direction or jitters around. Sometimes it just does not correct itself at all.

    image

    I've converted the integrate forces to use alternative methods of moving a physics body, which seems to fix things.

Golang Bubble Tea Weather Demo

Golang Bubble Tea Weather Demo Demo weather app writen in Golang using Bubble Tea. Video Instructions go mod download go build ./go-tea-weather Discl

Nov 17, 2022
TXQR (Animated QR data transfer) demo reader app for iOS
TXQR (Animated QR data transfer) demo reader app for iOS

TXQR Reader for iOS txqr-reader is a demo app in Swift that reads animated QR code and shows file. Currently it expects file to be an JPEG image. Just

Nov 24, 2022
A CLI tool for OS demo.

NTHU-OS-Demo A CLI tool for OS demo. Powered by spf13/cobra, pterm/pterm, martinlindhe/imgcat and AlecAivazis/survey. Note that imgcat only support on

Dec 27, 2021
A CLI tool for OS demo.

NTHU-OS-Demo A CLI tool for OS demo. Powered by spf13/cobra, pterm/pterm, martinlindhe/imgcat and AlecAivazis/survey. Note that imgcat only support on

Dec 26, 2021
Restful services on a Go application integrated with mongodb. Articles demo application.

article-app Restful Go services demo integrated with MongoDB by Cahit Ünver article-app is a GO application integrated with MongoDB. Application is a

Jan 17, 2022
Go-flags wireframing demo

go-flags-demo redo - global option redo Redo global option via automatic code-gen TOC go-flags-demo - global option redo Synopsis Usage Development Hi

Jan 22, 2022
Simple trie based auto-completion engine implementation in golang.
Simple trie based auto-completion engine implementation in golang.

Simple auto-complete engine implementation in golang. Quick start $ git clone https://github.com/benbarron/trie-auto-completion-engine $ cd trie-auto-

Jul 12, 2022
A simple command line tool using which you can skip phone number based SMS verification by using a temporary phone number that acts like a proxy.
A simple command line tool using which you can skip phone number based SMS verification by using a temporary phone number that acts like a proxy.

Fake-SMS A simple command line tool using which you can skip phone number based SMS verification by using a temporary phone number that acts like a pr

Dec 31, 2022
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine. Vaku extends the existing Vault CLI an

Nov 28, 2022
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.

GC2 GC2 (Google Command and Control) is a Command and Control application that allows an attacker to execute commands on the target machine using Goog

Dec 13, 2022