Which is more efficient?
I have setup a sprite sheet for my characters. When I make the character walk to the side I have a set of three cells I blit. What I want to know is whether it would be more effiecient to draw three more cells walking the opposite direction or just use the ddbltfx object to flip the animation the opposite way (using DDBLTFX_MIRRORLEFTRIGHT)
Draw three more facing the opposite way if speed is your goal. If you're a stickler about using up those kilobytes but don't mind losing speed, mirror them realtime.
-----------------
"Who the hell wants to hear actors talk?" - H. M. Warner
"Everything that can be invented has been invented." - Charles H. Duell
"I think there is a world market for maybe five computers." - Thomas Watson, Chairman of IBM (1943)
[edited by - StarFire on May 6, 2002 4:45:15 PM]
-----------------
"Who the hell wants to hear actors talk?" - H. M. Warner
"Everything that can be invented has been invented." - Charles H. Duell
"I think there is a world market for maybe five computers." - Thomas Watson, Chairman of IBM (1943)
[edited by - StarFire on May 6, 2002 4:45:15 PM]
Besides, if you mirror your sprites, they can end up looking kind odd.
"Wasn''t that sword in his other hand a second ago???"
Landsknecht
"Wasn''t that sword in his other hand a second ago???"
Landsknecht
If you want to mirror them at runtime, just draw them in one direction then write a quick function to flip them at load time and generate the other ones only once.
That way you get the space savings of only drawing them once, and the speed increase of only using stock blit routines.
That way you get the space savings of only drawing them once, and the speed increase of only using stock blit routines.
ummm, if your using blt functions with sprites in vram through directdraw, then you have hardware accelerated blits. mirrorleftright is hardware accelerated by most ever card that is in use on desktop pcs. then again, i guess when writing 3d games you should create flipped textures (because this is a direct analogy to what your suggesting ppl)? current 2d cards use the 3d hardware during blits. things like flips, mirrors, and scaling are free. in fact many cards even bilinear filter your blits when you scale. also many agp cards will support all hardware accelerated features with sysmem to vram blits as well.
btw if your card dont hardware accelerate mirrorleftright, then you are likly running an isa video card on a 486.
quality is the ONLY reason to make two sets of frames. though most of the time ppl dont care about ambidextrous sprites. they just want to play a fun game that has decent looking graphics, even if they are being mirrored to get the sprite to face both directions. also many times you wont notice the effect, nor could notice. many sprites tend to be symetrical and work fine facing either direction.
btw if your card dont hardware accelerate mirrorleftright, then you are likly running an isa video card on a 486.
quality is the ONLY reason to make two sets of frames. though most of the time ppl dont care about ambidextrous sprites. they just want to play a fun game that has decent looking graphics, even if they are being mirrored to get the sprite to face both directions. also many times you wont notice the effect, nor could notice. many sprites tend to be symetrical and work fine facing either direction.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement