http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image cache in video mem



In a message dated 1/11/00 7:37:50 PM Central Standard Time, 
choocy@hitech.com.my writes:

<< So, I'm wondering if anyone has tried this before?  And if this is
 worth doing?  I'm targeting video cards with at least 8MB of RAM.  The
 cache size would be only about 10% of the total loaded tiles. >>
Ok, I probably am thinking of something else, but here's a blindfolded shot 
in the dark from me:

It has been done. What often happens is the most used tiles are placed within 
memory of the vitual screen, but out of view of the monitor. Note that this 
only works IF the videocard supports hardware-accellerated screen-to-screen 
copying, which many don't. (With the exceptions of all those Direct X/OpenGL, 
etc routines). For example, in Allegro, if the videocard isn't accellerated, 
then the data is copied from the card to the system RAM, then back on the 
video card, which is even slower!
Note about the tiles: Be sure to make a good algorithm that uses only the 
most used tiles for that area. (Maybe make a loop to get a tally of the cell 
types, then copying [refreshing] off the screen to your "cache" the highest 
counted ones. )

If you're chugging 1024x768 32 bit color, even a 4 MB card could pull a few 
stunts like that. If you try that idea, you can have the algorithm to as much 
as possible with the little RAM..... That is, if the card supports the 
screen-to-screen support.
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html