Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cyberben

Storing Sprites in Memory

This topic is 6919 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hei there, I''m just going throught the logic of how the frame rendering process will go in my game. I understand that Blitting from System memory to Graphics memory is very, very slow, so If I''m assuming that people playing my game will have let''s say a minimum of a 4Mb Graphics card and my game runs in 16-bit color (IT''ll run in 3 res''s too, depending on your computer speed and resources) Then not all of my graphics will fit in Video ram anyhow, so I''m going to be blitting from system to video ram nomatter how I do it right? So Should I store ALL the sprite''s in system ram, compose the backbuffer, then blit to primary? What do you think? Any graphics guru''s got some advice for me? I''d love it!! Thanks, Ben

Share this post


Link to post
Share on other sites
Advertisement
Have been discussing that same issue in a few threads here recently. I''m not a graphics guru (yet), but I''ll share what I''ve learned.

quote:
Original post by cyberben
So Should I store ALL the sprite''s in system ram, compose the backbuffer, then blit to primary? What do you think? Any graphics guru''s got some advice for me? I''d love it!!



Yah. This is the way to do it. Also somewhat necessary if you want do software alpha blending (not requiring a 3d card).

Sysram to Sysram is fast (optimized asm, even faster with MMX)

Video to Video is fast, and can be done at the same time as CPU, but requires Blting-capable hardware and gobs of vram

Sysram to Video is slow, minimize those.

Video to Sysram is really, really slow, never do this.

Some people have recommended that you put your user interface graphics in vram if they fit. Compose the main area of your screen in sysram and Blt it to the backbuffer (either as one Blt/BltFast, or with dirty rectangles). Then video to video Blt the few interface things to the backbuffer. And finally, do a page flip.

[someone needs to write an FAQ]

- n8



nathany.com

Share this post


Link to post
Share on other sites
Thanks,
Yah I think I read the post with the guy who thought sacrificing a full screen alphablending for frame rate would be to loose quality. I think I understand, thanks, anyhow!!
Thanks again,
Ben

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!