Re: [Gambas-user] arithmetic operations on dates and times

2011-06-20 Thread Kevin Fishburne
On 06/08/2011 10:27 PM, Kevin Fishburne wrote: > Alright, I wouldn't bother the list but this is blowing my mind a little > bit. > > The date and time in the game world should start at an arbitrary point > and be modified by the system clock on the server and a scale value > ((timebase + timeserver

Re: [Gambas-user] arithmetic operations on dates and times

2011-06-09 Thread Jussi Lahtinen
I'm not sure I understand correctly, but this code adds one year to current date and prints it. Print Date(Year(Now) + 1, Month(Date), Day(Now), Hour(Now), Minute(Now), Second(Now)) But I don't know what is upper limit of accepted year. Maybe you want to use integer or even long variables instead

Re: [Gambas-user] arithmetic operations on dates and times

2011-06-09 Thread Caveat
Apologies if I'm missing something obvious here, or have maybe misunderstood the concept of 'scaling' the time... but wouldn't you need to account for your scale factor also in the client time calculation? So for your client to know what "now" is in the game world, you'd need server_time + (( Tim

Re: [Gambas-user] arithmetic operations on dates and times

2011-06-08 Thread Ian Haywood
On Thu, Jun 9, 2011 at 12:27 PM, Kevin Fishburne wrote: > How in the world would one do this? It's not really important that the > client know the actual date, but it does need to know the time. The > client should be able to add "Timer" to the game world time so it can > keep an accurate 24-hour

[Gambas-user] arithmetic operations on dates and times

2011-06-08 Thread Kevin Fishburne
Alright, I wouldn't bother the list but this is blowing my mind a little bit. The date and time in the game world should start at an arbitrary point and be modified by the system clock on the server and a scale value ((timebase + timeserver) * timescale = gameworldtime). So if the base time st