I would like to reduce bandwidth/memory of 2000 NPCs or more, since FPS is not a problem because I have tried 5000 NPCs stress test on my iphone 8 plus and still manage to get ~55 fps - 60 fps
Here is the video: (sorry for low quality video and it was recording on mobile due to I don’t have a good recording software on my laptop)
The Bandwidth goes VROOOM VROOOOOMMM reaching up to 800 kb/s receive
also this is the game: Game optimization - Roblox
I have tried these methods so far:
Lightweight Network optimizations ( bit32, buffer, ect…) Yea, I used chatgpt for this since I don’t know anything about these “things” , and it turned out pretty well, insanely well I meant.
CFramed NPC ( I know this thing caused insane amount of bandwidth but I want a smoother NPC instead of just server throttling NPC’s physics)
Skinned mesh ( 1 NPC 1 mesh include 3 bones ), Bones in this case use to move in X, Z, rotate in only horizontal angle for the character.
Forums I tried:
IF you guys have any good tips and tricks for me to optimization even further, I would very glad :DD
server handling every movement of the characters and send the client the cframes, the client create fake characters ( using the server cframe to handle the fake one )
I see, the receiving issue is probably the fact the amount of cframes being sent to the client with remotes i assume.
I imagine what you could do is limit the amount of cframes being sent through depending on distance of the zombie from the client (Maybe better to raycast the zombie to the player and see if the player is capable of actually “seeing” it?)
I think also as an addition to that, entrust some of the zombies cframe movement to the client so its smoother and takes load off the networking?
I have, doesn’t change what I say about it, I’ve had issues where attempting to access a model unrendered due to streaming enabled caused my systems to error.
Instead of supplying the client with an entire raw cframe per npc, you can try bulking all outgoing cframes per frame into a single buffer and just fire that instead.
maybe send just the positions of the characters and then you can compute their direction on the client as angled from their last position to the current position with
Instead of simulating the NPCs on the server in real time, try sending the simulation instructions to the clients. Meaning, if the server wants an NPC to move somewhere, it’ll calculate the path and then send the path to all clients, and have each client simulate the NPC’s movement instead. This would help reduce bandwidth a lot, as the server only needs to communicate with clients when the NPC’s path changes.