Jump to content
  • Advertisement


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


Should I write my own Blt?

This topic is 6924 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

It seems that if you are doing alpha blending, parallax scrolling, etc. in DDraw (not using D3D), the best thing to do is build everything in Sysram. Then BltFast it to your primary buffer on vsync. This also would work well for a game that supports windowed mode in addition to full screen. I''m guessing that a sysram->sysram blts are never going to receive any acceleration from a video card? So it seems to make sense to write my own "BltFast" in ASM that has a little less overhead. Am I correct on this? Then, I could also get rid of the overhead of DDraw surfaces for everything but my virtual buffer (in sysram, where I build up a scene). Next, I''m looking for information on a few things, and some advice on what to use [faster? better?]: - compressed (RLE) sprites - compiled sprites - other? and also, info on doing MMX optimizations in ASM. Thanks, Nathan.

Share this post

Link to post
Share on other sites
Yes, I think you coould gain some speed writing your own asm blit routines when blitting SYSRAM->SYSRAM.
I dont think that DD will do that HW-accelerated, but try both ways and use the profiler to track the fastest way.
When using effects that will involve lots of reading from the surface, you are absolutely right, having them located in sysram will be alot faster.

I dont have much experience of compiled sprites, but I wrote
a platform game a few years ago using RLE encoded sprites.
Especially (and only) when using transparent sprites. Otherwise, for solid non-transparent sprites, it will be faster you to use an ordinary blit.
Send me a mail and could give you some code to get started with.

/ Tooon

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!