Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!csd4.milw.wisc.edu!gregm From: gregm@csd4.milw.wisc.edu (Gregory Mumm) Newsgroups: comp.sys.amiga.tech Subject: Simple questions/Modula-2 Message-ID: <341@csd4.milw.wisc.edu> Date: 11 Jan 89 17:38:59 GMT Sender: news@csd4.milw.wisc.edu Reply-To: gregm@csd4.milw.wisc.edu (Gregory Mumm) Organization: University of Wisconsin-Milwaukee Lines: 57 I am a beginner when it comes to programing on the Amiga. I use Benchmark Modula-2 (A program which I highly recommend to anyone) and have a few questions. I am in the process of writing a very low-level A.I. program which is actually a very simple game (Two opposing space ships that shoot at each other) but have run into a few problems: 1) Question number one: how do you initialize, move, and detect collisions between sprites? (Geez! Is there anything ELSE you want?) I understand that the function GetSprite (from 'Sprites' Module) will initialize a sprite, but don't understand the details surrounding it. If I understand correctly the sprite is moved with the MoveSprite function (also found in the 'Sprites' Module), but again lack the details. Collision detection is done with the two functions SetCollision and DoCollision found in the 'Gels' Module I think. How do you set it up? How do you read a collision? Could someone hack out a little example for me or supply me some technical details/tips? I don't even care what the sprites look like--the art work can come latter. 2) This question is related to the last one: How do you read the Joystick port? The only manual I have is the Intuition manual (had to divert my money to tuition and couldn't afford the others--this is the primary reason why I don't know how to use sprites) and it doesn't say how to read it in there. I have noticed a module called 'GamePortDevice' in the Benchmark manual, but have a hard time reading it. 3) An unrelated question: Is it possible to do WriteStrings (etc) to the window of your choice? In the above program I open a full window (non-resizable) and attempt to do several WriteStrings. What happens is that they end up in the window the program was first run in. For example, if the program is started from the CLI then the CLI window gets all of the output while my window gets nothing printed in it. Is this an impossible task? Thanks for the help. I posted a similar message last week but only got one reply. (Sorry John, but I couldn't get through to you to ask you more questions.) Internet: gregm@csd4.milw.wisc.edu Uucp: uwvax!uwmcsd1!uwmcsd4!gregm Csnet: gregm%uwmcsd4@uwm Greg Mumm -- Internet: gregm@csd4.milw.wisc.edu Uucp: uwvax!uwmcsd1!uwmcsd4!gregm Csnet: gregm%uwmcsd4@uwm Greg Mumm