Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!csd4.milw.wisc.edu!uakari.primate.wisc.edu!indri!aplcen!jhunix!ins_adjb
From: ins_adjb@jhunix.HCF.JHU.EDU (Daniel Jay Barrett)
Newsgroups: comp.sys.amiga
Subject: Help for a games programmer
Message-ID: <2267@jhunix.HCF.JHU.EDU>
Date: 11 Aug 89 14:03:31 GMT
Organization: The Johns Hopkins University - HCF
Lines: 31


	A friend of mine has written a PD game, and he has a question about
how to improve it.

	The game is "Peter's Quest" and it is on a Fish Disk.  It is an
arcade-type game like Lode Runner, and it takes input from the keyboard
and the joystick.
	The problem?  It busy-waits.  His main loop looks like this:

		Check for user keyboard input.
		If none, check for joystick input.
		If none, continue with the animation.

	Could someone please send me a code fragment how to do this in
a multitasking-friendly way?  I know how to write Amiga programs that
don't busy-wait, but I have never done it in a program that has a continuous
animation running.  I mean, how can you use Wait() and still have the
animation running?  Do you need a separate process to check for input?
Or what?

	Thanks very much.

                                                        Dan

 //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
| Dan Barrett, Systems Administrator  --  barrett@cs.jhu.edu (128.220.13.4) |
| Dept. of Computer Science, Johns Hopkins University, Baltimore, MD  21218 |
| E-mail addresses:  ARPANET: barrett@cs.jhu.edu                            |
|                    BITNET:  ins_adjb@jhuvms.bitnet                        |
|                    UUCP:    ins_adjb@jhunix.UUCP                     noog |
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////