Today i played bot commander and i’m curious how is it done that they made all of those bots commands and stuff not lag the game, any ideas?
I would guess they make you controll the bots with a local script meaning it has minimal effect on server side performance and I don’t think there’s any reason a somewhat decent device can’t controll their own bots, not sure if Im correct or if this answers what you’re asking for
seems to easy, usually games require complex math and stuff to optimize bots, especially when bots commander can handle 600 bots shooting, moving and charging at the same time, which is impressive, idk if they use client to handle bots, maybe rendering, but idk
Never played. But the goal is to reduce as much network traffic and as much processing as possible.
Let’s start with processing.
Remove it from physics by anchoring it and directly moving if possible.
Simplify the model on the server by making it representative. One part, or ideally none if you are comfortable with the whole client sync data thing. Reduce update rate for models and reduce calls for complex calculations like pathfinding (and cache results, bonus points for caching partial paths on a shared grid to speed them all up)
As for networking
Rate limit (send only a few updates per second per bot max, and none if not updating)
Pack the data into an optimized structure (this is complex but basically normal positions use 32 bits per axis. So you get 96 bits from a single vector3 (I think, don’t necessarily know this to be entirely true). You can however use known information to simplify the problem to represent positions with far less data. There are some posts about this specifically here on the forums, but don’t know any off the top of my head.
I’m sure there are many others (parallel luau comes to mind), but these already get you to a pretty crazy level if you implement them all.
thx, i also though about reducing network traffic but problem is syncing client and server, yk players should have accurate positions of each NPC, sending less data is nice and i can use buffers for this, hard-coding in this situation isn’t that bad if it reduces network few times, thx for suggestion