Chickynoid, server authoritative character replacement

Isn’t there a boolean argument on the :SetPositiom() functions to teleport players without interpolation.

1 Like

There is a flag for this! (30)

2 Likes

It seems to only affect other players from your POV.

It doesn’t seem to work for your own client. Your simulation still moves instantly, but your Client fails to recognize it as a teleport and interpolates your character model.

local posi = Vector3.new(math.random(-500,500),math.random(0,500),math.random(-500,500))
self.chickynoid:SetPosition(posi, true)

The “teleport” argument is set to “true.”

Here is the desired effect, which can be achieved by setting “self.mispredict” to 0 in the CharacterModel module. This is to show the intended effect and isn’t meant to be a solution.

1 Like

I mean its as good as it is gonna get unless there is a way a client can predict it and it isn’t just an action done from the server, also AuroraService is releasing this year and APIs referencing it and patch logs reveal that it might be coming in a while.

Would AuroraService effectively phase out anything Chickynoid accomplishes?

I already built my entire project around the system, so I don’t plan on changing it to whatever Roblox releases officially, but it’d be nice to know what I’d miss out on.

I managed to fix my issue by following something similar to this.

For anyone intersted, here is how it works:

When someone teleports, it adds 1 to a new variable called “teleported”.

function ServerChickynoid:SetPosition(position: Vector3, teleport)
	if teleport then
		self.simulation.state.teleported += 1
	end
    self.simulation.state.pos = position
    self.simulation.characterData:SetTargetPosition(position, teleport)
end

Inside the “ClientChickynoid” module, a variable is set called “LastTeleport” and it is set to 0.

local lastTeleported = 0

Then, when the client calculates the mispredict inside the :HandleNewPlayerState() function, it compares the two values and skips it if they are not the same. It also sets LastTeleported to the new value so it only does it once.

 -- Did we make a misprediction? We can tell if our predicted position isn't the same after reconstructing everything
local delta = oldPos - self.simulation.state.pos
--Add the offset to mispredict so we can blend it off
				
if self.simulation.state.teleported ~= lastTeleported  then
      lastTeleported = self.simulation.state.teleported 
      delta = Vector3.zero
end

This is a good solution! But remember what I wrote up the top!

Sorry, I didn’t quite get what you meant by that. Are you talking about this?

There is a flag for this! (30)

I’m kind of a beginner when it comes to this stuff, so excuse my lack of language while I’m trying to describe this issue.

Whenever I create then destroy parts for my map for each round in my game, it seems like the references don’t completely get erased in the CollisionModule. How would I go about clearing these? Would it be a concern to leave them as is?

image

How are Mesh Collisions handled?

It works fine for some Meshes (ex, rock meshes), but some things have completely messed up collsions (tree trunks, tree branches, etc).

Is there a way to optimize meshes so that Chickynoid recgonizes their collisions more accurately, or is it just entirely dependent on the shape?

They are convex hulls so there can’t be any concave shapes, this was going to be fixed by usong shapecasts but roblox is stupid and did not give us margins.

3 Likes

Ended up fixing it, not sure if this is ok, but it works.

In the CollisionModule:
image

What’s going on here?

Inside the roof:

For some reason chickynoid V2 collisions just don’t like ramps, I had similar issues when using wedges (converted to a convex hull mesh so they would work), this is why I had to stop using it.