Sender: nate AT cartsys DOT com Message-ID: <371E3CB8.9BEF72C@cartsys.com> Date: Wed, 21 Apr 1999 14:01:44 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Multi tasking? References: <7fi9tj$nef$1 AT camel29 DOT mindspring DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Lark wrote: > > Eli Zaretskii wrote in message ... > > > >On Sun, 18 Apr 1999, Lark wrote: > > > >> How would I go about accomplishing multitasking? > > > >Please explain more what exactly do you mean by that. One > >interpretation is that several programs run at the same time sharing > >the machine resources; another interpretation is that you have several > >threads of execution in the same program. > > This is more of what I had in mind, the multiple threads in the same > program. Surely it can't be impossible. How would people make games where > spaceships explode at the same time that other ones are still shooting, etc? > Thanks for the feedback. You don't need any sort of multitasking or multithreading for that. Just: * Figure out what ship A should do * Figure out what ship B should do, etc. * Put it all together * Draw a frame to the screen. Just because entities are doing different things at the same time doesn't mean their controlling code is also running simultaneously or pseudo-simultaneously. -- Nate Eldredge nate AT cartsys DOT com