I am sending player inputs whenever the user presses a key.
If I want to replicate the player’s position to the server, I am just giving the network ownership to the client.
Yes, I am rendering the character’s head on every Frame but I am sending them to the server like in every 0.3-0.5 seconds.
I just started using this networking library and it’s great, thank you for the resource. Are there any plans to introduce defining specific instance types instead of just Instance?
Also is it possible to focus on error handling in the next release? Everytime I get an error my console either gets spammed and/or the error doesn’t help me figure out what I’m doing wrong.
return ByteNet.defineNamespace("messaging", function()
return {
NPC_ControllerPos = ByteNet.definePacket({
-- This value field is very important!
value = ByteNet.struct({
id = ByteNet.uint16, -- values from 0 to 65536-1 (more than enough for NPCs)
pos = ByteNet.vec3,
})
--reliabilityType = "unreliable",
})
}
end)
Only errors if I call this:
ByteNetPackets.NPC_ControllerPos.sendTo({ id = self._id, pos = self._currentCFrame.Position }, v)
Also do you think you can fix the issue where the combined UnreliableRemote packets are >900B?
Yes latest version, but I mean the issue where it puts the packets together to a single packet that is >900B large.
ByteNetPackets.NPC_ControllerPos.sendTo({ id = self._id, pos = self._currentCFrame.Position }, v)
I call this many times. From what I understand ByteNet then packages then together into one big packet to save overhead. Problem is that packet can be >900B.
I managed to get bytenet working for one of my games which shows my screen in roblox
the fps is slightly higher than warp and it doesn’t crash my client when i go in the game.
since warp relies on player amount to get more performance which crashes random clients in the game.
9 fps at 240x135
All data type write functions now directly reference the buffer writer. This means all allocation calls are inlined, and there are roughly ~3x less function calls.
The roblox-ts version is under 0.4.3-tsprev1 to ensure everything is typed properly. When I am more confident in the typings I will upload the main 0.4.3 version.
Im probably going to need your script, and it would be better to ask in the OSS server (but beware, they dont give you good string patterns for getting URLs)
You shouldn’t worry with security if you have proper sanity checks on the server and aren’t sending sensitive information like damage (that shouldn’t be done on the client), but from the looks of it, ENet only acts as an exploit protection and still uses normal events