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.

DarkBASIC Professional Discussion / how to achieve greater fps

Author
Message
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 17th Aug 2003 19:16
Hi people...

I've fooling around with DBPro for a while now, but something is bothering me. Probably I'm doing something wrong.
My fps for the code attached dosen't go over 85, no matter what I do.
I have a 5600FX Ultra(256MB), so i expected this simple code would fly!

Please, enlighten me! : )

TIA
Fang
"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 17th Aug 2003 21:25 Edited at: 17th Aug 2003 21:34
sync on <<<<<<<<<<<<<<<<<<<<<<<<CHANGED
sync rate 0 <<<<<<<<<<<<<<<<<<< CHANGED
rem ScreenHeight# = 640
rem ScreenWidth# = 480
rem ColorDeapth# = 32
rem Set Display Mode ScreenHeight#,ScreenWidth#,ColorDeapth#
backdrop on
load object "sphere2.x",1
load image "water2.bmp",1
set object texture 1,2,0
load music "02-Propellerheads-Spybreak.mp3", 1
loop music 1
texture object 1,1
ycoord# = 10.0
xcoord# = 10.0
repeat
rotate object 1,0,xcoord# ,0
ycoord# = ycoord# + 1.0
xcoord# = xcoord# + 1.0
if upkey()=1 then move camera 1
if downkey()=1 then move camera -1
fps$="DBPro Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$
sync<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CHANGED
until escapekey() = 1

you need to set the sync rate ON not off, off gives you the default, slow, buggy sync system (automatic), on allows the code to run at maximum speed and only show the screen when you tell it to, you also set the sync rate to 0, not 1000, your card may well be capable of going higher than 1000 so why limit it?, 0 turns any limits off (up to the absolute maximum the system can cope with), since you have sync set to manual then you need to instruct the machine to show you the screen once per loop or you get to see nothing (when sync is on it`s up to YOU to decide when screens are shown), so you need a sync command just after the last instruction in the loop that makes a change to the screen, if you want to go even faster then you could try fastsync, but with a program that simple it may make no difference anyway, cheers.

Mentor.

Shock
AGK Developer
23
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 17th Aug 2003 22:34
just out of curiosity, what fps are you getting now? thats a very nice card.


Sticking feathers up your butt doesn't make you a chicken.
Codger
23
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 18th Aug 2003 03:29 Edited at: 18th Aug 2003 03:30
There is something else wrong with your system as I get 375 FPS with no changes except i used media from standard dbp files, as you can see my system is not bleeding edge

System
PIII 650 MZ H.P. Pavillion
394 Mem GeForce 4 400MX
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Aug 2003 03:49
Also, ensure that you have the 'Wait for vertical sync' option switched off in your advanced display properties.

That option kept my laptop locked to 60fps for quite a while before I spotted it
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 18th Aug 2003 05:22
I'm getting 85fps...sucks....
Gonna try the code posted by Mentor and see what happens

Uhm..perhaps it's the vertical sync option....gonna give it a look and try


Thnaks people!

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 18th Aug 2003 05:36
here's the deal people...
Turned off vertical sync(it was on) and made the changes to the code that Mentor suggested...none worked and I keep getting 85 fps no matter... I'm getting very frustated by this behavior.

I'm gonna give some more info on my box:
Athlon 1Ghz
256MB Ram
GeForceFx 5600 Ultra(256MB)
Windows 2K

and still getting mere 85fps : (

Any other ideas??

Thanks

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 18th Aug 2003 06:22
Now, this is weird....
If I compile it using windowed mode, it runs like 400fps...
But if i compile it full screen exclusive(which in my opinion it should be faster than windowed mode), it runs at 85fps....

Anyone know what's going on with DBPro??

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
brittd
23
Years of Service
User Offline
Joined: 28th Oct 2002
Location:
Posted: 18th Aug 2003 06:56
Fang,

2 thoughts. One try using the generic detinator driver from NVidia. I could be a wierd internal driver setting that came specifically with that card drivers. Second things is some cards have DirectX refresh settings for each screen resolution that might be narrowing your speed. My guess is it is the first thing though.
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 18th Aug 2003 08:31
Thanks brittd for your reply, but I'm using the latestes detonator drivers(45.23 if not mistaken).
Gonna look into the refresh thing though...i've seen some settings in the driver...gonna fiddle with them a bit...

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Spelljammer
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location:
Posted: 18th Aug 2003 11:22
yeah, it's a known issue. I don't consider it a bug, just the way it works. Whenever you run in exclusive mode, the max fps is always your refresh rate. If you check, you'll see that you have your refresh rate set to 85hz.

DMXtra
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location: United States
Posted: 18th Aug 2003 13:29
Fullscreen exclusive mode forces VSync ON so you are going to get a slower frame rate no matter what you do.

Windowed modes such as windowed full screen mode VSync is turned off.
However, you will get tearing, but it will give you insane frame rates.

Dark Basic Pro -- The luxury for game programmers everywhere
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 18th Aug 2003 17:00
it may be that something is not quite right with the driver, you could try loading the card up with a host of cubes like below and then see what speeds you get.

sync on:sync rate 0:hide mouse
for i=1 to 2000
make object cube i,rnd(5)
position object i,rnd(200),rnd(200),rnd(200)
next i
point camera 100,100,100
do
for i=1 to 2000
turn object left i,1
pitch object down i,1
next i
text 0,0,str$(screen fps())
sync
loop

gives me a steady 14fps on a 1.2ghz pc (AMD), it MAY be that the cpu is the bottleneck, not the card, you could also try loading some high poly models and comparing the results, that way most of the load is on the card, also it may be the card has a top limit that has nothing to do with how many objects it displays, for example my card on an empty screen max`s out ot 500fps, it just won`t go any higher than that, maybe they just have a lower fps limit, there must be limit as to how often the electronics can send a whole picture to the monitor, I don`t know what fps an FX is supposed to be capable of,cheers.

Mentor.

Toothpick
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 18th Aug 2003 18:15
Fang, you need to get the coolbits reg hack or rivatuner.

Then you can override the vsync to always off.
Its in the direct3d tab, click on the more direct3d button.
You can only do this after unlocking the card.

I think Mentor is right , your cpu and ram are choking your geforce.
Wanna swap for my ti4200?

Get yourself to [href]www.overclockers.co.uk[/href]
and pick up a amd barton xp2800+ 512mb ddr and a new mobo.

Things will fly then
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 19th Aug 2003 03:31
Thanks a bunch people!

I though it was something to do with the refresh rate of the monitor, but strange....anyway, it I fill my screen with stuff and it STILL give me 85fps, Iguess I´m gonna be happy

About the trading, ToothPick...hehehe, dream on!
Mentor, thanks for the info...gonna try that code as soon as I get home.

Toothpick: I did set it to Always off...I think that even thoug it´s off, DBP sets it to on whenever it´s in fullscreen exclusive mode....which sucks(there must be a reason to do this...ne1??)

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Fang
23
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 20th Aug 2003 06:51
Mentor: Tried your code and got 13-15fps....guess it's not the drivers problem(no pun intended )

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Spell Jammer
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Texas
Posted: 21st Aug 2003 09:01
Athlon xp2500+
1GB DDR Ram
GeForce 4 Ti 4200 (128MB)
Windows 2K

I get 31 fps with the spinning cubes.
CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 23rd Aug 2003 19:23
Refreshing the screen at 85 times a second is more then enough for any game, most games target a fps of 60.
For smoother control use a timer/event method. Just update the screen 60 times a second but allow it to sample user input and ai updates as often as it can.

CTP

Login to post a reply

Server time is: 2026-07-23 15:49:41
Your offset time is: 2026-07-23 15:49:41