From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1a7f997d8127c14 X-Google-Attributes: gid103376,public From: system@niuhep.physics.niu.edu Subject: Re: Too many tasks? overhead questions. Date: 1997/04/28 Message-ID: <5k317h$o54@corn.cso.niu.edu>#1/1 X-Deja-AN: 238085623 References: <5jlkdu$rub@corn.cso.niu.edu> <01bc5256$1c9c4640$28f982c1@xhv46.dial.pipex.com> Organization: N.Ill.U. Physics Dept. Reply-To: system at physics.niu.edu.nospam Newsgroups: comp.lang.ada Date: 1997-04-28T00:00:00+00:00 List-Id: eachus@spectre.mitre.org (Robert I. Eachus) writes: >"Nick Roberts" 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). 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