Implementing a Dynamic time system.
Posted: Tue Oct 14, 2008 7:47 pm
After looking at the seemingly day/night system implemented in the game, I got a sudden inspiration for this.
How about separating the brightness of the world into sections?
In xen, there's sections that are like 50x50 tiles or so.
The brightness of each "sector" could be dependant on the "server time" with the adjustment depending on which the sectors independently...
The time would all be the same for sectors vertically, but it'd be changed by sector horizontally, kind of like the real world.
Near the center of the map, there can be the "sundial clock" that actually shows which time it is, by a shadow or something...
If the "server time" is dependant on a 255 number, and there's 20 sectors from left to right... then 255 / 20 = 12.75.
This figure is based on time cycling from west to east.
If the 10th sector's time is currently 100, then sector 9's time would be 87.25.
128 = Noon
255 = Right before midnight
0 = Midnight
(Times)
20th Sector: 127.50
-
12th Sector: 125.50
11th Sector: 112.75
10th Sector: 100.00
9th Sector: 87.25
8th Sector: 74.50
-
2nd Sector: 253.00
1st Sector: 240.25
With how this can be handled, it doesn't seem too hard to implement... considering there can be the "server time" and each sector horizontally would adjustment...
How about separating the brightness of the world into sections?
In xen, there's sections that are like 50x50 tiles or so.
The brightness of each "sector" could be dependant on the "server time" with the adjustment depending on which the sectors independently...
The time would all be the same for sectors vertically, but it'd be changed by sector horizontally, kind of like the real world.
Near the center of the map, there can be the "sundial clock" that actually shows which time it is, by a shadow or something...
If the "server time" is dependant on a 255 number, and there's 20 sectors from left to right... then 255 / 20 = 12.75.
This figure is based on time cycling from west to east.
If the 10th sector's time is currently 100, then sector 9's time would be 87.25.
128 = Noon
255 = Right before midnight
0 = Midnight
(Times)
20th Sector: 127.50
-
12th Sector: 125.50
11th Sector: 112.75
10th Sector: 100.00
9th Sector: 87.25
8th Sector: 74.50
-
2nd Sector: 253.00
1st Sector: 240.25
With how this can be handled, it doesn't seem too hard to implement... considering there can be the "server time" and each sector horizontally would adjustment...