Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 My Game is sooooo slooooooow
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GOLDEN WEAPON




PostPosted: 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.


Game.zip
 Description:

Download
 Filename:  Game.zip
 Filesize:  84.47 KB
 Downloaded:  212 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue May 27, 2003 5:42 pm   Post subject: (No 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Martin




PostPosted: Tue May 27, 2003 5:55 pm   Post subject: (No 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
Catalyst




PostPosted: Tue May 27, 2003 5:56 pm   Post subject: (No 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
GOLDEN WEAPON




PostPosted: Tue May 27, 2003 7:54 pm   Post subject: (No subject)

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




PostPosted: Wed May 28, 2003 3:58 pm   Post subject: (No 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.
krishon




PostPosted: Wed May 28, 2003 6:13 pm   Post subject: (No subject)

isn't it muchas gracias?, lol
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: