• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Suggestion] Client-side Scripts
#1
Client-side Scripts

[Image: zXSrDGv.png]



A feature?that I discussed on Discord.

I think it would be an extremely useful feature, once the?open.mp team starts?working on the client.

This would have a lot of advantages, including optimization by removing the useless?amount of traffic sent between the server and the client, and a better responsiveness.



See the speedometer example in the image above. In a normal SA:MP server, the server is continuously asking the client for his velocity, the client answers, then the server tells the client to redraw the text draw, and so on. This forces the developer to be careful of how often to update the text draw, based on how many players does the server usually have, in order not to slow everything down.



Instead, if the server uploads a (compiled) script to the client upon the first connection, in a similar way to how 0.3DL models are uploaded, and then is able to tell the client when to start and stop its execution, then the speedometer example above can be made in a much more effective ways: the client itself, which knows its own vehicle speed, draws its own text draw as defined by the script, as many times per seconds as the developer wants. This creates a better responsiveness at zero bandwidth cost.
  Reply


Messages In This Thread
Client-side Scripts - by Sasino97 - 2019-04-19, 05:20 PM
RE: Client-side Scripts - by Josh - 2019-04-19, 05:25 PM
RE: Client-side Scripts - by Sasino97 - 2019-04-19, 05:36 PM
RE: Client-side Scripts - by Josh - 2019-04-19, 05:39 PM
RE: Client-side Scripts - by Sasino97 - 2019-04-19, 05:55 PM
RE: Client-side Scripts - by Josh - 2019-04-19, 06:00 PM
RE: Client-side Scripts - by Sasino97 - 2019-04-19, 11:54 PM

Forum Jump: