home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / pascal / 4537 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  3.0 KB

  1. Path: sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
  2. From: sl8nl@cc.usu.edu
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: merging virtual screens?
  5. Message-ID: <1992Jul23.235111.57485@cc.usu.edu>
  6. Date: 23 Jul 92 23:51:11 MDT
  7. References: <76490@ut-emx.uucp>
  8. Followup-To: comp.lang.pascal
  9. Organization: Utah State University
  10. Lines: 55
  11.  
  12. In article <76490@ut-emx.uucp>, baylor@ccwf.cc.utexas.edu (Baylor) writes:
  13. >     Quick question for those who understand me or have played a couple
  14. > of games by apogee and others:
  15. >     How do you make a set portion of a graphics screen scroll
  16. > and have the backdrop stay constant? It's done on commander keen
  17. > and cosmos cosmic adventure (don't know any non-games that do it).
  18. > I thought i had heard it was done by merging two screens, having a
  19. > backdrop screen (like a mountain scene) that never moves (except scroll
  20. > horiz with the rest of the game/program) and a foreground screen
  21. > where all the action is that can scroll up or down.
  22. >     Maybe you have a seperate page where the sprites move and 
  23. > move that to the visual screen quickly, knowing which parts of the
  24. > screen to overwrite and which to leave alone. Or maybe i'm way off
  25. > (these games use fairly large virtual screens - can't imagine
  26. > two pages of them).
  27.  
  28. No, you don't do that.  Dual playfields don't exist on the IBM...they do
  29. on the Amiga.  So, on the IBM, you have to duplicate them the best that
  30. you can.
  31.  
  32. The Apogee games, in fact, do not use large virtual screens.  OK, they had a
  33. max of 256k of EGA memory to use (yes, commander Keen is EGA.)  Just for a
  34. byte-per-pixel organization, let's flip to an extended VGA mode.
  35.  
  36. The Apogee games are on a 320x200 screen.  However, you'll notice they 
  37. smooth pan the display.  This is done on a background screen (virtual).  The
  38. largest VGA virtual screen that can fit in the tweaked modes is 512x512...
  39. however, for iintense animation without a flicker, you have to have two 
  40. pages to flip.  This means that your largest screen would be, say, 420x320.
  41.  
  42. You can pan around this 420x320, but eventually you must update the display.
  43. The only way I've come up with without dual playfields is to copy the background
  44. image down (say the mountains in the background) and then to update the other
  45. tiles.  You can get speed from this if you write your routines to specifically
  46. handle your tiles...not general putimages for instance.
  47.  
  48. >     I don't necc. need code, just a general idea of what to look
  49. > at or what they're doing.
  50.  
  51. I've had up to 10 dual playfields at once on a 286-12 going.  I can't 
  52. release the code (sorry, it's protected by a company...I normally do 
  53. release all of my code), but it can be done...the most animation I've had
  54. going at once is smooth panning, 40 sprites, 5 dual playfields, and music.
  55. Sucked away system time, but it was fast.
  56.  
  57. >     Also, if anyone knows a better newsgroup for ibm graphics
  58. > questions (alt.headache) please let me know.
  59. >     Oh yeah, this is in turbo pas 6, but really it all comes
  60. > down to assembler.
  61.  
  62. For this, it really does come down to incredibly fast assembler.
  63.  
  64. Joshua Jensen
  65. Xillion Software Development
  66.