How about storing the time of last use on a skill. Whenever a lookup function needed to display/use the value, it would just decide if it needed to recompute it first. Not exactly easy on the memory.. but then a design goal of 100 players wouldn't eat that much memory (120K or therabouts?) (300 skills x 100 players x longint) Has the advantage of only requiring cpu cycles when the value is directly referenced via the 'display skills' or 'use skills' portion of the code. --Mallory -----Original Message----- From: Walter Goodwin [SMTP:jgoodwin@expert.cc.purdue.edu] Sent: Wednesday, January 29, 1997 7:47 PM To: circle@cspo.queensu.ca Subject: [coding] Method of tracking skill usage. Been a while since I've been on this list :) In my drive to push my mud towards a skill based system, I came up with the idea (okay, I saw someone talking about it :) about skills degrading with disuse. My problem is, I can't seem to come up with a memory efficient way to do this. Also, I'm not sure how often this should be checked, I was thinking of adding a "PULSE_SKILL_DISUSE" that cycled through the online characters, and incremented and checked a counter for each skill, of course, this would increase the overhead on characters quite a bit, (I'm dreading adding yet another 300 element array.) I more or less wanted to hear from anyone else who has done something like this, and came up with something better. I don't need any actual code, just a general idea :) Jason Goodwin jgoodwin@expert.cc.purdue.edu +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+ +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST