Click to See Complete Forum and Search --> : lack of speed problem
trasher
Jun 12th, 2001, 11:45 AM
I 've done a little game , that runs nicely on a PIII 500 but it's a little slow on my other machine (PII 233) .
Is there a way to optimise the speed?? I'm using a loop with the timer function.
PsychoMark
Jun 12th, 2001, 01:42 PM
There could be a lot of reasons for it to slow down. Probably you've coded something that's just too slow, because I managed to get 72 FPS easily on my p133......
I don't know how accurate the Timer function is though, I always use GetTickCount().....
Maybe post some code or more info...
trasher
Jun 12th, 2001, 02:00 PM
How should I use getTickCount ??
what this api does??
PsychoMark
Jun 12th, 2001, 02:05 PM
GetTickCount works basically like Timer. But like I said, I don't know if this'll make a difference, your problem is probably somewhere else...
Btw, what are you using to draw the game? GDI? DirectX?
trasher
Jun 12th, 2001, 03:09 PM
Hey! this is my "first" game in vb! ;)
So I don't think I'm using these settings...
I just use to move some picture box with the move function.
I know this is not efficient...
trasher
Jun 12th, 2001, 03:11 PM
Is there a better function?
How Can I use directX or GDI ? (THAT's the question! hehehe)
p.s. thanks for helping me!
PsychoMark
Jun 13th, 2001, 01:46 AM
I think we found the source of the slowness :D
If you're just starting, I don't recommend getting into DirectX. You should try BitBlt (GDI functions). There are a lot of tutorials for it. One of which I can actually remember is Fox's tutorial:
Tutorial: http://fox.acky.net/english/coding/tutorial/2.html
Just code: http://fox.acky.net/coding/graphics/bitblt.zip
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.