delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/11/11:15:34

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Threading Advice
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <unqprsccv6v67dan1ilpf7tfhvc1v07jt5@4ax.com>
References: <968648551 DOT 338928 AT shelley DOT paradise DOT net DOT nz>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 33
X-Trace: /bV2/7u/Uw0ylJSpBxubURi+cU4xK0HZZvUZVUru7xQSgixopeu32yMYpCmUYAH16QUuXIhpH8Td!x5DSCgxvt1t4Qnr0a8ZN5/smEVXwzEfFQ1I5PH+GDkUiENk5HFefsEByZmDj3SZDtj+DIRxeube9!bQjyBb8=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Mon, 11 Sep 2000 14:41:27 GMT
Distribution: world
Date: Mon, 11 Sep 2000 14:41:27 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Mon, 11 Sep 2000 17:04:35 +1200, "Edmund Horner"
<ejrh AT paradise DOT net DOT nz> wrote:

>My game has several things it needs to be doing all the time:
>
>1. Redrawing the screen.
>2. Responding to input.
>3. Moving and updating units.
>4. Occassionally doing big things like pathfinding.
>
>Can any of you guys tell me whether I would be advised to use real
>threading, or how I can accomplish an adequate solution without it?

pthreads, which only works in DOS and WinDOS due to severe bugs in NT,
or:
while(...)
{
  draw();
  input();
  move_units();
  pathfind();
}
where pathfind() is a small number of steps in a pathfinding
algorithm.  Warcraft II, for instance, uses a pathfinding algorithm
that takes small steps from the unit's current location.

-- 
MS (n)  1. A debilitating and surprisingly widespread affliction
  that renders the sufferer barely able to perform the simplest
  task.  2. A disease, multiple sclerosis (see).

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019