home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17349 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.8 KB  |  68 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!sgiblab!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!swrinde!ringer!rcarpent
  3. From: rcarpent@ringer.cs.utsa.edu (Richard Carpenter)
  4. Subject: Animation Techniques - Q.
  5. Message-ID: <1992Dec14.181014.6547@ringer.cs.utsa.edu>
  6. Organization: Univ of Texas at San Antonio
  7. Distribution: utsa
  8. Date: Mon, 14 Dec 1992 18:10:14 GMT
  9. Lines: 57
  10.  
  11.  
  12.  
  13. I have some graphics questions that I hope someone will be kind
  14. enough to answer.  These questions are in regard to speedy graphics
  15. using the system.  The answers I am looking for need not be extremely
  16. detailed.  What I want are some general ideas on implementing the 
  17. program, such as ideas on how to use the blitter for greater speed, etc.
  18.  
  19. Set-up : 
  20. --------
  21. I wish to create a set of routines that will handle an unbounded 
  22. Two-d map on which objects can be moved around.  A small portion of the 
  23. map will be displayed on the Amiga's screen at one time.  I would like
  24. to be able to scroll around this map and achieve good performance.
  25. There can be any number of objects on the map at a time.  Also, the map
  26. will probably contain (of course) a starfield, or possibly some other
  27. type of permanent (although changing) backdrop.
  28.  
  29. QUESTIONS:
  30. ---------
  31.  
  32. 1.  How can I place stars on the map and keep them refreshed without
  33.     storing an entire copy of the stars somewhere? Is there a way?
  34.  
  35. 2.  What would be an efficient way to implement double buffering for
  36.     the objects that will be moved around the screen?
  37.     
  38. 3.  What would be a good way to implement the scrolling playfield. Note
  39.     that there are sections of the screen that are not part of the
  40.     scrolling area.  For example, a control panel on the left side of 
  41.     the screen.
  42.  
  43. -------------------------------------------------------------------------
  44. I HAVE thought on this subject a little, but I can't seem to come up
  45. with what looks like a nice solution.  Here is what I have so far.
  46.  
  47. o  Create two bitmaps for double buffering.  Each bitmap will be 1
  48.    'space' larger than the largest object to be used, so that clipping
  49.    can be done easier. (Of course, if I use an intuition window it will
  50.    handle the clipping).
  51. o  Create horizontal and vertical strips of stars.
  52.    These will be used to blit onto the bitmap for erasing.  Both 
  53.    horizontal and vertical strips will be needed to handle horizontal and
  54.    vertical scrolling.  These can be used to erase old objects with the
  55.    background.  
  56. o  Use a linked list of objects to hold all items on the map.  
  57.  
  58.  
  59. Any help will be greatly appreciated.  Thanks in advance.
  60.  
  61. Richard Carpenter
  62.  
  63. -- 
  64. -------------------------------------------------------------------
  65.             Richard Carpenter
  66.             ringer.cs.utsa.edu
  67. -------------------------------------------------------------------
  68.