Should I write my own Blt?

Started by
1 comment, last by nathany 23 years, 11 months ago
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. nathany.com
Advertisement
if ur surfaces are not into video ram...

it now looks that the answer is YES...

but do it in asm if u can
obysoft
Hello!
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

This topic is closed to new replies.

Advertisement