my own Blt function..
Uh, I got some problem with Speed at Alpha Blending...
I''m developing a 2D Real-Time Strategy Game. Some friends told me to write my own Blt function which blit myself without the vedio ram that may speed it up. It''ll be better if I use MMX.
So any body know how to do that? or some example can show me?
Thanks a lot, and sorry for my poor English..
Use the GameDev.net Alpha Blending code from the Alpha Blending article within gamedev, thats what I use, but I found a few problems with the code and fixed them, if you would like a copy, post your email address and ill send it to you.
Otherwise you can convert to D3D using D3DXSprites. I find using D3D for 2D is much faster, with DDraw an alpha blended blit larger than 320-240 would kill 10FPS, with D3D everything can be alpha blended without a difference If you like, you can download the DDraw and D3D version of my game and compare the performance (press ''F'' to display the FPS).
Otherwise you can convert to D3D using D3DXSprites. I find using D3D for 2D is much faster, with DDraw an alpha blended blit larger than 320-240 would kill 10FPS, with D3D everything can be alpha blended without a difference If you like, you can download the DDraw and D3D version of my game and compare the performance (press ''F'' to display the FPS).
Game Download ZeroOne Realm
Forgot to mention, the code has about 5 different techniques, I found that using the MMX version of the Alpha Code is actually slower so I use the code preceeding the MMX routine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement