carbone13 / godot-rollback-cs Goto Github PK
View Code? Open in Web Editor NEWA complete implementation of Rollback Netcode in the Godot Engine, made in C#
License: MIT License
A complete implementation of Rollback Netcode in the Godot Engine, made in C#
License: MIT License
When i load the project i get this error.
The input dictionary can't access entries by index for some reason.
(forget all that's below this line, my fix worked but it stopped working for no reason, i have no idea how)
For some reason godot dictionaries in c# doesn't actually registers your entry just by calling 'dictionary[entry] = value', it only registers if you call 'dictionary.Add(entry, value)', and because the input parsing in 'ReceiveInputTick' uses the faulty method, you can't get inputs by entry, leading to very nonsensical bugs.
Very simple fix: change line 939 of the SyncManager from "allRemoteInput[int.Parse(entry.Key)] = entry.Value;" to "allRemoteInput.Add(int.Parse(entry.Key),entry.Value);"
EDIT: strange, this fix doesn't work all the time, what the hell? It stopped working!
Floating points are very infamous for not being calculated properly and causing a lot of issues, including the possibility that they give different results on different machines.
The "solutions" i know (honestly they are pretty risky, there might be something else that's better):
Correct floats with some calculation related to scale. (might not solve the issue tbh, for example: the difference between the resulting move_and_collide or just changing the position could theoretically be more than the scale, causing a bigger desync than if it didn't have this calculation)
Make the server send the entire world state every X seconds and resimulate. (might be too much for UDP, and it might take a lot of work, but it's the safer option. If you try this let me know how i can help you, i'm very bad at this stuff but i can try)
Is there any possibility of portability to Unity 3D?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.