PhysX wrapper for FreeBASIC and BASIC4GL.

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

PhysX wrapper for FreeBASIC and BASIC4GL.

Post by D.J.Peters »

Removed by me was outof date and senseless :-)

Joshy
Last edited by D.J.Peters on Dec 25, 2021 17:31, edited 11 times in total.
TMyke
Posts: 11
Joined: Apr 25, 2011 12:04
Contact:

Post by TMyke »

This is very interesting...
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

TMyke wrote:This is very interesting...
yes baby
MAFIA II in FreeBasic :lol:

Joshy
TMyke
Posts: 11
Joined: Apr 25, 2011 12:04
Contact:

Post by TMyke »

Pssf, small ambition ... Image

Otherwise, if you're interested, I made the test of your package:

zeros across the board and No crash.

ATI Radeon HD 6700 Serie.

Terry.
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

@TMyke thank you for testing

The NVIDIA PhysX lib and Visual Studio 2010 is totaly new for me
but i found the source code of the PhysX Blitz Basic wrapper.
http://www.blitzbasic.com/Community/pos ... opic=90281
Now it's easy for me to see how things in PhysX works e.g. cloth, water ...

Joshy
Last edited by D.J.Peters on Jun 13, 2011 16:52, edited 1 time in total.
TMyke
Posts: 11
Joined: Apr 25, 2011 12:04
Contact:

Post by TMyke »

Code very instructive. I'll see if it is possible to make an external lib for N3xtD.
A small DLL, open source code.
Throughout my progress, if I can help you, I would with pleasure.

thank you for the link :)
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

hello TMyke
can you run the first simple tests from PhysXWrapper.zip file please ?
(you must etract the PhysXRuntime.zip in the same folder)

thank you

Joshy
pestery
Posts: 493
Joined: Jun 16, 2007 2:00
Location: Australia

Post by pestery »

Very nice. All four of the tests work well on my box (winXP)
TMyke
Posts: 11
Joined: Apr 25, 2011 12:04
Contact:

Post by TMyke »

Hello Joshy,
D.J.Peters wrote:hello TMyke
can you run the first simple tests from PhysXWrapper.zip file please ?
all samples seem run fine, good job.
I will study your codes in FreeBasic.

PS: I am missing a few days, holiday, return Tuesday.
maddogg6
Posts: 824
Joined: Dec 07, 2005 22:58
Contact:

Post by maddogg6 »

@Joshy;
You are a FB machine Joshy - well done.

1) the cubes - only a few (2-4) fell - they stayed stacked - which made me wonder; "how do kick them down" - please add a boot to the scene that I can wave my mouse and kick those cubes that did not fall.

j/k - tho I did wonder how I could get them to drop from a varying axis in lieu of a straight line - I was thinking would help encourage 'instability' in the cube's stacking or to help ensure they do not 'stack' after being dropped.


2) I am curious tho, regarding PhysX runtimes;

I see they are signed by NVidia - and I thought I had what I needed for PhysX to work by installing my driver that supposedly included 'PhysX' drivers.

I take it those are meant to be distributed by devs.

Is this the DX9.03C crap (or what ever) all over again?

Is it just me or should nvidia learn from M$ DX debacle and integrate a backward compatible driver package instead of relying on potentially conflicting dependencies devs may release?

Or Is this just unavoidable?

I mean - isn't physX highly dependent upon the video driver too?

Perhaps it is my misconception that my 'single' card - can do 3d acceleration and physX at the same time.

Any good 'real' info on this for someone like me who is just concerned with being sent to DLL HELL with my graphics driver - the one (of few) thing that can make a PC no longer bootable.

I mean sure right now the demos work - will they when my graphics card is updated?

Its exciting stuff none the less - thus why I bothered running the demos - and for that Joshy - a big stein of your favorite brew is raised in your honor.

edit:

oh - all compiled demos ran - Win XP SP3 - GF GT220 w/ v200.
Tho I seen no frame rate displayed so I can not report that.
pestery
Posts: 493
Joined: Jun 16, 2007 2:00
Location: Australia

Post by pestery »

maddogg6 wrote:... I did wonder how I could get them to drop from a varying axis in lieu of a straight line
Line 39 (or there about) in the Cube.bas file, change the 0.5 to 1 or 1.5. The line is:
ActorSetPosition Actors(i),NxVEC(x,y,rnd2*0.5)
maddogg6 wrote:Tho I seen no frame rate displayed so I can not report that.
Just add this to the main loop in the example

Code: Select all

Dim As Integer fps_count, fps_target = 10
Dim As Double fps_actual, fps_time1, fps_time2 = Timer
Do
   If fps_count > fps_target Then
      fps_time1 = fps_time2
      fps_time2 = Timer
      fps_actual = fps_count / (fps_time2 - fps_time1)
      fps_count = 1
      fps_target = fps_actual * 0.8 ' Update every 0.8 of a second
      WindowTitle "FPS: " & fps_actual
   Else
      fps_count += 1
   EndIf

   ' Rest of loop code here

Loop While Inkey = ""
There are other simpler ways of getting the frame rate, but this one work pretty well.
By the way, if the simulation is running slowly try removing the Sleep command at the end of the main loop.

As for your card being able to run 3d acceleration and physX at the same time, I got this from the PhysX wiki page:
Any CUDA-ready GeForce graphics card (series 8 and newer, with a minimum of 32 cores and 256MB of video memory[14]) can take advantage of PhysX without the need to install a dedicated PhysX card.
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

@maddogg6

since PhysX 2.8.4 the PhysX *.dlls must be in the same folder as the *.exe
before PhysX was a part of the gfx driver.

the problem in the past was
if you have 4 games compiled with different versions of PhysX
it was your turn to change from one version to the next.
(4 different gfx card driver on one PC :lol:)

again this problem is gone.

don't worry about the very simple tests
this are only a test not more.

more next week

Joshy
rgwan
Posts: 41
Joined: Aug 19, 2011 17:41
Contact:

Post by rgwan »

Mark!
veggie
Posts: 75
Joined: May 17, 2009 12:52

Post by veggie »

Couldn't get this to run in hardware, no matter what PPU mode was selected. I have a NV560ti but not advantage when swapping between hardware and software.
pestery
Posts: 493
Joined: Jun 16, 2007 2:00
Location: Australia

Post by pestery »

I just checked it again. Looks like the same problem, no performance difference between hardware and software mode. Although when I checked it it seemed to be in hardware.

PhysXGetPPUMode() = 1 (which is PPUMODE_HARDWARE)
PhysXGetSDKVersionNumber() = 284
PhysXGetHWVersion() = 1 (seems a bit odd...?)
PhysXGetNbPPUs() = 1

Since I last checked this I've got a new graphic card, a NV550ti, and I'm now running Win7.
Post Reply