Reactive Rigids for stock (3.6)

Scripts and code that enhance the gameplay functionality of the engine.
  • 1
  • 2
16 posts Page 1 of 2
Azaezel
Posts: 363
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Wed Mar 04, 2015 9:22 pm
Steve_Yorkshire
Posts: 189
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Wed Mar 04, 2015 10:45 pm
Hurray! :D ... he says eventually once it was explained to him ... :roll:
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Thu Apr 23, 2015 7:41 pm
OK, that's cool... Do I take this to mean you have achieved near-PhysX like reaction of RigidShapes? Because that looks like a PhysX build there :)

Would love to give this a try - I have a PhysX game that is being finnicky and I wanted to maybe rewrite it a bit to use RigidShapes instead, but the stock RigidShape was too clunky and not as smooth as PhysX when I tried originally, that's why we went with PhysX.

But if the same can now be done with only RigidShapes, would love to test that out!

Thanks
Azaezel
Posts: 363
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Thu Apr 23, 2015 8:09 pm
It's a starting point to get folks moving if they wish, yes. At time of writing, there's no player<->rigid impulse interaction, for instance, but pool or bumpercars would be doable.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Fri Apr 24, 2015 3:43 pm
Awesome :) Is this stuff in the 3.7 RC by chance? Or is it in one of your private forks?
Azaezel
Posts: 363
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Fri Apr 24, 2015 4:13 pm
Private fork atm. There's been talk of revamping the physics plugins a bit for a saner inheritance setup than the current 'use a plugin for this set of classes and use stock with options for this other set', so not going to push for inclusion there till that's hashed on out.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Fri Apr 24, 2015 4:21 pm
Of course, that makes sense...

In my other game, I use the PhysX3 advanced plugin that Timmy and Andrew were working on... It's great but yes it had a few mods that had to be made to code outside the physx3 folder so it was not as benign as it could be.

I'm looking for any solution that provides good physics on objects, vehicles and players, but lets me add a lot of them to the scene and have them explode this way and that as I see fit, controlled through script. What we have with the PhysX3 plugin is good, but it still chokes out when I try to really push the amount of objects. I thought maybe your work with the RigidShapes may be something I could try to see if I can replicate the functionality I have, just with better performance and less overhead than the PhysX?

Looks great what you have there :)
JeffR
Steering Committee
Steering Committee
Posts: 682
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Apr 24, 2015 4:41 pm
The stock physics are actually a good bit slower that PhysX in terms of raw performance.

The stock physics however has the advantage of playing nicely with networking, unlike most 3rd party physics libraries, so that's where the tradeoff comes in.

if you want a sheer number of stuff flying around, looking at Bullet or PhysX is probably the smarter choice(if you're locking up PhysX, how many objects do you have moving around?)
If you want a smaller number of objects but ensure they all play nice with all clients, the stock physics is the choice.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Fri Apr 24, 2015 4:49 pm
That's kind of what we concluded before, hence why we went with PhysX... I was just holding out hope :)

Regarding our random PhysX-related lockups I mentioned, it was mostly when trying to play networked with other clients. Things got out of synch and things like racing games didn't work well networked. So I guess that's where maybe Rigids could be better?

As you say, it's a trade-off to think about I guess.

Thanks
JeffR
Steering Committee
Steering Committee
Posts: 682
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Apr 24, 2015 5:41 pm
Ah, yeah, that would make sense.

The issue with 3rd party physics libraries is that in order to get those excellent speeds, they have to handle everything themselves. That's why Torque sets up the physics world, and then passes in all the physics objects to it. That lets the physics sim have all the information in a compact little bubble so it can be as fast as possible.

The tradeoff to that is, for something like interpolation or lag compensation, where the server may need to directly step in and set an object's position again to make everything line up, it doesn't work because the objects are supposed to be handled via the one-way street for the physics stuff.

So yeah, if you're networking around and lag compensation and interpolation are critical(such as a racing game), then looking at the stock physics for those objects may be worth a try.
  • 1
  • 2
16 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest