Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 868 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
get server time on client #279815
07/19/09 13:10
07/19/09 13:10
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
Hello conitec,
(how) is it possible to access the server time on the client sent by the command SVC_TIME in lite-c?

and in which format is the time stored?

Thank you
Scorpion

Re: get server time on client [Re: Scorpion] #279969
07/20/09 09:22
07/20/09 09:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The SVC_TIME content is internally used, and not directly accessible through a lite-C variable.

Re: get server time on client [Re: jcl] #279981
07/20/09 10:48
07/20/09 10:48
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
It would really come in handy for me to use it, because so I wouldn't have to send my own time information over the network and cause unneeded traffic.
If I correctly understood it, the network messages go through the same event handler as normal window-messages, so i can get it by an own message handler ScanMessage()?

Re: get server time on client [Re: Scorpion] #279994
07/20/09 12:56
07/20/09 12:56
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, the network messages go through a different message handler. SVC_TIME does not send a real time, it sends a clock value for dead reckoning. What for do you need the server time? If it's for the time of the day or the time of the game, you need to send it through a variable.

Re: get server time on client [Re: jcl] #280098
07/20/09 23:15
07/20/09 23:15
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I would need it for dead reckoning (which is not controlled by the entitys position, angle, etc, but by the keyboard inputs of the client), too, to correct moves in the past.
Then I'll try to send some kind of time offset from gamestart or something similar to control it. shouldn't probably not make such a great difference in traffic (and as a mp-newbie i probably waste enough of it in other parts of my code)

Re: get server time on client [Re: Scorpion] #280153
07/21/09 07:05
07/21/09 07:05
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, we'll then implement a variable for this.

Re: get server time on client [Re: jcl] #280264
07/21/09 20:58
07/21/09 20:58
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
Thanks =D


Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1