Hiya all,
I am new to this forum.
I was making Sprites move around the screen with Cls but I have notice that there loads of Sprites in the background when I move the sprites.
I have put Cls inside the loop to clean the screen but it wont do it....
I thought Double Buffer would do the trick but what the commands for that please?
cheers :)
CLS is command for console.
Look in example smashout.eba
Hiya all,
I have been told to look the example of SMASHOUT where show how to do DOUBLE BUFFER. When I run the program in Dual core( E6750 ) and you will see the STRANGE picture that I have CAPTURE!
It already got DOUBLE BUFFER in SMASHOUT but still...why it is so JERKY?
http://img65.imageshack.us/my.php?image=whyxg8.png
What frame rate are you using on your monitor? The game is set to work with 75 Hz and it may be jerky if run under different frame rate? Check these lines in the code:
'target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer
mTimer = timeGetTime()
mAdjust = mElapsed / 13.3333
fps = FLIP 1
'mAdjust = 1
The important line is:
mAdjust=mElapsed / 13.3333
Change constant 13.3333 to whatever is needed for your system. For example, if your system's frame rate is 60 Hz (standard for LCD monitors) the constant should be 16.6666 so the line becomes:
mAdjust=mElapsed / 16.6666
Barney
My monitor Refresh rate is 1680 x 1050 60hz
I change the code on what you have said...Barney but the screen is still Jerky ???
By the way my monitor is on 800x600 60Hz and program work perfectly.
that is strange.....so what do you think cause jerky on my system?
my system spec is
E6750
2GB RAM
GEFORCE 8800GTS 640MB
Try updating your video card drivers to the latest version, make sure you have applied all updates to your OS. (XP, Vista?)
That example uses DirectX 7.0, which is old by todays standard, and I have seen issues with certain GeForce drivers.
Try the other DX samples.
Paul.
Hiya paul,
I have check other DX sample and they are fine apart from one Smashout sample which is causing me problem.
So far, It is my first time and I been have add background, moving Sprites and Now I gonna draw enemys sprites then learn about Type for space invader.
:)