LAN Time synchonize function

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
su27
Posts: 10
Joined: 26.08.2010
With us: 14 years 2 months

LAN Time synchonize function

Post #1by su27 » 25.09.2010, 15:28

The attachment is the LAN time synchonize function I've wrote.
You can copy it to the source code of Celestia 1.6.0

You can set the server or client state (whether it's a client or a server, what's the port and IP address)
of a Celestia instance in clientlist.txt, or in the Time menu (should disable locale first).

(1)I've disabled the key from '1' to '0',and 'a' to 'z' in celestiacore.cpp
(2)Instead, if you press '1' in the "server Celestia". The "client Celestia" will first do time synchonize operation ,then execute the script "scripts\1.celx".
The other key '1' to '0',and 'a' to 'z' also work in this way.

I think though the program is simple,but it's useful for distributed exhibition.
Suppose you have 3 computer,each with a wide screen, and they are in the same LAN network,run the same scene or data, or even different.

When you press a key in the server Celestia, they will first synchonize time,then run the same or different celx script.
If the script is speedup or speeddown, they will also run together.
Then it's very useful,So enjoy it. :lol:

Topic author
su27
Posts: 10
Joined: 26.08.2010
With us: 14 years 2 months

Re: LAN Time synchonize function

Post #2by su27 » 25.09.2010, 15:34

I think the time sychonize function must be called by key pressed,

if called from Menu, there will be lag of time, merely a few seconds. :D

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Re: LAN Time synchonize function

Post #3by Joe » 19.07.2011, 13:33

su27 wrote:You can set the server or client state (whether it's a client or a server, what's the port and IP address)
of a Celestia instance in clientlist.txt, or in the Time menu (should disable locale first).

Does this mean Celestia loses its i18n feature?

su27 wrote:(1)I've disabled the key from '1' to '0',and 'a' to 'z' in celestiacore.cpp
(2)Instead, if you press '1' in the "server Celestia". The "client Celestia" will first do time synchonize operation ,then execute the script "scripts\1.celx".
The other key '1' to '0',and 'a' to 'z' also work in this way.

Is it really needed to disable '1' to '0' and 'a' to 'z', why? For instance, if I press 'L' to increase time scale at the server, I would hope the client response with the same timescale. If 'L' is disabled, what does the server or client do?
Joe
8O


Return to “Development”