Question.
I cannot remember if a script executes on the trueServe computer, or the client's computer.
Is it possible to control that?
Reason I am asking is this. If we can force a script to execute on the server, then that script can have a For loop
in it, which does nothing: for (x = 0; x < 10000; x++ ) { ;; }
which could serve as a replacement for a timer or paused activity loop.
Every client (visitor) sees the script execute at the same rate then.
does script execute on server or client?
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
does script execute on server or client?
-
3dvisuals dude
- Chief Warrant Officer
- Posts: 643
- Joined: 03 Jun 2009, 02:53
- Type the number ten into the box: 0
Re: does script execute on server or client?
We tested this concept of server-side versus client-side scripting a lot together you and I and Norm back when you were working so hard on the MySql Database Integration with trueServe in 2007-8froo wrote:Question.
I cannot remember if a script executes on the trueServe computer, or the client's computer.
Is it possible to control that?
Reason I am asking is this. If we can force a script to execute on the server, then that script can have a For loop
in it, which does nothing: for (x = 0; x < 10000; x++ ) { ;; }
which could serve as a replacement for a timer or paused activity loop.
Every client (visitor) sees the script execute at the same rate then.
Scripts can and in many cases should be run Server-side in order for all present to reap the benefits versus one computer reaping them while another computer present may not. Also of course some scripts involve security issues requiring that they be run Server-side.
Remember we would think them through together and discuss them, you would write a modification accordingly and submit it to Norm who had Server Admin priveleges to add the modifications to the Server, which we were unable to do.
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: does script execute on server or client?
Ah ok. thanks 3dv! It's been a loooong time since I was working with scripts. I was working on plugins
for quite some time there.
for quite some time there.
-
3dvisuals dude
- Chief Warrant Officer
- Posts: 643
- Joined: 03 Jun 2009, 02:53
- Type the number ten into the box: 0
Re: does script execute on server or client?
yeah i know how it gets... we all get our grey-matter so engrossed in a complicated field of endeavor over an extended period of time, and before you know it we forget our own names, lol.froo wrote:Ah ok. thanks 3dv! It's been a loooong time since I was working with scripts. I was working on plugins
for quite some time there.
I think Norm placed the server side stuff so high in the scenegraph that no one else could access them.
-
noko
- Senior Chief Petty Officer
- Posts: 170
- Joined: 24 May 2009, 04:16
Re: does script execute on server or client?
Having a consistent timing event (timer) that is part of all scenes when one is connected I would think would allow animated shaders, mechanical type devices (like wind mills, machines, orbits etc.) to be consistent. Now couldn't the server just update the client timer periodically to ensure everyone is in sysnc plus to minimize net traffic? For example server sends out timing point every 5 seconds while the client timer does all the in betweens.
-
Cayenne
- Chief Petty Officer
- Posts: 119
- Joined: 03 Jun 2009, 20:05
- Type the number ten into the box: 0
- Location: U.K.
Re: does script execute on server or client?
in the Activities My Activities , theres an object Vladimir wrote called Windmill .
I dont know exactly how to use it but as far as i know it is able to detect whether a script is execution on the server or client or local , it might help to look at the object and get some understanding , it might be useful to use to debug scripts running locations , Im also not sure if it has a SS specific timer inside it either.
I dont know exactly how to use it but as far as i know it is able to detect whether a script is execution on the server or client or local , it might help to look at the object and get some understanding , it might be useful to use to debug scripts running locations , Im also not sure if it has a SS specific timer inside it either.
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: does script execute on server or client?
Ok thanks Cayenne. 
-
3dvisuals dude
- Chief Warrant Officer
- Posts: 643
- Joined: 03 Jun 2009, 02:53
- Type the number ten into the box: 0
Re: does script execute on server or client?
Somewhere on my other computer I still have many of those old scriptorium (pre-Beta) scenes saved still, including a few where you and Norm were experimenting with serverside database scripts. Maybe i can dredge up some useful tidbits from those. 