comp.lang.ada
 help / color / mirror / Atom feed
From: system@niuhep.physics.niu.edu
Subject: Re: Too many tasks?  overhead questions.
Date: 1997/04/28
Date: 1997-04-28T00:00:00+00:00	[thread overview]
Message-ID: <5k317h$o54@corn.cso.niu.edu> (raw)
In-Reply-To: EACHUS.97Apr28142828@spectre.mitre.org


eachus@spectre.mitre.org (Robert I. Eachus) writes:
>"Nick Roberts" <Nick.Roberts@dial.pipex.com> writes:

>> Yes, provided the machine you are running on will allow it, you should use
>> a task to represent each character (player and NPC), as well as each object
>> in the game (e.g. a magic door which opens under certain conditions, etc.).

>  Sure have a task for each player, but objects should be protected
>objects--they don't need their own thread of control.  NPCs are an

I want to thank Robert and Nick for the suggestions, they are definately
going into the mill as I work on how I want to do this, but they don't
answer the primary question, which is 

how much overhead can I expect a few hundred tasks to involve?

And what kind of overhead?

hmmm, Most (90%?) of the tasks would involve NPCs most of whom
(well, at least 50%) would be quiescent most of the time.  So those
(say 40-60& of the character tasks) would be just taking up memory
but no cpu or I/O most of the time (I would make a WAG that for non-
central NPCs average interaction would occur no more than for 5 minutes
per hour.).

The alternative to threading is to have the central process poll each
and every character every tic (which is planned to be one second long).

<sigh>

Thanks again for the ideas, if anybody has some input to the overhead
question I would appreciate input.

Robert

specify the e-mail address below, my reply-to: has anti-spam added to it
Morphis@physics.niu.edu
Real Men change diapers




  reply	other threads:[~1997-04-28  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-23  0:00 Too many tasks? overhead questions system
1997-04-26  0:00 ` Nick Roberts
1997-04-28  0:00   ` Robert I. Eachus
1997-04-28  0:00     ` system [this message]
1997-04-28  0:00       ` system
1997-04-29  0:00       ` Robert I. Eachus
1997-04-29  0:00     ` Robert Dewar
1997-04-29  0:00       ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox