View Single Post
Old July 29th, 2010 (6:07 PM).
Full Metal's Avatar
Full Metal Full Metal is offline
C(++) Developer.
  • Silver Tier
Join Date: Jan 2008
Location: In my mind.
Age: 22
Gender: Male
Nature: Timid
Posts: 806
Originally Posted by colcolstyles View Post
You could do it but it wouldn't be easy. When the player sets the time on the clock in-game, an offset between the system time (what is read from the RTC) and the time entered by the player is calculated. Whenever the game needs to access the time again, it first reads the time from the RTC (which is the time on your computer) and then uses the offset to figure out what time it really is. If you created a clock script, you could compare the time that the player entered with the system time, calculate the difference, save it somewhere, and then, whenever the player accesses the time again, add the offset to the system time.

Pragmatically, though, it would be best to simply use the system time. Unless the player lies and enters some different time during the clock script, the two should be very similar.
What about flash cards?
I'm pretty sure that gba's don't have an in-built clock do they?

★ full metal.

I like to push it,
and push it,
until my luck is over.