SA-MP Forums Archive
Suggestion for change in script system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: General (https://sampforum.blast.hk/forumdisplay.php?fid=13)
+--- Thread: Suggestion for change in script system (/showthread.php?tid=266258)



Suggestion for change in script system - RSX - 04.07.2011

I think that to get more and higher performance in every sa-mp server, OnPlayerUpdate should be handled in way other manner. Maybe on separate thread, but basically, my intention is, for future versions, have OnPlayerUpdate separated, and basically let server continue on other thread. For example, let's consider you have a code that may work a second, to get the result. Now in normal case, it would just freeze the server, but if we separate player updates in other scripts or manner, we may allow the server to work FASTER. Another example - commands. Seriously on some servers it has been awful experience of server speed in cases of using commands.

For now, it may be possible to implant that into simple code + plugin. But in future, I'd say it should be like :

When player information updates:
Sa:Mp calls Checking scripts and then callbacks.
1.Checking scripts and callback codes work in the same time.
2.Checking scripts may call callbacks or functions.

That should give closer client side script experience.


Re: Suggestion for change in script system - linuxthefish - 04.07.2011

OnPlayerUpdate is always misused...


Re: Suggestion for change in script system - Rysoku - 04.07.2011

This is a great idea! +support


Re: Suggestion for change in script system - Donya - 04.07.2011

Seems good. if it helps, i support.


Re: Suggestion for change in script system - RSX - 05.07.2011

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
OnPlayerUpdate is always misused...
Well but there are cases when there's a lot of stuff to do in this callback, and it's not by mistake, for example, high precision drifting script, or car speed booster. (They may and do involve float functions, which are slow enough to slow down server). Anyone from sa-mp developers want to comment on this?


Re: Suggestion for change in script system - RSX - 07.07.2011

So is there a chance of having this integrated into sa-mp?