[Discuss] Adventure Feature request
Ullrich Jans
ujans at ullisys.pond.sub.org
Sat Jan 6 02:18:12 CET 2007
Tom Vogt wrote:
>> If they have been hunted down, or they moved, or it rained on the
>> tracks, you can remember the location all you want, you won't find them.
>
> Problem is: Right now I only check if the location string is valid. This
> would require me to store a list of all location strings that used to be
> valid during the past, say, 24 hours or so.
Is it that difficult? A simple DB table with a timestamp, the region and
the string, with possibly a combined index of timestamp and string
should do it...
How do you track the validity of the strings right now? Is the timestamp
coded in?
What number of hashes are we talking about?
*thinks* You could step through the list and do something like delete if
rand()>1/((time(now)-time(string))/1800)...
That way, you have a 50% chance to delete the strings after one hour,
75% after 2 hours, etc.
Would that be a performance problem? Anyway, if a location string is no
longer in the DB, it's no longer valid - and the strings an adventurer
remembers are a completely different beast... at that point, you don't
have to check for validity... if it has expired already, too bad, the
monsters moved. If the player entered the string from a piece of paper
beside his keyboard, well - he mis-remembered... ;-)
Best regards,
Ulli
--
Ullrich Jans Eichenstrasse 4
Tel: +49 89 74427834 82024 Taufkirchen
eMail: ujans at ullisys.pond.sub.org IRC: RealUlli
--
Unsubscribing and other list options:
http://news.battlemaster.org/cgi-bin/mailman/listinfo/discuss
More information about the Discuss-moderated
mailing list