Results 1 to 7 of 7

Thread: lack of speed problem

  1. #1

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255

    lack of speed problem

    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.

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    How should I use getTickCount ??
    what this api does??

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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?
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  5. #5

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    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...

  6. #6

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    Is there a better function?

    How Can I use directX or GDI ? (THAT's the question! hehehe)


    p.s. thanks for helping me!

  7. #7
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    I think we found the source of the slowness

    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
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width