Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Real-Time System
#13
Matt Wrote:Store it to memory. What if the server crashes?

Then, where will time start? From the begining?

I don't like that. Which is why I wrote it to an ini to start.

I could easily write to memory if I want. I say, waste the CPU, it'll make the server more professional.

if you're talking about a whole date system working from the time system in game just make it save every 1 hour instead of 1 minute, it's not like people are gonna be complaining about a time being slightly wrong since they probably lost a load of time they were playing due to it crashing

my game server hasn't crashed once since 1.0's release (excepting a few minor tweaks first of all, naturally), so if your server's crashing all the time you got some serious issues you need to address

however, if you're doing like MT is... i.e. the game time is the time at the server (or can be set via a .ini to offset it for timezone you want), all you need to do is have a timer run ever 1000ms, which gets the time from the system clock.... then every 1 hour it checks for any changes in light and weather etc

if you want it to show the time client side, when the player logs in make it send the HH MM SS to the client and let the gameloop update a clock on the client Tongue
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)