Author Topic: In-game date and time (re-post)  (Read 3184 times)

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
In-game date and time (re-post)
« on: December 20, 2009, 11:16:09 pm »
This is a re-post of In-game date and time, which has been removed for unkown reasons.

I propose to compute in-game date and time based on real-life date and time. See this example application and the quick and dirty code example below.

Code: [Select]
<html><head><title>
Planeshift Time Converter
</title></head>
<body>
<center><h1>Planeshift Time Converter</h1></center>
<?php
$requestYear 
$_POST['requestYear'];
$requestMonth $_POST['requestMonth'];
$requestDay $_POST['requestDay'];
$requestHour $_POST['requestHour'];
$requestMinute $_POST['requestMinute'];

$currentTime time();

# see http://pswiki.xordan.com/index.php?title=Yliakum_Calendar

# 60/6 = 1 minute
$minute 10;
# 60*60/6 = 600 = 1 hour
$hour 600;
# 60*60*24/6 = 14400 = 1 day
$day 14400;
# 60*60*24*32/6 = 460800 = 1 month
$month 460800;
# 60*60*24*32*10/6 = 4608000 = 1 year
$year 4608000;

#We assume that 1st of January 1970 00:00:00 GMT is the beginning of year 750 Yliakum time.
$yearoffset 750# can be changed if another zero year than 1970 is desired

# to test the script with the real time uncomment the following lines
# note, however, that there is a +-3 minutes error because of the estimated duration of a year in seconds
#$minute = 60;
#$hour = 3600;
#$day = 86400;
#$month = $day * 365.25 / 12;
#$year = 60*60*24*365.24249;
#$yearoffset = 0;


$yliakumYear    floor($currentTime $year $yearoffset);
$yliakumMonth   floor(($currentTime $year) / $month) + 1;
$yliakumDay     floor(($currentTime $year $month) / $day) + 1;
$yliakumHour    floor(($currentTime $year $month $day) / $hour) + 1;
$yliakumMinute  floor(($currentTime $year $month $day $hour) / $minute) + 1;

if ((
$timestamp strtotime("$requestYear-$requestMonth-$requestDay $requestHour:$requestMinute:00")) === false) {
    
$resultYear "NA";
    
$resultMonth "NA";
    
$resultDay "NA";
    
$resultHour "NA";
    
$resultMinute "NA";
} else {
$resultYear    floor($timestamp $year $yearoffset);
$resultMonth   floor(($timestamp $year) / $month) + 1;
$resultDay     floor(($timestamp $year $month) / $day) + 1;
$resultHour    floor(($timestamp $year $month $day) / $hour) + 1;
$resultMinute  floor(($timestamp $year $month $day $hour) / $minute) + 1;
}


?>


<form action="PStime.php" method= "POST">

<table style="text-align: center; width: 1024px; margin-left: auto; margin-right: auto; background-color: rgb(128, 128, 128);" border="2" cellpadding="2" cellspacing="1">
<tbody>
<tr>
<td style="width: 100px;"><span style="font-weight: bold;"><br></span></td>
<td style="width: 50px;"><span style="font-weight: bold;">Year</span></td>
<td style="width: 50px;"><span style="font-weight: bold;">Month</span></td>
<td style="width: 50px;"><span style="font-weight: bold;">Day</span></td>
<td style="width: 50px;"><span style="font-weight: bold;">Hour</span></td>
<td style="width: 50px;"><span style="font-weight: bold;">Minute</span></td>
<td style="width: 50px;"></td>
</tr>
<tr>
<td><?php echo "Current server time" ?></td>
<td><?php echo date('Y'?></td>
<td><?php echo date('n'?></td>
<td><?php echo date('d'?></td>
<td><?php echo date('H'?></td>
<td><?php echo date('i'?></td>
</tr>
<tr>
<td><?php echo "Current Yliakum time" ?></td>
<td><?php echo $yliakumYear ?></td>
<td><?php echo $yliakumMonth ?></td>
<td><?php echo $yliakumDay ?></td>
<td><?php echo $yliakumHour ?></td>
<td><?php echo $yliakumMinute ?></td>
</tr>
<tr>
<td>Real-Life time request</td>
<td>
<input type="text" name="requestYear" size="4" value="<?php echo $requestYear ?>" />
</td>
<td>
<input type="text" name="requestMonth" size="2" value="<?php echo $requestMonth ?>" />
</td>
<td>
<input type="text" name="requestDay" size="2" value="<?php echo $requestDay ?>" />
</td>
<td>
<input type="text" name="requestHour" size="2" value="<?php echo $requestHour ?>" />
</td>
<td>
<input type="text" name="requestMinute" size="2" value="<?php echo $requestMinute ?>" />
</td>

<td><input type="submit" name="Convert" value="Convert" size="1" maxlength="1" /></td>

</tr>
<tr>
<td><?php echo "Yliakum time request result" ?></td>
<td><?php echo "$resultYear<br>" ?></td>
<td><?php echo "$resultMonth<br>" ?></td>
<td><?php echo "$resultDay<br>" ?></td>
<td><?php echo "$resultHour<br>" ?></td>
<td><?php echo "$resultMinute<br>" ?></td>
</tr>
</tbody>
</table>
<br>
<a href="http://pswiki.xordan.com/index.php?title=Yliakum_Calendar">Yliakum Calendar</a><br>

</body>

Xillix Queen of Fools

  • Veteran
  • *
  • Posts: 1876
    • View Profile
Re: In-game date and time (re-post)
« Reply #1 on: December 21, 2009, 05:25:11 am »
This post is permitted, don't lock.

Illysia

  • Forum Addict
  • *
  • Posts: 2774
    • View Profile
Re: In-game date and time (re-post)
« Reply #2 on: December 21, 2009, 06:39:31 am »
I like the time part :thumbup: but not the date, then I'd have to RP my characters aging!  :o  ;D

Sarras Volcae

  • Veteran
  • *
  • Posts: 1325
    • View Profile
Re: In-game date and time (re-post)
« Reply #3 on: December 21, 2009, 07:53:00 am »
isn't time frozen or something?

Akkaido Kivikar

  • Hydlaa Notable
  • *
  • Posts: 726
    • View Profile
Re: In-game date and time (re-post)
« Reply #4 on: December 21, 2009, 08:19:09 am »
I like the time part :thumbup: but not the date, then I'd have to RP my characters aging!  :o  ;D

afaik you wouldn't... even so, six years aging per year... not much.

Illysia

  • Forum Addict
  • *
  • Posts: 2774
    • View Profile
Re: In-game date and time (re-post)
« Reply #5 on: December 21, 2009, 10:24:43 am »
afaik you wouldn't... even so, six years aging per year... not much.

I've had illysia for the last 4 to 5 years.... that adds up as she was 18 years old to begin with.  ;) If you play long enough, progressing time presents interesting issues.

Idoru

  • Hydlaa Notable
  • *
  • Posts: 981
    • View Profile
Re: In-game date and time (re-post)
« Reply #6 on: December 21, 2009, 10:39:35 am »
Some enkidukai would be getting close to death if dates and ageing were implemented. A 6 (RL) year old character starting out as 20 would now be 56 and coming to the maximum lifespan. I could see some oldbies getting quite upset at having to delete themselves.

"May there only be peaceful and cheerful Earth Days to come for our beautiful Spaceship Earth as it continues to spin and circle in frigid space with its warm and fragile cargo of animate life."

bloodedIrishman

  • Guest
Re: In-game date and time (re-post)
« Reply #7 on: December 21, 2009, 12:01:56 pm »
afaik you wouldn't... even so, six years aging per year... not much.

I've had illysia for the last 4 to 5 years.... that adds up as she was 18 years old to begin with.  ;) If you play long enough, progressing time presents interesting issues.

Yeah, it does. Right now it's more or less how someone wants to roleplay their age. I've had one character for 3+ years, but hes only aged seven cycles since I started him at nineteen cycles. It's iffy.

Some enkidukai would be getting close to death if dates and ageing were implemented. A 6 (RL) year old character starting out as 20 would now be 56 and coming to the maximum lifespan. I could see some oldbies getting quite upset at having to delete themselves.

Exactly.

usastCity

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
In game date and time re post
« Reply #8 on: December 24, 2009, 12:32:54 am »
I dont know if it would be short term or not? It could be I dont know? Just had a random thought and threw it out there. I guess it depends on what the each person likes. However would people use it if it were there? Would they like it or would they play a game and never play it again? Or would they play the games frequently? I dont know? However it would not be something that would draw people in. So I guess yeah it would be short term.

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
Re: In-game date and time (re-post)
« Reply #9 on: December 25, 2009, 11:43:29 pm »
This is not about discussing if the 6/1 ratio of in-game and RL time suits you. The faster in-game time is a fact. This is about how to implement it.

novacadian

  • Hydlaa Notable
  • *
  • Posts: 962
    • View Profile
Re: In-game date and time (re-post)
« Reply #10 on: August 29, 2010, 03:52:53 pm »
This is not about discussing if the 6/1 ratio of in-game and RL time suits you. The faster in-game time is a fact. This is about how to implement it.

Although my personal leaning is to recognise game time; it is also my preference that when one speaks of Game Time they are speaking of it IC. Time is an element; which in my gaming experience, has been employed in table role playing worlds of greater consequence. To employ it on PS would bring it to the level of software development that we had dreamed of in the early days of my introduction to Role Playing and computers.

Anyway, in my opinion, what is being overlooked in many of the threads concerning the Game Time Caleder is that it should not tick to the heartbeat of the player but the character. That is to say that while the character is being played (on line, at the table,etc.) that time is passing according to the heartbeat of the character.

There can then be an official Current Game Time yet each character would be somewhere along the time line, situated at the Game Time that was current when they logged off.

In one table role play world in my playing experience the Current Game Time ticks along at a predictable real world ratio; as does PS'. The first order of business when first taking a character out for a stroll in that world is to bring the character up to Current Game Time. In that way any PC to PC interaction is done in Current Game Time. This catch up period is used to develop characters. It is there one gets to use Experience Points to train in skills, exercise, etc..

PS developers might consider recognising this use of PS game time by allowing the option to simply exercise for the time since last logging in to the Current Game Time. This would also put a great real time restraint on such stats development.  More discussion on stats development can be found on this thread.

As to ageing and possible death of character; one solution done in the rpg world mentioned above is to have one tree which produces golden apples of immortality. Needless to say they are a highly saught after item.

- Nova

[ Edit - Removed duplicate link.]
« Last Edit: August 29, 2010, 04:07:18 pm by novacadian »