Managed DirectX performance
Hi,
I can't get DirectX to go faster enough in 2D environment. Wasn't expecting to hit a road block so soon.
Any solutions to improve 2D performance.
VB.NET\Window\Fullscreen\
Hi,
I can't get DirectX to go faster enough in 2D environment. Wasn't expecting to hit a road block so soon.
Any solutions to improve 2D performance.
VB.NET\Window\Fullscreen\
The reason i'm asking is that you might be recreating resources inside the rendering loop and this might cause a framerate drop.
If you get a reasonably good framerate in windowed mode, then that's fine.
Have you enabled vsync? You can disable this and get a reasonably large framerate jump.
You can look at the PresentInterval Enumeration that you give to the PresentParameters that you pass to your device's constructor.
I hope this helps.
Take care.
Thanks for your help..80 FPS sounds good to me, rather good, but I wanted MORE!
VSync makes your application to synchronize with the monitor vertical refresh (if it′s faster, waits for the monitor). It allows to get rid of small image artifacts, but it will make your application to never go over your monitor′s refresh rate.
That can be definetly the reason...
If not, something is slowing down your code. Is your scene very complex?
You shouldn't be using DirectDraw. Today's video cards are no longer optimized for 2D performance. Also, DirectDraw has been deprecated for a very long time. You might want to look at doing 2D in 3D via Direct3D, or have a look at XNA.
This is nothing wrong with Direct Draw. The problem is you are only moving the sprite (the little man) one pixel or perhaps even a partial pixel every frame. Change his X and or Y coordinates at a higher rate maybe 3 or 5 pixels.
x = x+3;
y = y+3;
Cheers,
Glen
You should have a separate System.Threading.Thread kicked off that handles this stuff on a set interval (say 60 times per second, the most the human eye can perceive), and move the guy by varying fractional rates of pixels over time. With that he'll move as fast or slow as you want regardless of whether the user's machine can get 10fps or 3000fps on your game (remember: Their machine is not the same speed as yours, it might be much slower or it might blow it away).
If you keep your game as-is, then install this game on a new computer 2 years from now, the whole thing's going to go so fast you won't be able to play it... like BattleChess on computers today.