Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!henry.ece.cmu.edu!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: Game input -- Bypassing GetNextEvent Message-ID: <12874@pt.cs.cmu.edu> Date: 1 May 91 19:39:14 GMT References: <10219@etsu.CMI.COM> <1991May1.030929.30240@kuhub.cc.ukans.edu> Organization: Gaia II Lines: 35 [davet@cmi.com (David Temkin) writes:] [] Anyway, I'm interested in hearing people's experiences with these issues. [] How do other games out there handle these problems? What are the [] consequences/techniques for bypassing the event manager altogether? [] Although I don't intend this game to be a very "cooperative" (windowing) [] application, I would like to ensure that it at least does not crash or [] cause any other serious problems under Multifinder and System 7. [] Suggestions? [2fmlcalls@kuhub.cc.ukans.edu writes:] [] I encountered the same problems. I took the don't-call-WNE-just- [] GetKeys-and-GetMouse approach for the same resons you mentioned. I too [] am bothered by this approach. I didn't do it out of arrogance, but [] because I know of no other way. And besides - games are exceptions :). [] [] I can tell you that the method seems to work sans hitch under System 7 and [] MultiFinder as well. Unless someone with more experience can straighten [] us out (?) I've found you can safely use this method. just curious ... why not make your app use a window that uses DBoxProc? this way you can use WNE to your hearts content since MultiFinder will not swap you out while the DBoxProc window is in front. I'm not sure how this affects speed, tho. i'm also assuming that your window will cover the entire desktop which allows you pull another stunt to get rid of the menubar since you know you're on top and nothing else is visible (essentially MBarHeight = 0 and yourWindow->visRgn = yourWindow->portRect where portRect covers the entire screen). when you're done (that is when you're ready since nothing will swap you out) simply closing the window will update whatever was behind it. oh yeah, don't forget MBarHeight = saveMBH. the benefit here is that you allow background tasking by calling WNE regularly. so why not do it this way? -dave- hairston@henry.ece.cmu.edu