Chickynoid, server authoritative character replacement

Well at least in 2 months we won’t be forced to either use antiwarp to block all the exploits but make the experience horrible for people with lagspikes, or not use antiwarp but let people just freeze their simulations.

Honestly I am glad I see the developers from phantom forces and MrRocketChicken push out server authoritative tech on boblox.

Will that include replacing the bitBuffer module that you are currently using with the new buffer type that Luau recently added? Those two would help a bunch making Chickynoid more performant.

It isn’t added to Studio yet but pretty sure that’s coming really soon, Luau version that Roblox uses seems to be a version or two behind…

1 Like

You bet, its the slowest part of chickynoid right now.

2 Likes

It’s that bad huh :sob:

To be honest I haven’t tested a lot with Chickynoid yet but with these new changes I might finally get to it… Great stuff!

1 Like

@MrChickenRocket Correct me if I’m wrong, but is there any particular reason why Client → Server doesn’t use BitBuffer nor delta compression? Or would it just be unneccesary optimizations?

1 Like

I got a question, sorry if I sound like an idiot for asking this but like if I wanna program certain behavior is it wrong to change the core scripts for chickynoid or am I supposed to never do that?.

Example here:

-- Services
local ReplicatedFirst = game:GetService("ReplicatedFirst")
-- Modules
local Enums = require(ReplicatedFirst.Packages.Chickynoid.Enums)
local CharacterData = require(ReplicatedFirst.Packages.Chickynoid.Simulation.CharacterData)
-- Other
local Weapons = ReplicatedFirst.Examples.Weapons

local module = {}
-- List containing all the paths for the Models for the weapons
local ModelPaths = nil

function module:Setup()
	-- Create enums for our weapon models
	Enums.WeaponModel = {
		None = 0,
		Sledgehammer = 1,
		FireAxe = 2,
		Sword = 3,
	}
	-- Make our list that points enums towards the locations of the Model instances
	ModelPaths = {
		[Enums.WeaponModel.Sledgehammer] = Weapons.Fists.Assets.WeaponModel
	}
	-- Setup new characterData type
	CharacterData.packFunctions.weaponModel = "Byte"
	CharacterData.lerpFunctions.weaponModel = -- we cant set to raw from a mod :(
end

function module:RenderWeaponModel(characterModel, num)
	characterModel.weaponNum = num

	local Rig = characterModel.model
	local RightHand = Rig.RightHand

	if num == Enums.WeaponModel.None then
		-- Remove weapon model
		characterModel.weaponModel:Destroy()
		RightHand["WeaponGrip"]:Destroy()
	else
		characterModel.weaponModel = ModelPaths[num]:Clone()
		-- Weld weaponmodel to arms
		characterModel.weaponModel.Parent = RightHand
		local Handle = characterModel.weaponModel.PrimaryPart
		local RightHandGrip = RightHand.RightHandAttachment

		local Motor6D = Instance.new("Motor6D")
		Motor6D.Name = "WeaponGrip"
		Motor6D.Parent = RightHand

		Motor6D.C0 = RightHandGrip.CFrame

		Motor6D.Part0 = RightHand
		Motor6D.Part1 = Handle
	end
end

function module:Step(client,_deltaTime)
	-- Loop through all characters
	for userId,Character in pairs(client.characters) do
		
		local CharacterData = Character.characterData
		local CharacterModel = nil -- I forgor how to get the model assume its there lol
		
		-- sometimes data isnt loaded for some reason so check for that just in case
		if CharacterData then
			if CharacterData.weaponModel then
				-- check if it changed
				if CharacterModel.weaponNum ~= Character.weaponModel then
					self:RenderWeaponModel(CharacterModel, CharacterData.weaponModel)
				end
			end
		end
	end
end

function GetPriority()
	return 2
end

return module

Should I be writing this code that renders weapon models on client characters according to characterData on mods or would it just be simpler to just write this into the characterData and characterModel scripts. Also technically the part where I create the data for the weaponModel isnt even possible via a mod because we cannot set raw and also the mod sets up after characterData script making it error anyways and i would also need 2 mods for server and client.

I recently started to learn new programming patterns for my code and I think maybe the observer pattern could also help with this problem im having since ive heard it lets you add code on top this without coupling code.

Doing delta compression isn’t a bad idea and is pretty easy to use via the deltaTable methods. Some games have done this already (anarchy arena) I just have not added it back to the main branch yet.
It’s not a big savings either way.

Yes, change what you need to. I tried to make it so you can avoid it but Im sure its not possible for all additions.

1 Like

I tried searching around on this post but I could not find anything that mentions Attributes. My game relies heavily on Attributes, is there any way I can use functions such as GetAttribute() or GetAttributeChangedSignal()?

There is no direct attribute support.

Out of curiosity, I am going to see if it’s posisble to convert the WalkMoveType mod into a finite state machine, Lets see what happens.

Hi MrChickenRocket,

I was wondering, how would physics work with the inclusion of Chickynoids. For instance, having a ball and moving that ball by running into it? The scenario this is for is a football game where walking to push the ball is integral to my system and I am trying to implement Chickynoids but I’m not sure how that would impact the physics of such. Also, implementing the unique hitbox onto the rig doesn’t seem to replicate it with Chickynoid, so is this something I would have to do within the module as well?

Thanks.

1 Like

If you are trying to make a game heavily oriented towards physics i dont think it’s going to work because the physics that chickynoid uses dont work along with roblox’s so the ball is just being pushed by an anchored object.

Hitboxes on chickynoid only exist from the server ad have a defined size of a box thatd 3x5x3 studs and the character model rig is only rendered on client side and just listens to data sent by the server.

1 Like

I just watched a seminar that you were featured in, and during the part talking about crates I noticed that the crates didn’t fall. I decided to test this myself and the same issue occurred. Is there a particular reason for this to happen? I’d like to create an object I myself could push, but I’m not exactly sure on how I would do that if the part’s physics is not getting simulated – although the collision works fine.

You could create you own physics system for the ball and this would allow you to network it properly with chickynoid and you could also have deterministic physics, this is how rocket league does it and how it feels so responsive: https://youtu.be/ueEmiDM94IE?si=KOUiLLNH9WP9MqIe

1 Like

I see, this seems like a pretty damning challenge but I appreciate the video link its very insightful and I will try to approach it this way as long as I don’t procrastinate due to getting overwhelmed lol

1 Like

Yeah it would be a lot of work, but if you really want server authoritative movement and physics that is the way to do it

1 Like

this is kinda why im hoping roblox adds those server authoritative physics soon, at this point we are making roblox games outside the roblox engine, making our own physics engine and stuff, there’s some people who even made their own streaming enabled system.

4 Likes

If they don’t add their own server authoritative physics soon, the next best thing would be UDP’s which would make chickynoid much better. I’m pretty sure they’re supposed to be released sometime very soon.

1 Like

they said they will do it late 2023, and 2023 ends in one month so, they should be comming out soon.

2 Likes