home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.amiga.misc:18529 comp.sys.amiga.graphics:8026 swnet.sys.amiga:184 alt.sys.amiga.demos:1987 comp.sys.amiga.programmer:17345
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!agate!doc.ic.ac.uk!warwick!coventry!csg019
- From: csg019@cch.coventry.ac.uk (-~=Zaphod=~-)
- Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.graphics,swnet.sys.amiga,alt.sys.amiga.demos,comp.sys.amiga.programmer
- Subject: Re: Double-buffering, Strange things going on! HELP ME!
- Message-ID: <Bz9B4I.7vx@cck.coventry.ac.uk>
- Date: 14 Dec 92 16:00:16 GMT
- References: <1992Dec14.115926.7670@lth.se>
- Sender: news@cck.coventry.ac.uk (news user)
- Organization: Coventry University
- Lines: 57
- Nntp-Posting-Host: cc_sysh
-
- In article <1992Dec14.115926.7670@lth.se> dat91lho@ludat.lth.se (Lars Holmgren) writes:
- >Gutten hute alle leute! :-)
- >
- >I'm having some problems with double-buffered
- >graphics!
- >
- >Let's say that I'm doing some 3d-calculations and
- >some plotting of stars (or vector-graphics.)
- >The main loop would look something like this (pseudo):
- >
- >loop: swap_screens(1,2)->(2,1)
- > show_screen(1)
- > clear_screen(2)
- >
- > calculate_3d
- > draw_on_screen(2)
- >
- > wait_for_Vertical_blanking
- > go_to loop
- >
- >This works perfectly as long as everything runs in
- >one frame (or is it field?), 1/50th s. in PAL. If
- >the loop needs more time than that it should run
- >smooth, but slower! (I know that it's not good, but
- >that's not the point!) However, it looks terrible!
- >Imagine that I just draw one star and put a delay
- >to make the loop slow down enough. This will have
- >the effect of seeing _TWO_ stars, one at the old
- >position and one at the new! Even if I make the
- >delay huge enough to make the loop run just once
- >a sec. the star will seem double for 1/50th sec!
- >
- >HHEELLPP!!
- >
- >Have you met the same problem?
- >Is there a solution?
- >Is it my eyes? (And my friends!)
- >
- >PLEASE HELP!
-
- You are doing it corretly.
- This does tend to happen when things start to run at less than
- 50 frames per seconds (not fields!).
-
- It even happens on some games (check out the starfield on the
- bit in Xenon II when its loading the next level).
-
- Things don't tend to look so bad if your objects are bigger (bobs),
- but this is unavoidable at 25 FPS.
-
- --Steve.
-
- --
- *******************************************************************************
- * /// A member of S.H.I.T. (Super High Intelligence Team) /// *
- * /// Fight, defeat and kill organized laming. /// *
- ****\\\X//********Steven Haggerty**csg019@uk.ac.cov.cck ok?*****\\\X//*********
-