Mail Archives: djgpp/1999/04/20/13:16:37
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.
Multiple threads in the same program are not impossible in Djgpp, there
are some packages that accomplish this like LWP or PDMLWP with several
degrees of reliability. But, if you are talking about games you don't
need multithreading, it is possible to achieve this kind of
functionality by writing a proper data structure and algorithm.
Remember (if you are old enough) that most video games (mainly the old
ones) didn't have anything similar to threads.
- Raw text -