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 / frame rate drop when playing standalone EXE

Author
Message
MoonSon
21
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 24th Apr 2003 16:06
Ive set my game to run at 50fps. When i run the game in DB, it stays at 50fps, which is great! But if i make FINAL so its a standalone EXE with or without resources, my frame rate drops to 35fps!!!! I would have thought an EXE would be faster seeing as its not running DB in the background.

Has anyone else had this problem? Do you know what i can do to fix it or what might be causing it?

thanks
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 24th Apr 2003 18:10
hmm, haven't had this problem b4, most of the time, my program speeds up when made into a standalone .exe, do you just add a:

set cursor x,y:print screen fps()

command to your game? if so do this instead:

if inkey$()="f"
set cursor x,y:print frame_per_sec
else
frame_per_sec = screen fps()
endif

that should display the "true" screen fps 'cus constantly printing stuff to screen could eat up some fps, while running your game, tap the "f" key once and check the fps, try again as a standalone .exe. If it's the same problem then i'm sorry, i have no clue

everyday of life is a new chapter that has already been fortold but is up to the soul to capture.
Chiwawa
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 24th Apr 2003 21:16
wow
good idea!
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 24th Apr 2003 22:53
don't know why but everytime i put text up on the screen when making a 3D game it always slows down my game tremendously, for example when i was making retro fighter, when i put the line:

set cursor x,y:print screen fps()

i was getting around a constant 43fps but when i used

if inkey$()="f"
set cursor x,y:print frame_per_sec
else
frame_per_sec = screen fps()
endif

whenever i clicked "f" it would say 50fps so i guess constant printing to screen had something to do with it, dunno, just my opinion.

everyday of life is a new chapter that has already been fortold but is up to the soul to capture.
Chiwawa
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 25th Apr 2003 02:09
yeah...me too..ive founded that it slow..really the gae.. but your trick to "save" the fps..is good

and..."Gosub" are slowing down your..game too..it make it more ..readable...but..when its the ..time to give your exe..put all your Sub..into your main loop..just keep your function..out of it..
MoonSon
21
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 25th Apr 2003 14:15
Yeah i had a whole list of PRINT information for reference on the screen, so i got rid of the whole lot and tried it out last night and it worked! I kept the fps in though and it still worked, so i guess i just had an overload of text.

Thanks for the help you two!

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Apr 2003 22:23
Handy tip...

Create a variable, iDebug, at the top of the program.

Wherever you are printing, do this...

If iDebug = 1
Print...
Endif

Then you can switch on and off your debug info by changing one value.

Thanks in advance.
All the Best,
StevieVee

Login to post a reply

Server time is: 2024-09-20 05:20:37
Your offset time is: 2024-09-20 05:20:37