Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / text slowing down loop

Author
Message
PeterLewis
20
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 29th Oct 2003 16:29
I have a loop that is doing sprite animation. This loop also write up the score in a special font.

I have loaded the font in windows but not used the load facility in Dark basic pro.

If I loade dhte font into dark basic pro then would it solve this problem ?

This writing of the text slows down the loop alot.

Even if I change the font and then change back to arial for the loop it is still slow. The only way is not to use any font command in the program.

Is there any way to solve this

Thanks
Peter
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 18:07
post your code.
make sure there is nothing in the loop other than what's needed for sprite anims and print statement - keep all other stuff outside the loop.

-RUST-
PeterLewis
20
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 29th Oct 2003 20:17
The code is about 4600 lines

But all you have to do to prove this point is run the following program
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 21:50
looking at your code I see something you should change...
Take the subs out of the loop

DO
code code code
LOOP

SUB1:
code
RETURN

SUB2:
code
RETURN

give that a try for starts. It may not help speed problems but it will make your code way more readable

-RUST-
PeterLewis
20
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 30th Oct 2003 12:59
that does not help

thks
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 30th Oct 2003 13:09
Tets commdns do slow down progrma,s especially if you're changine size / font for some reason.

"The trouble with the French is that they have no word for 'entreprenuer'" - Pres. George W Bush

Login to post a reply

Server time is: 2024-09-21 07:53:49
Your offset time is: 2024-09-21 07:53:49