Archived

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

my own Blt function..

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

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..

Share this post


Link to post
Share on other sites
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).

  Game Download  ZeroOne Realm

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites