A text Myst Online project

General debates and discussion about the Guild of Writers and Age creation

Re: A text Myst Online project

Postby Acorn » Wed Sep 25, 2013 6:09 am

KathAveara wrote:If all goes to plan, which /eval suggests it will, head down anytime in the nest 25 hours. Better sooner than later.


Drat, visited twice but missed the eclipse* :oops: - and missed your reply, because the forum logged me off without my realising, and I didn't spot there were unread messages :evil: I hate it what that happens!

Do remind us when the next one is due!

*edited to make clear what I was on about!
Image
Acorn
 
Posts: 724
Joined: Sun Feb 26, 2012 9:56 am

Re: A text Myst Online project

Postby belford » Wed Sep 25, 2013 8:03 am

Rather, you need the waking timer to behave as though the timer had been running while asleep.


This is the right trick.

(Also correct that datetime.now is not a database property.)

Look at the http://seltani.shoutwiki.com/wiki/Fuel_Runs_Down code sample to see how I handled Goldspring. There's a timer that runs every ten minutes while the instance is awake. It also runs at on_wake time, and immediately computes the correct current value, so that the newly-arrived player sees the right state.

(Since the fuel generator in Goldspring drops one notch every 30 minutes, a check every ten minutes is plenty sufficient.)

I realize this sleep/wake architecture is a nuisance, but it ensures that the server load stays low.

I'll try to write up a simpler code sample for a day-night cycle. The Fuel_Runs_Down is slightly more complicated than that, because the start point of its "day" is the moment somebody presses the "fill" button.
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby KathAveara » Wed Sep 25, 2013 9:16 am

That was a typo. I meant to say that it is *in* a property.
Moula KI: 17967159
DI KI: 00205116
deviantART: kathaveara
tumblr: kaththedragon

Grand Master of the Guild of Linguists
KathAveara
 
Posts: 79
Joined: Mon Jun 10, 2013 2:29 am

Re: A text Myst Online project

Postby KathAveara » Fri Sep 27, 2013 12:42 pm

How does one actually use players.player(player)?
Moula KI: 17967159
DI KI: 00205116
deviantART: kathaveara
tumblr: kaththedragon

Grand Master of the Guild of Linguists
KathAveara
 
Posts: 79
Joined: Mon Jun 10, 2013 2:29 am

Re: A text Myst Online project

Postby belford » Fri Sep 27, 2013 10:10 pm

You might say, in one bit of code,

Code: Select all
prop = ObjectId(player)


And then in another:

Code: Select all
_player = players.player(prop)


_player would then refer to the player object you started with.
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby KathAveara » Sat Sep 28, 2013 2:03 am

Is there a way to use it if you don't know the player's ObjectID?
Moula KI: 17967159
DI KI: 00205116
deviantART: kathaveara
tumblr: kaththedragon

Grand Master of the Guild of Linguists
KathAveara
 
Posts: 79
Joined: Mon Jun 10, 2013 2:29 am

Re: A text Myst Online project

Postby belford » Sat Sep 28, 2013 8:48 am

No. All references to a player must originate from code (the player global, players.list(), etc) or from word-of-mouth (you type /playstate and copy down your objectid).

I don't want a way to look up players by email (email addresses should be private) or by name (I think eventually there will be a way to change your avatar name, so hard-coding references to names is a mistake).
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby Pavitra » Tue Oct 08, 2013 6:43 pm

(The ending has not yet been written. This thread continues here.)
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron