Computer Science Canada

My Game is sooooo slooooooow

Author:  GOLDEN WEAPON [ Tue May 27, 2003 5:31 pm ]
Post subject:  My Game is sooooo slooooooow

I'm making this game for my computer class (it was featured in a previous post). I fixed the error it had but it moves sooooooooooooo slllllllllllooooooooow. How would I be able to make it go faster without changing to much of the code? It's attached if you want a looksy.

Author:  Tony [ Tue May 27, 2003 5:42 pm ]
Post subject: 

hey, did you know that negative delays dont work ?! Confused

there's no point in having a negative delay, its not going to speed up your program, its actually going to slow it down as delay function is still executed Confused

also you dont need to picture merge the whole background, regular picCopy is enough, though I'm not sure just how much that will speed up the game.

also you can increase movement amount x+=15 and y+=10 seems to work much nicer.

Author:  Martin [ Tue May 27, 2003 5:55 pm ]
Post subject: 

Lol, too bad that's true.

code:

loop
   delay (-maxint)
end loop


Run that in the background...grab framerates in the hundreds with doom III on a celeron 166 Wink

Author:  Catalyst [ Tue May 27, 2003 5:56 pm ]
Post subject: 

one problem (not the main one)

you do cls,drawscreen,View.Update way too much
do them once at the end of the loop

the main problem is the background

turing doesnt draw large images quickly
either ditch it completley or do the back ground in turing graphics

Author:  GOLDEN WEAPON [ Tue May 27, 2003 7:54 pm ]
Post subject: 

mucho gracias (that means thanks), game speed is good now and luckily I didn't have to get rid of the nice bg

Author:  naoki [ Wed May 28, 2003 3:58 pm ]
Post subject: 

i think asian sensation has a tutorial on how to use his frames per second idea to keep a constant speed in a program. it won't speed it up, but it'll keep the speed constant.

Author:  krishon [ Wed May 28, 2003 6:13 pm ]
Post subject: 

isn't it muchas gracias?, lol


: