Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!decwrl!ucbvax!agate!e260-4g!c60a-3ec From: c60a-3ec@e260-4g.berkeley.edu (Matthew Hills) Newsgroups: comp.sys.mac.programmer Subject: Misc. Questions Message-ID: <1990Mar16.064659.4149@agate.berkeley.edu> Date: 16 Mar 90 06:46:59 GMT References: <2514@quiche.cs.mcgill.ca> Sender: usenet@agate.berkeley.edu (USENET Administrator;;;;ZU44) Reply-To: c60a-3ec@e260-4g (Matthew Hills) Organization: University of California, Berkeley Lines: 41 Questions Regarding Sound: In using the Four-Tone Synthesizer, I want to produce 3-part music. Since any given Sound Rec only represents one set of notes, what is the best technique for sticking them together? I understand that I should play asynchronously; but I'm curious what to do when I have a continuing note for 1 part, and need a new note for another. Finally, the 3rd part will be a regular rhythm, and it will be playing the same note repeatedly; thus, I need a bit of a gap to distinguish between beats. Questions Regarding Graphics: To get fast action, I will be saving everything as offscreen bitmaps (I'm not terribly worried about memory), and will by using CopyBits to bring them on screen. Basically, I need to move the objects smoothly (and quickly) over the screen. What is the best combination of erasing/ shifting/redrawing? I was thinking of using EraseRect to erase old picture, update the rectangle boundaries manually, then use copybits to bring the bitmap into the new rectangle. Would this produce too much flicker? Any comments on ways to make this more efficient? General Questions: Is it generally faster to do stuff manually (ie: "if (x>3) v=0;"--have a lot of if's and cases) or to call procedures that will deal with a more general case? Any advice on making a program fairly fast? Basically, it will be a game program (no, no music while the game is playing). I am planning on having movement of missles/bad_guys/good_guy spread out over a loop. (ie--1 loop consists of a bunch of "impulses", and fastest objects move every other impulse, slower objects move every 3rd, 4th, etc...). When is it best to check for player going "out of bounds"? I was planning on checking on *every* impulse before he was moved. Is there some ingenious way of avoiding checking every time, to eliminate unnecesary calculations? (I'm using Lightspeed, err Think, C). Thanks Much, ============================================================================== =--Matthew Hills-=--"You know, it just doesn't--=--Any viewpoints expressed--= =----(KC6FGM)----=---get any better than this"--=--herein are my own.--------= ==============================================================================