Re: [Circle] [LAG] Priority ageing, optimization, ... ?

From: Eric Green (egreen@marit.cypronet.com)
Date: 08/23/96


> Just the other day I was talking to a co worker who was working on a mud
> about the time Jeremy Elson was finishing Circle for the first time, He
> said he had talked to him aobut it. But we talked about every thing anyone
> could possible cover (briefly) in about an Hour i think. On of the things
> he had mentioned was redesigning a mud to using message ques rather than
> the waay it is done now. He said in the mud he did this with the increase
> in speed was tremendous and very well worth it. To answer a few other
> topics talked aobut earlier (multi attacks) he had added a timming variable
> in with the que's so that he no longer had to worry about multi attacks.
> (i.e. fido attcks every 2 secs and you attack every 3 secs. you attack fido
> fiso attacks you 2 secs fiso attacks you you attack fiso 1 sec later
> another sec fiso atacks you the 2 secs later you both atack each other. :)
> He said this caused a stagger effect that which added realism. You can also
> alow dex to adjust this time and add the time to every thing like spells
> actions skills (i.e. the dig command and TinTin probs would be solved). I
> just thought this may be an appropiate ssubject to bring up and hope
> someone finds it useful.
> 
> I am just wondering why something like this didn't take along time ago???

It sounds like Jeremy might have been talking about using an event queue
here.

Doing a rough calculation, i figured it probably was more efficient to
eliminate regening hp/mana/move once per tick (the way its done now)
and using events to regen one point at a time.

An event system would be a nice a nice feature to be added to circle, since
events can add a lot to muds beyond improved efficiency.

As for combat based on events, where each player can attack once ever X
pulses, and attacks are interleaved, it has been done before.  However, i've
found most people don't like this, because they feel its too spammy
or too "laggy", depending on when you send a new prompt.

Eric
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+


From cat@vuse.vanderbilt.edu Fri, 23 Aug 96 14:56:26 -0500
X-SystemInfo: MyE-Mail: EMail
X-ReplyTo-No: 4013 (There are no more replies.)
X-Message-No: 4017 (database)
From: Katzlberger Thomas <cat@vuse.vanderbilt.edu>
To: circle <circle@cspo.queensu.ca>
Subject: Re: [Circle] [LAG] Priority ageing, optimization, ... ?
Date: Fri, 23 Aug 96 20:56:00
Message-ID: <9608231956.AA01061@localhost.vuse.vanderbilt.edu>
Reply-To: katzlbt@vuse.vanderbilt.edu (katzlbt)
X-POP3-Rcpt: lk4150@per
Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id WAA21182 for <lk4150@krull.dk>; Fri, 23 Aug 1996 22:02:14 +0200
Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Fri, 23 Aug 96 16:07:36 EDT
Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id PAA06050; Fri, 23 Aug 1996 15:57:15 -0500
Received: from vuse.vanderbilt.edu by cspo.queensu.ca (SMI-8.6/SMI-SVR4)
Received: from localhost.vuse.vanderbilt.edu by vuse.vanderbilt.edu (8.7.5/SMI-4.1/VUSE-1.24)
Received: by localhost.vuse.vanderbilt.edu (NX5.67f2/NX3.0S)
Mime-Version: 1.0 (NeXT Mail 3.3 v118.2)
X-Nextstep-Mailer: Mail 3.3 (Enhance 1.3)
Received: by NeXT.Mailer (1.118.2.RR)
References: <199608231824.OAA26002@london.visi.net>
X-My-Email: katzlbt@vuse.vanderbilt.edu
Sender: owner-circle@cspo.queensu.ca
Precedence: bulk

You wrote:
> > Is there any tuning one can do to the source to
> > reduce lag? Of course optimize code, but how?
> > One can optimize s.t. pageing is minnimized
> > (link with the info from the profiler: gmon.out)
> > Best tuning: nice --10 ;)
> Just the other day I was talking to a co worker who was working on
> a mud about the time Jeremy Elson was finishing Circle for the
> first time, He said he had talked to him aobut it. But we talked
> about every thing anyone could possible cover (briefly) in about an
> Hour i think. On of the things he had mentioned was redesigning a
> mud to using message ques rather than the waay it is done now. He

Are you talking about event queues ?
I am not sure where this improvement could take place, 
event queues still need the same time to process the event,
just the input polling will be reduced - or not ?
Hmmm. 

How would you rewrite the polling code to work with 
events ?

for (d = descriptor_list; d; d = next_d)
{
	next_d = d->next;
	
	/* process descriptors with input pending */
	if (FD_ISSET(d->descriptor, &input_set))
		if (process_input(d) < 0)
		{	close_socket(d);
			continue;
		}
 ...

I don't know of any change one could make here.
Though I could imagine to put this into an own 
thread and prepare events that are passed to
the main mud thread.

Currently I put all into one for loop s.t. one descriptor
gets handeled at a time (from input to output) and then the
next player. This gives much better memory performance I guess
as the max internal buffers needed are just 1 and while the
mud prepares the output for the next guy the system can pump 
the data already to the internet.

> said in the mud he did this with the increase in speed was
> tremendous and very well worth it. To answer a few other topics
> talked aobut earlier (multi attacks) he had added a timming
> variable in with the que's so that he no longer had to worry about
> multi attacks. (i.e. fido attcks every 2 secs and you attack every
> 3 secs. you attack fido fiso attacks you 2 secs fiso attacks you
> you attack fiso 1 sec later another sec fiso atacks you the 2 secs
> later you both atack each other. :) He said this caused a stagger
> effect that which added realism. You can also alow dex to adjust

But makes defending yourself against multiple mobs harder, as you 
get more damage until you finish all opponents.

> this time and add the time to every thing like spells actions
> skills (i.e. the dig command and TinTin probs would be solved). I

what is the dig command and the tintin problems ?

> just thought this may be an appropiate ssubject to bring up and
> hope someone finds it useful.

Yes.

> I am just wondering why something like this didn't take along time
> ago???


---
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/                                                            _/_/
_/_/  Thomas Katzlberger                                        _/_/
_/_/  katzlbt@vuse.vanderbilt.edu                               _/_/
_/_/  @aWhiteNeXT.called.garfield                               _/_/
_/_/  http://www.vuse.vanderbilt.edu/~katzlbt/                  _/_/
_/_/                                                            _/_/
_/_/  "You can tune a file system, but you can't tune a fish."  _/_/
_/_/                                UNIX man page for tunefs.   _/_/
_/_/                                                            _/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+


From cat@vuse.vanderbilt.edu Fri, 23 Aug 96 16:12:32 -0500
X-SystemInfo: MyE-Mail: EMail
X-ReplyTo-No: 4016 (There are no more replies.)
X-Message-No: 4018 (database)
From: Katzlberger Thomas <cat@vuse.vanderbilt.edu>
To: circle <circle@cspo.queensu.ca>
Subject: Re: [Circle] [LAG] Priority ageing, optimization, ... ?
Date: Fri, 23 Aug 96 22:12:00
Message-ID: <9608232112.AA01172@localhost.vuse.vanderbilt.edu>
Reply-To: katzlbt@vuse.vanderbilt.edu (katzlbt)
X-POP3-Rcpt: lk4150@per
Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id XAA21397 for <lk4150@krull.dk>; Fri, 23 Aug 1996 23:38:31 +0200
Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Fri, 23 Aug 96 17:44:00 EDT
Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id RAA06461; Fri, 23 Aug 1996 17:12:59 -0500
Received: from vuse.vanderbilt.edu by cspo.queensu.ca (SMI-8.6/SMI-SVR4)
Received: from localhost.vuse.vanderbilt.edu by vuse.vanderbilt.edu (8.7.5/SMI-4.1/VUSE-1.24)
Received: by localhost.vuse.vanderbilt.edu (NX5.67f2/NX3.0S)
Mime-Version: 1.0 (NeXT Mail 3.3 v118.2)
X-Nextstep-Mailer: Mail 3.3 (Enhance 1.3)
Received: by NeXT.Mailer (1.118.2.RR)
References: <199608231941.NAA18268@marit.cypronet.com>
X-My-Email: katzlbt@vuse.vanderbilt.edu
Sender: owner-circle@cspo.queensu.ca
Precedence: bulk

You wrote:
> Doing a rough calculation, i figured it probably was more efficient
> to eliminate regening hp/mana/move once per tick (the way its done
> now) and using events to regen one point at a time.

No. Don't think so. It's not more efficient, just
distributes what is here done as a bulk procedure.

> An event system would be a nice a nice feature to be added to
> circle, since events can add a lot to muds beyond improved
> efficiency.

Shouldn't be too hard to do, just link a procedure call
to the game loop and do your event handling there.

Cat.
---
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/                                                            _/_/
_/_/  Thomas Katzlberger                                        _/_/
_/_/  katzlbt@vuse.vanderbilt.edu                               _/_/
_/_/  @aWhiteNeXT.called.garfield                               _/_/
_/_/  http://www.vuse.vanderbilt.edu/~katzlbt/                  _/_/
_/_/                                                            _/_/
_/_/  "You can tune a file system, but you can't tune a fish."  _/_/
_/_/                                UNIX man page for tunefs.   _/_/
_/_/                                                            _/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
+-----------------------------------------------------------+
| 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/07/00 PST