wait what? why time stamp it on the client, does it not uses ping to determine when did the user originally fired the gun?, if it uses time stamp then whats the point cant they just fake the time stamp to be ahead or well before? doesnt this defeats the server authoritative purpose
How does it exactly works via the time stamp system?
All I know from the valve documentation is that lag compensation systems are done by logging all player positions for the last 2 seconds, then when an user fires his gun he tells the server to hitscan and the server rewinds all hitboxes to the world state he was seeing based on his ping, for example 100ms means the server rewinds 50 miliseconds.
Yes, itâs effectively the same thing - the server just needs to know what you were seeing when you shot. It doesnât matter if you âtrustâ that time from the client or work it out based on ping, because if they tamper with it theyâre just going to make their own hit detection worse.
I guess this works to some degree, the only problem I find is that users can send an earlier time stamp to rewind characters before they were on a wall and kill them, Also its sadly not gonna work for compensating requests for cooldowns as they work differently than a shot but still nice to know about.
@MrChickenRocket Hello sorry to bother you again, I just have a lot of questions regarding this tool, Pardon me if the first question is a silly one but is there a way to turn of character auto spawn and make it manually? I would like to do this for the menu GUI spawn player button
Another question is how would I go on adding more movement types such as ledge climbing or dashing, I know this isnt as easy as adding it from the server since its gonna be unresponsive and we want it to be done both on client and server to make it feel smooth for the player but Im not sure how to do this with chickynoid current tools and functions
Lastly I wanted your feedback on this since you seem very experienced in networking and well you are an engineer. So I want to lag compensate my cooldowns and charge mechanics for my game since I do not wanna trust the client in any way.
I had a few ideas
1 Fire a remote event when you start charging, and on the server use the last logged ping by chickynoid to determine when did the user originally started charging (200ms = go back 100miliseonds back), when they stop charging they fire a remote event to stop charging and use the same logged ping to determine when did they stopped charging, this is to prevent them from using ping spoofing to gain more charge
2 I heard somewhere that you should always send all your inputs to the server every frame from another person who did server authoritarian work
This is done to determine if someone had a lag spike or something similar and in this scenario we decide to stop charging for the player automatically or do something else since he had a lag spike, also if he is constantly sending the inputs we can determine if their client cooldowns are not matching the server and peform rollbacks back to the client, and use lag compensation to see if by the time the rollback got to the client they can already charge so we dont apply any cooldown re adjustments.
I would really like your help on this one, this whole new journey of using server authoritative things has really jumbled my mind and challenged any knowledge I had as a dev by making me realise trusting the client is not the way and that robloxâs deffault practices are ages behind industry standards and are not safe.
Hello sorry to bother you again, I just have a lot of questions regarding this tool, Pardon me if the first question is a silly one but is there a way to turn of character auto spawn and make it manually? I would like to do this for the menu GUI spawn player button
Inside a server mod to listen for when players connect, and then set allowedToSpawn to false on their playerRecord.
Another question is how would I go on adding more movement types such as ledge climbing or dashing,
Create a movetype for these. Movetypes are special mods that get executed on both client and server and get properly predicted. There is an example âFlyingâ movetype in the example folder.
So I want to lag compensate my cooldowns and charge mechanics for my game since I do not wanna trust the client in any way.
Chickynoid already has the concept of weapons with things like ammo and cooldown and reloading. You can use them for powers, too. They donât have complex âfullâ rollback networking like the movement, but instead they occasionally sync themselves to the server state. If youâre doing something intensive like firing a machinegun you can âsuppressâ these syncs until the player lets off the trigger for a moment - see the machinegun code for how to do that.
I heard somewhere that you should always send all your inputs to the server every frame from another person who did server authoritarian work
Chickynoid already does this. Itâs what commands are.
Ill look into how mods work since last time I tried to understand mods all I could do is write an HP mod that worked more similar to the roblox health and had events using fastsignal since i noticed it inside chickynoid
Also ill look into how the guns sync to the server this has been a massive issue ive been having which has lead me to go arround if I should use a task scheduler and re schedule cooldowns on rollbacks/syncs or just use heartbeat to create a game clock that is updated so cooldowns just need to be reset via the game clock.
Ill make sure to check out how commands work
Again thank you for your help I really appreciate how you bothered to help me Im kinda new to these
networking things, seriously all my life I thought every game had client authoritative movement work until I read valveâs lag compensation article.
@MrChickenRocket Im sorry if im getting annoying for you at this point
But could I get an explanation as to properly use mods client and server mods for chickynoid, I made some simple mods by writing on an already existing mod but those only create new property or data for the playerrecord of chickynoid but they are relatively simple and mostly I have no idea what I am doing.
And I wanna listen to the thing you told me last time and implement most of the things as mods so they work within chickynoid and not on top of it as some frankenstein code mounstrossity since atm they are literally working on top of chickynoid and having their own player records which works really messy.
I want to make some of my libraries into mods.
Example: Citrus Tools
(Works exactly like roblox tools and has client and server sided functions that when called run any code related to the class [melee] instead of using events)
So Âżis it possible I could get an explanation as to how to properly make mods and how does registering mods works and all the functions avaible for mods so I dont screw anything vital on chickynoid?
Bumping. I would like to know whatâs needed for chickynoids to âfunctionâ. I wanted to make it work with Knit and maybe use a different pathway than the mods loading.
EDIT: Iâve been trying to break down Chickynoid to itâs core. To get to the actual âserver authoritativeâ part which I can intergrate with my own systems. But the architecture of chickynoids is a little too complex to break down and customize.
I never understood why people use Knit, what does it do???
Also yeah understanding chickynoid is really hard I havent given up hope yet on cracking how does it all works together, the only things I do not touch are the physics related libraries since I am very dumb when it comes to physics all I could do is make a terrible physics engine that only simulates dynamics on roblox .
I really like chickynoid tho, its like this thing never seen before that blows my mind, the fact they even made this possible is astonishing, I always loved the idea of removing as much roblox from roblox and scripting your own and this literally does that.
I wanted to break it down into its main parts, but havenât yet worked out how clientMods and serverMods are handled in the âserver-authoritativeâ system. I donât know how chickynoid handles all of that.
From what I could learn normal mods are just code that can be attached to chickynoid, in this example I built a mod that loads all data needed for the melee combat on my game (this is a client mod)
Yeah I need to find a way to make it a little more general to projects. The clientMods, serverMods system.
EDIT : Itâs very clean, now that I look at the code. Itâs actually pretty cool. Time to mess with chickynoid.
EDIT2: So I went through the weapon code in the example place, and I still donât understand how it handles the server-authoritative part of it. I just see a basic weapon handler script with bullet counts and raycasts. Whereâs the magic code?
You are looking at weapons meanwhile im still suck at having an existencial crisis about my code getting longer and longer
(I dont wanna shorten it because making new table references can cause memory leaks and theres no way to remove those outside the script where the reference was made from what I know )
-- Run Block code and connect it the same way we did to charge to yield it
ClientChickynoid.playerRecords.LocalPlayer.Connections.Fast.AbleToBlock = ClientChickynoid.playerRecords.LocalPlayer.Connections.Fast.AbleToBlock:Connect(function()
EDIT: I might be dumb so maybe theres like a better way, does anyone have any tips.
The visuals of having a weapon equipped is up to you.
playerRecords have a field which specify which character to spawn with, so if you want to define more than one go ahead, just specify before you spawn.
What exactly is the purpose of the OnCharacterModelCreated Event, I have been breaking my head figuring out what itâs purpose is
It might be obvious at first that it is for when a character for a chickynoid is created right? and it fires when one is created
ClientChickynoid.OnCharacterModelCreated:Connect(function(Table)
if Table.userId == LocalPlayer.UserId then
-- Create and hide the viewmodel object
ViewModel.Storage = ViewModel.new()
ViewModel.Storage:Hide()
for i,v in pairs(Table) do
print("[OnCharacterModelCreated]",i,v)
end
if not Table.modelReady then
Table.OnModelCreated:Wait()
end
print("SOUNDS LOADED")
-- Load all deffault character SFX
for i,Sound in pairs(AssetsFolder.SFX.Combat:GetChildren()) do
local ClonedSound = Sound:Clone()
ClonedSound.Parent = Table.model.HumanoidRootPart
ClientChickynoid.playerRecords.LocalPlayer.Assets.Character.SFX[Sound.Name] = ClonedSound
end
-- Load deffault animations like stun into the viewmodel
ViewModel.Storage.AnimationTracks.Stun = ViewModel.Storage.Animator:LoadAnimation(AssetsFolder.Animations.Combat.Stun)
end
end)
ClientChickynoid.OnCharacterModelDestroyed:Connect(function(Table)
if Table.userId == LocalPlayer.UserId then
ViewModel.Storage:Destroy()
end
end)
I wrote this simple code which in theory should load the sound effects from a folder into the HumanoidRootPart, but when it fires this happens
By the time it fires sometimes âmodelâ is not even avaible, so I guess it fires whenever the character model is being created right?, well even when I tried to use an if statement to yield the script if character model was not ready using the fastsignal called OnModelCreated that the table had, it just sometimes doesnt exists which is breaking my head?, is this event firing when the table is not even ready?
My best guess is that the code itself obviosuly triggers something on the server, since the visuals are only client sided (characters for example) you must fire all clients and then in that code set it up so it displaysâs that visual in everyoneâs client
Not sure if the thing you are reffering to already has events built in for the things you wanna accomplish