denis@vlsisj.VLSI.COM (/) (09/07/89)
I am starting to write some code to do simple animations and am wondering how other people are going about it. So far I have written an iff ilbm reader and created two screens. To double buffer the display I pop one screen to the front and then blit into the other hidden screen. I am using ClipBlit to blit my objects onto the screen. I create the various views of the objects in a paint program. The first thing I ran across was that I needed an outline mask for the object so that I can clear out the screen, using the mask, before oring the object onto the screen with ClipBlit. To get the outline mask I just BltPattern each object bitplane into a single bitplane. I am currenly using WaitTOF to slow down the animation (the Amiga is just too darn fast!). Each time an new screen is drawn each object can change its position and image. Is this how others are doing things? Does anyone use the built in animation stuff, BOBs? I was going to use it but it seemed like it was kind of limited (no sound info, just has acceleration and velocity control). The real reason I did not try it first was that it looked like a lot of stuff to learn how to use. If anyone has some neat demo that uses this stuff I would really like to see it! One thing that I could not figure out how to get is the current frame number. I wanted to save the current frame number when I pop a screen to the front. Then I can draw into my hidden screen. Then I can wait until at least N frames later to pop the hidden screen to the front. That way I can make sure that the animation does not go too fast, while going as fast as I can when there are other tasks slowing things down. Is the current frame number available somewhere or should I create a vertical blank counter of my own? Anouther thing that I am not sure about is how to create two views using one screen. I want a screen so that the user can depth arrange the animation, but I want two views so that I can double buffer. Leo Schwab posted a neat way to create two views for double buffering, but I do not know how to do this with a screen. Does someone know how to do this? Any comments on any of the above or animation in general would be very welcome! Denis Bohm (usenet: decwrl!vlsisj!denis) (internet: vlsisj!denis@decwrl.dec.com) -- Denis Bohm (usenet: decwrl!vlsisj!denis) (internet: vlsisj!denis@decwrl.dec.com)