How does games with a lot of entities that spawn like Tower Defense Games reduce server lag?
Any tips will help.
How does games with a lot of entities that spawn like Tower Defense Games reduce server lag?
Any tips will help.
By offloading rendering off to the client, you can reduce server workload significantly:
I.e; construct npc appearance on the client and leave the server with just the root part. Handle the effects such as bullets, explosions, etc. with a remote call that tells the client to render those things.
The client is the one who is going to be in-charge of all the rendering anyway, and only they end up actually seeing your effects. Therefore it makes the most sense to just have the client do all of it for optimal server (and client) performance.
ooh. Here comes client replication.
okay it’s actually pretty simple. Let’s say you wanna fire a bullet, and If you lag, you still see it move. So follow my steps
If you want a more secure one, this one’s tricky, you gotta like kind of time it and do it as fast as possible
This way, even if the exploiter modify localscript, bullet will still move but depending on server ping. So exploiter will regret deleting localscript as all what it does is lag him.
You could do this with other stuff too, like actual moving doors etc.
Hope this helped