That sounds closer to reality.
This is a discussion on My First Attempt at a Game... within the Game Programming forums, part of the General Programming Boards category; That sounds closer to reality....
I just wanted to thank this thread!
Until now, without collisions, my limit has been 300 Sprites, and then my 75FPS would start to drop.
After reading everything here, I was really hoping that my graphics card wasn't just that bad.
So I changed some of my stuff around, and can now go up to 5300 Sprites and still maintain the 75FPS. This is still without collisions and all, but thanks for letting me see how inadaquate my engine was until this point!
If you're curious why I was at such a loss:
- I was calling ID3DXSprite::Begin() and ID3DXSprite::End() methods for each sprite
- I switched from the D3DXSPRITE_ALPHABLEND to the D3DXSPRITE_DONOTSAVESTATE flag in the ID3DXSprite::Begin() method (since I'm not actually in need of Alpha Blending).
EDIT: This second one actually isn't a big deal since I'm not calling Begin() as many times anymore. Even with D3DXSPRITE_ALPHABLEND the FPS stay relatively the same.
And just for kicks, the FPS method I use is:
I like this one because it doesn't have to deal with any division.Code:void UpdateFPS(void) { unsigned long NewTime; NewTime = GetTickCount(); if(NewTime - 1000 > LastTime) { FramesPerSecond = FramesPassed; FramesPassed = 0; LastTime = NewTime; } else { FramesPassed = FramesPassed + 1; } }
Last edited by Epo; 12-21-2004 at 01:34 PM.
How are you doing color keying if you are not using alpha blending?
Well, so far I'm not, there isn't much use for it as of yet. Right now I'm just relying fully on my 4x4 blue texture.
Yeah I sort of put 2 and 2 together right after posting that. That's great but for non-rectangular sprites you must use alpha blending for color keying since DX9 does not have any operations that natively support color keying.
I'll make sure to keep it in mind. Later on I'm definitely going to have to use alpha-blending once I want to move away from the cheapest graphics I can come up with![]()