SetTransmit on entities
Re: SetTransmit on entities
Definitely an improvement, but it still lags with too many people (after 6 real players, bots apparently take it more nicely) and especially if you are making a plugin that tries to hide everyone because then you have to do same (make_object again) with edict = CheckTransmitInfo._obj(args[1]).client and index_from_edict etc..
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: SetTransmit on entities
Yeah well, like I said earlier, the performance of make_object are acceptable and you really don't gain a lot by not using it. I just responded to your concerns about the possibility of optimizing it. If your server lags with 6 players, then that is definitely not caused by make_object. Also, _obj is as fast as it can get; it simply cast the address and return it.velocity wrote:Definitely an improvement, but it still lags with too many people (after 6 real players, bots apparently take it more nicely) and especially if you are making a plugin that tries to hide everyone because then you have to do same (make_object again) with edict = CheckTransmitInfo._obj(args[1]).client and index_from_edict etc..
Re: SetTransmit on entities
I guess you are right, thanks for the optimization it helped a lot.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: SetTransmit on entities
velocity wrote:I guess you are right, thanks for the optimization it helped a lot.
I've been running some tests locally with 19 bots by running the code you posted on GitHub and while the net_graph was bouncing red sometimes, I didn't notice any "lags" whatsoever while playing. I've also joined some of the most populated servers and some of them were very high but the game-play was still very smooth:
A hook to set_transmit is brutal, to be honest. After some testing, on de_nuke with 19 bots and myself playing normally, the hook is called ~1300 times every frame. When we say that tick listeners are hungry, this is like having 1300 of them in the same plugin.
There are a lot of way you can optimize your implementation. Just to name a few; caching, learning, and exiting early. I can help you to find and implement better approach assuming you are willing to share very specific details of what your goal is.
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 94 guests