Entity System help for my tower defense game

You’d simplify all your info with Vector3Int16 when you send it, but keep the full data for use on the server.

16 bit ints have a limit of about -32000 to 32000, and don’t support decimals. If you want to send a decimal through it, multiply it by 10^decimalplace and then divide it by 10^decimalplace on the client

--server

local CF = TableValues.CFrame
local Precision = 10^2
ClientInfo.CFrame = Vector3Int16.new(CF.X * Precision, CF.Y * Precision, CF.Z * Precision)

--client

local Precision = 10^2
local CF = ClientInfo.CFrame
local RealCFrame = CFrame.new(CF.X / Precision, CF.Y / Precision, CF.Z / Precision)
3 Likes

Thank you so much, it doesn’t run the exact 1000 i wanted but 200-500 is honestly good for now, I’ll probably look into future methods on how I would make the recv run smoother/lower in the future or I’ll just make another post asking about bit compression and other ways to make recv not be as high. Thank you so much though Kdude, you were a great help towards me figuring out how i’d make an entity system.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.