Rollback Netcode on Roblox?

Alright, so I wanna try and push myself to learn how rollback netcode and client prediction works so that I can try to implement it in my game I’m not sure if it’s gonna be possible, but I’d imagine you can at least do something very similar if done correctly.

The only issue I have at the moment is that there doesn’t seem to be many resources about this for Roblox Studio so a lot of resources that I’ve been looking at are for like unity (Getting Started with NetCode) or other languages.

For example actually first of all I just wanna say I’m not sure if this is going to help me at all with net code at all, but I found this thread related to frame count https://learn.mansteri.com/p5-tips-and-tricks/processing-tips-tricks-framecount-and-the-modulo-operator/ and it seems like it could be helpful but the only thing I found related to FrameCount on Roblox was this ThreadState | Roblox Creator Documentation. The way I ended up getting here in the first place was I found this pseudocode RollbackPseudoCode.txt · GitHub which has a lot of variables referencing frames and I don’t think this means the players fps or the frames of an animation but the frame the game is currently on which is how I stumbled upon that mansteri university thing. (if someone knows how to do this could I get an explanation? lol)

So yeah my question for this I guess is where is a good place to start with implementing roll back netcode on Roblox?

4 Likes

First: frame count is not really an engine thing its just a variable that both clients agree to as FrameCount: 1

Also the person who published this psuedo code actually has a full tutorial about setting this netcode from the ground up. (its in C++ though)

His tutorial series:

Also I have a (currently working) version of this netcode fully translated to LUA after following this tutorial if you would like to take a look as well: