Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Wed Nov 27, 2024 11:06 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Calculating In-Game Time
PostPosted: Sat Mar 28, 2015 2:38 am 
Offline
Mortal

Joined: Thu Apr 14, 2011 10:26 am
Posts: 1252
SK Character: Rolf
http://www.shatteredkingdoms.org/time

Everyone knows about this time converter, right? It allows you to input a IRL time and converts that into in-game time. Useful for RP reasons.

What would be nice is a reverse converter - where you could enter the in-game time and it would give you an IRL time.

Make sense?


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Sat Mar 28, 2015 5:27 am 
Offline
Mortal

Joined: Wed May 02, 2012 4:58 am
Posts: 700
Location: Rolling in the Grave
SK Character: Gailehn, Stephanov
Opey wrote:
http://www.shatteredkingdoms.org/time" target="_BLANK

Everyone knows about this time converter, right? It allows you to input a IRL time and converts that into in-game time. Useful for RP reasons.

What would be nice is a reverse converter - where you could enter the in-game time and it would give you an IRL time.

Make sense?


Yes. The day the Zavijah Press opened in fact. I wanted it to be on a Day of Freedom. I did manage to use the website to reverse engineer this, but it was an unfun process.


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Sat Mar 28, 2015 8:04 pm 
Offline
Mortal

Joined: Fri Jun 07, 2013 7:11 pm
Posts: 1068
Location: Probably Camping Losache
SK Character: Arkex, Chronis, Azoreth, Kyln
We do need a function on the same page that will take the IC date and convert it to ooc.
If we're expected to stay IC with times, we should be able to quickly reference them.
Who created the first one? Was it a user or an Imm? Do we need someone to write the code for it?
Is there any way to put this on the "list of things to do" for the imms?
I know you're always hard at work. But I think this would be a good improvement.


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Tue Apr 21, 2015 1:11 am 
Offline
Gold Donor

Joined: Sat May 24, 2008 11:20 pm
Posts: 2109
Location: Edmonton, Alberta
I think it might be fun to try to create a solution to this problem!

From some careful probing and spam-calculating, I have the first hour of the first day of the first year to the second (one second earlier sends it to -1 T.A.):

Quote:
Requested time is August 10, 1990 18:05:15
Requested Game time is 12 o'clock am, Day of the Bull, Winter Wolf 1st, 0 T.A.


I'm going to work on some calculations using the specs in the help files (24 hrs/day, 7 days/week, 4 weeks/month, 12 months/year) and if it proves to be accurate through testing, should be simple enough to make a conversion from in-game to server to local time script.


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Tue Apr 21, 2015 6:44 am 
Offline
Mortal

Joined: Thu Apr 14, 2011 10:26 am
Posts: 1252
SK Character: Rolf
Keep up the good work! This would be a very helpful tool to the entire player base, and probably the immortals, too!


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Fri Apr 24, 2015 1:29 am 
Offline
Gold Donor

Joined: Sat May 24, 2008 11:20 pm
Posts: 2109
Location: Edmonton, Alberta
I'm trying Opey, but I have to admit I'm having a greater deal of difficulty doing this than I thought I would. Possibly because of my server host's slightly outdated version of PHP lacking some date/time features that would be very helpful, possibly because of the secrecy behind the existing script's calculations and access to the game itself, or both!

I just spent over 4 hours attempting to work this out. I believe I've made progress but there seems to be some hidden factor I can't anticipate that throws me off up to a couple hundred IC years every time.

Dulrik, you want to get the player base involved right? Could you give us the base calculations we need to make a simple script to calculate time from RL to IC and vice versa? Or at least let me know that August 10, 1990 18:05:15 is on the right track as a point of origin?


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Mon Apr 27, 2015 9:55 pm 
Offline
Gold Donor

Joined: Sat May 24, 2008 11:20 pm
Posts: 2109
Location: Edmonton, Alberta
Thought I'd post an update.

Largely thanks to some divine insight, I am nearly done!

RL to SK is complete and flawless as my testing and comparison to the existing time function on the website leads me to believe.

SK to RL I have to finish accounting for some temporal drift I seem to be encountering in my calculations, but is currently accurate to within 3.25 RL hours. I'd like to see that closer to the 3 min or less range before I call it complete and already have a good idea of how I can achieve that without risking any compounding drift.

Add in some cleanup / documenting of my script, and the fact I will not be working on it today (spending quality time with my wife on our first anniversary), I should have a testable version ready by Thursday.


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Tue May 05, 2015 1:04 am 
Offline
Gold Donor

Joined: Sat May 24, 2008 11:20 pm
Posts: 2109
Location: Edmonton, Alberta
May 20, 2026 10:05:15, that will be the first second of 2000 T.A.

Had a lot of little delays, a few setbacks, and it isn't much to look at yet, but I will safely call this the stable beta 1.0 for an advanced web-based time function for SK, and I'm ready to open it to the public for testing!

A few things to note:
1. Like the current RL to SK convertor, there should be a little allowance for clock drift. The server I'm hosting on is actually two time-zones away, but it should still be accurate within a few seconds of the original script.

2. RL to SK works the seconds portion when you press submit and the page loads, like the current one. The SK to RL calculator always jumps to 12AM. If you decide to cross-check the SK to RL result with the RL to SK convertor and it gives you a different day, wait around 15 seconds and re-submit your request, it should then be correct. To fix this I plan to aim all results for 1AM rather than exactly at 12AM which would eliminate the day jumping backward during a 15 second window.

3. Like the current script, you can enter just about any number in any field. I do plan to add data validation and better error handling later.

4. As mentioned earlier, it is not pretty. I will work on that later. Suggestions are welcome.

Here is the temporary link, I have a sub-domain link I will post when it propagates sometime within 48 hours. This link will be set to re-direct when that is done as well. Please let me know if you find any issues that need to be addressed.

http://viaticum.ca/sk-time.php

P.S. When the points above have been addressed, I may toy with some additional features, like a RL calendar that lists SK time info each day in some sort of meaningful way, like the year change, or your character(s) birthday(s). Or maybe a SK month calendar with RL time ranges from start to end of that month. All sort of customizable bonus time related stuff! Ideas are welcome.


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Tue May 05, 2015 8:03 am 
Offline
Implementor

Joined: Wed Feb 27, 2002 4:00 pm
Posts: 8220
Location: Redwood City, California
Super cool!


Top
 Profile  
Reply with quote  
 Post subject: Re: Calculating In-Game Time
PostPosted: Tue May 05, 2015 8:06 am 
Offline
Mortal

Joined: Wed Apr 29, 2015 6:32 pm
Posts: 22
Just to make sure I understand, is this a converter of real time using Pacific standard time? Or what was the basis of the conversion?

by the way, I think this is super awesome! Thanks for the work you did on it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group