WIP threads or ideas/ramblings for HeroesQuest competition?

Started by thaaks, June 03, 2008, 07:00:47 AM

Previous topic - Next topic

Draco9898

well I really have no idea, I used to get at least x3 the performance (around 900ish fps, basically doing nothing as mentioned before, barebones: camera, text for FPS on the screen, bitmap shaded text, thats it) from playbasic apps on a MUCH inferior machine versus What I'd call a good gaming rig, but hardly anything  top-of-the-line:

single core 2.3ghz processor Vs. dual core, same speed
Geforce fx_5200 Vs. a much much superior, Geforce 8600
512 MB of RAM (two sticks of 256) Vs. 2 GB of RAM as two sticks of 1 GB

even if this is a directdraw issue, what DD used to do would be it would just blit your pixels, thats it. Then they made it so everything is basically a plain with a texture slapped on it, so theoretically it should be even faster using the 3d acceleration vs. blitter.

Is anyone having similar problems with newer NVIDIA hardware + drivers?

update: Ok, after a format, new drivers, everything. I've determined it's just my computer for some strange reason. I'm out. I tested the drivers on friends machine, got 1000+ fps.
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin

Quotewell I really have no idea, I used to get at least x3 the performance (around 900ish fps, basically doing nothing as mentioned before, barebones: camera, text for FPS on the screen, bitmap shaded text, thats it) from playbasic apps on a MUCH inferior machine versus What I'd call a good gaming rig, but hardly anything  top-of-the-line:

   And the results form the above snippets are ?


Quoteeven if this is a directdraw issue, what DD used to do would be it would just blit your pixels, thats it. Then they made it so everything is basically a plain with a texture slapped on it, so theoretically it should be even faster using the 3d acceleration vs. blitter.

      No.   What they did is the removed the Direct draw interface from DX8 and above.  They didn't replace or redirect DD to D3D, they added dxsprite interface.    Which in turn is a cheesy wrapper for draw primitive function in the direct 3D interface.   The interface suffers from the same texture size / fetching and state change issues that plague direct 3d.   In terms of speed, DD is much better for transferring image blocks than D3D ever will be.

      DX is an abstraction layer from the hardware.  So programs sit on top of the interface, which hides the device behind the driver.   In terms of rendering, programs call the interface functions.  The interface transparently calls the driver underneath.  How the driver implements any particular functionality is up the driver and device.   This is a key point,  how the driver is hooked up to the device directly impacts the performance of the programs above it.  In other words,  some fall back features (such as direct draw in case) that other devices might implemented in hardware, might be implemented in software ands or a combination. 

Draco9898

Quote"And the results form the above snippets are ?"
On my old machine I would get at least 900+ fps using camera, bitmap font, text for FPS, loop, nothing else.
ON this machine, 300.


Thank you for the explanation kevin, there we're a few things I didn't know. So in other words, the 8600 gt is rubbish at falling back into direct draw? I did test the same driver on my friends machine.

good luck with the contest anyways, guys.

If you can find a way to fix this kevin, you'd save the day :/ Are you using DXsprites for the text? Maybe you could implement your own thing using planar polygons or something?
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

Draco9898

So any chance you can look into this, I believe Monkeybot was having the framerate issue as well
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin


monkeybot

the rubbish driver problem.
i cant use shapes its annoying,it all runs to slowly

kevin

 
Quotethe rubbish driver problem.

      and how can I do that ?

Quotei cant use shapes its annoying,it all runs to slowly

    What draw mode ?




Draco9898

what he is saying is he is having the same problem as I with the fullscreen + scenecapturing frame rate issue
using the geforce drivers.
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin


monkeybot

i suppose i should email Nvidia and tell them to pull their heads out of their arses again!
i wasn't aware you could choose drawmode for shapes except vertex/outline/filled

Draco9898

I'm sorry, but I feel it's some problem in playbasic. I mean, the card works fine for everything else. Is it some problem with how the graphics are implemented? Don't get me wrong, I've thought playbasic was one of the best game programming languages until it became broke for me.
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

SpellSword

[Draco9898's Code]

I get 283-285 FPS running the following code off 'PB V1.63w' on my 'Core 2 Duo (3.0 Ghz)' with 'GeForce 8800 GTX' running 'WinXP (SP2)'.

(Note: I did change the resolution to 1280,1024. My screen doesn't like resolutions below 800,600.)
OPENSCREEN 1280,1024,32,2
createcamera 1
Do
CAPTURETOSCENE
CLSSCENE
text 10,10,FPS()
drawcamera 1
SYNC
LOOP


[Kevin's 1st Code]

I got 1681 to 1685 FPS displayed in the upper left corner, and when I pressed space, I got numbers around:
0.2007083
0.1530551
0.2390596

If needed, I can supply more of the numbers display when space was pressed. (I didn't build a range for them because it was difficult to do so just by clicking space.)

(Note: I changed the resolution to 1280,1024.)
OpenScreen 1280,1024,32,2

Do

inc frames

t=timer()
cls 0
t1#=t1#+(timer()-t)


t=timer()
text 10,10,FPS()
t2#=t2#+(timer()-t)

if Spacekey()=true
cls 0
Print t1#/frames
Print t2#/frames
Print t3#/frames
   sync
waitnokey
flushkeys
endif

t=timer()
SYNC
t3#=t3#+(timer()-t)

LOOP


[Kevin's 2nd Code]

FPS display:
1675 to 1679

Numbers when space is pressed:
0.2013359
0.150373
0.2407182
6.072172e-004
3.903539e-004


The numbers displayed when I pressed space range greatly; the above numbers are the ones that appeared the first time I pressed space. However, it may (I don't know!) be worth noting that afterwards the values of the forth and fifth line were 4.Numbers and 2(OR)3.Numbers. Also, the second line became a much higher number. (In other words, there was much fluxing in the displayed numbers.)

If it would be of any help, I can provide more of the displayed results.

(Note: I changed the resolution to 1280,1024.)
OpenScreen 1280,1024,32,2

Do

inc frames

t=timer()

cls 0
t1#=t1#+(timer()-t)


t=timer()
text 10,10,FPS()
t2#=t2#+(timer()-t)


t=timer()
lockbuffer
t4#=t4#+(timer()-t)


t=timer()
unlockbuffer
t5#=t5#+(timer()-t)


if Spacekey()=true
cls 0
Print t1#/frames
Print t2#/frames
Print t3#/frames
Print t4#/frames
Print t5#/frames
   sync
waitnokey
flushkeys
endif

t=timer()
SYNC
t3#=t3#+(timer()-t)

LOOP



Additionally, if I modify Kevin's 2nd Code section to include Camera/Scene commands, I get...

FPS Displayed:
276 to 277

Numbers when space is pressed:
0.1976662
3.536068e-003
3.407709
3.536068e-004
0.0

When Camera commands are added, it does seem to run much slower.


OpenScreen 1280,1024,32,2

CreateCamera 1

Do

CaptureToScene
CLSScene

inc frames

t=timer()

cls 0
t1#=t1#+(timer()-t)


t=timer()
text 10,10,FPS()
t2#=t2#+(timer()-t)


t=timer()
lockbuffer
t4#=t4#+(timer()-t)


t=timer()
unlockbuffer
t5#=t5#+(timer()-t)


if Spacekey()=true
cls 0
CLSScene
Print t1#/frames
Print t2#/frames
Print t3#/frames
Print t4#/frames
Print t5#/frames
DrawCamera 1
   sync
waitnokey
flushkeys
endif

t=timer()
DrawCamera 1
SYNC
t3#=t3#+(timer()-t)

LOOP


I hope that information is of some use.

If it would help, I have other machines with different processors and graphics cards loaded. I could run the code off them as well and post the results. (They're all older machines.)

Does anyone know if this issue is only occuring on Nvidia GeForce based cards? Or do the recent ATI cards produce the same frame rate?
When I dream,
I carry a sword in one hand,
a gun in the other...

thaaks

Here are my numbers (AMD Dual Core 4400, Geforce 8600GT, Win XP SP2), PB V1.63V6Beta

Draco's code: 748 FPS

Kevin's 1st code:
986 FPS
pressing space gives numbers
0,25
0,53
0,22

Kevin's 2nd code:
978 FPS
pressing space gives numbers around
0,25
0,53
0,23
6,48e-004
6,48e-005

Modified 2nd code with camera commands:
555 FPS
pressing space gives numbers around
0,22
3,5e-003
1,56
4,15e-004
1,89e-004

So adding camera commands does slow it down (which is to be expected as it requires additional calculations) but it doesn't slow it down as dramatically as SpellSword and Draco experience.

Hope it helps,
Tommy

Draco9898

Thank you for interest in code frame rate problem, it interesting to see many result

I used to get frame rates like Thaaks, I would try older version of playbasic, but do not have installers for them

I would also try older machine but it is in remote location.
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

monkeybot

i was using 1.7g and had my frame rate issues i have re-installed V163 m and it seems to run a lot faster,if i remove the text it is up to the speed it was before......
using a DX10 level card with DX9 forceware drivers(i hate Vista)
When i had completed my last game Big C was having slow framerates so i recompiled into 1.7 and it was fine for him after that point.
maybe we should start a thread in bugs as this issue is bound to effect other users.................