home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / misc / 18529 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  2.5 KB

  1. 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
  2. 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
  3. From: csg019@cch.coventry.ac.uk (-~=Zaphod=~-)
  4. Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.graphics,swnet.sys.amiga,alt.sys.amiga.demos,comp.sys.amiga.programmer
  5. Subject: Re: Double-buffering, Strange things going on! HELP ME!
  6. Message-ID: <Bz9B4I.7vx@cck.coventry.ac.uk>
  7. Date: 14 Dec 92 16:00:16 GMT
  8. References: <1992Dec14.115926.7670@lth.se>
  9. Sender: news@cck.coventry.ac.uk (news user)
  10. Organization: Coventry University
  11. Lines: 57
  12. Nntp-Posting-Host: cc_sysh
  13.  
  14. In article <1992Dec14.115926.7670@lth.se> dat91lho@ludat.lth.se (Lars Holmgren) writes:
  15. >Gutten hute alle leute! :-)
  16. >
  17. >I'm  having some problems with double-buffered
  18. >graphics!
  19. >
  20. >Let's say that I'm doing some 3d-calculations and
  21. >some plotting of stars (or vector-graphics.)
  22. >The main loop would look something like this (pseudo):
  23. >
  24. >loop:    swap_screens(1,2)->(2,1)
  25. >    show_screen(1)
  26. >    clear_screen(2)
  27. >
  28. >    calculate_3d
  29. >    draw_on_screen(2)
  30. >
  31. >    wait_for_Vertical_blanking
  32. >    go_to loop
  33. >
  34. >This works perfectly as long as everything runs in
  35. >one frame (or is it field?), 1/50th s. in PAL. If
  36. >the loop needs more time than that it should run
  37. >smooth, but slower! (I know that it's not good, but
  38. >that's not the point!) However, it looks terrible!
  39. >Imagine that I just draw one star and put a delay
  40. >to make the loop slow down enough. This will have
  41. >the effect of seeing _TWO_ stars, one at the old
  42. >position and one at the new! Even if I make the
  43. >delay huge enough to make the loop run just once
  44. >a sec. the star will seem double for 1/50th sec!
  45. >
  46. >HHEELLPP!!
  47. >
  48. >Have you met the same problem?
  49. >Is there a solution?
  50. >Is it my eyes? (And my friends!)
  51. >
  52. >PLEASE HELP!
  53.  
  54. You are doing it corretly.
  55. This does tend to happen when things start to run at less than
  56. 50 frames per seconds (not fields!).
  57.  
  58. It even happens on some games (check out the starfield on the 
  59. bit in Xenon II when its loading the next level).
  60.  
  61. Things don't tend to look so bad if your objects are bigger (bobs),
  62. but this is unavoidable at 25 FPS.
  63.  
  64.     --Steve.
  65.     
  66. -- 
  67. *******************************************************************************
  68. *        ///  A member of S.H.I.T. (Super High Intelligence Team)    ///      *
  69. *       ///        Fight, defeat and kill organized laming.         ///       *
  70. ****\\\X//********Steven Haggerty**csg019@uk.ac.cov.cck ok?*****\\\X//*********
  71.