Xonotic Forums
Physical entities test (ODE) - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Physical entities test (ODE) (/showthread.php?tid=2831)

Pages: 1 2


Physical entities test (ODE) - MirceaKitsune - 04-03-2012

I was bored, so I decided to see how dropped weapons would behave if I made them physical using ODE.



If anyone wants to test this, see mirceakitsune/physical_entities on GIT. You'll need the ODE library for darkplaces and to enable physics_ode. Note that this currently uses a bad implementation and doesn't work right. I'm using a fake weapon model and attaching the actual weapon to it (making it invisible) since an entity can't be SOLID_TRIGGER and MOVETYPE_PHYSICAL at the same time. Plus the model spins all the time making things even worse (I might have to use the v_ model instead).


RE: Physical entities test (ODE) - [CCC]KINGSHOT[CCC] - 04-03-2012

That looks interesting but I think it wouldn't be good to add this to Xonotic. Imagine a server with 20 people and all the flying items...

Anyways nice!


RE: Physical entities test (ODE) - MirceaKitsune - 04-03-2012

Like all my features, the ODE switches will be cvared, so this might not get enabled at all by default until it gets heavily tested. Normally there shouldn't be many flying items at a time, as it's unlikely that more than a few people will drop and shoot weapons simultaneously (remember that ODE sleeps when an object doesn't move for too long). At the moment I'm trying to see how I can fix the worst issues with this, which will probably require an engine change.


RE: Physical entities test (ODE) - Lord Canistra - 04-03-2012

Hnnnggh.
Why even when someone starts thinking about implementing advanced physics in DP, it's always must be ODE? There are enough free and better engines.


RE: Physical entities test (ODE) - MirceaKitsune - 04-03-2012

(04-03-2012, 05:13 PM)Lord Canistra Wrote: Hnnnggh.
Why even when someone starts thinking about implementing advanced physics in DP, it's always must be ODE? There are enough free and better engines.

I'm not good with the engine, so I can't say much there. I like BulletX more, but after it I find ODE the best (I could test and compare both physics engines in OpenSim). I remember hearing that ODE was the only one easy to implement, and the others weren't as successful. ODE is working ok so far... but it still needs more work to be ready in DP.


RE: Physical entities test (ODE) - Squigger - 04-03-2012

I think focus should be more on like the bodies of people (aka ragdoll Physics) and maybe other objects on the map other than weapons (e.g. barrels, Boxes, etc.) as those will be more impressive people coming in to play a free game especially since not many free games even have this. It would be funny too for say a barrel to be used to kill someone indirectly via the physics XD

Regardless, this does make me excited for the potential that ODE can have on the darkplaces engine Big Grin


RE: Physical entities test (ODE) - MirceaKitsune - 04-04-2012

The higher devs are working on getting ragdolls working from what I understand. I'm not good with those advanced things... I just enabled ODE on weapons as the implementation was already there Tongue Physical misc_gamemodel entities can already be placed I believe, but note that the engine in autobuild doesn't come with libode1.dll included by default nor physics_ode turned on (my sandbox uses this so I think it's time it should). I also couldn't find the 64bit version of libode, hence why I'm using the 32bit again to test this.


RE: Physical entities test (ODE) - MirceaKitsune - 04-04-2012

More fun with this. I fixed the remaining bugs (ambient rotations and bad collisions) and enabled the feature on all items. Ghost items also return after being picked up and stay in place until respawning. This code is now a mutator.




RE: Physical entities test (ODE) - rafallus - 04-04-2012

Looks awesome, but is it on autobuild? I just got one and can't see it in the mutators.


RE: Physical entities test (ODE) - Mr. Bougo - 04-04-2012

Not in autobuild. It's a test, it has no place in autobuild for now.


RE: Physical entities test (ODE) - MirceaKitsune - 04-04-2012

Not really a test any more, divVerent said it can go in as a mutator. It's not in the menu if that's what you mean, I can add it there if enough people want. I fixed all the big bugs, so currently it's up for merge testing.


RE: Physical entities test (ODE) - Mr. Bougo - 04-05-2012

Oh okay, I thought everything ODE could not be included because ODE itself wasn't. Sorry.


RE: Physical entities test (ODE) - Soelen - 04-05-2012

Am I the only one which is getting a flashback by seeing that? I mean you were able to do the same thing on:

[Image: goldeneye1.jpg]

Golden eye for the N64! A pretty well developed game for its time, the first time which actually invented the reload function heh

As a chield if was pretty cool being able to shot at weapons, armors and stuff which layed on the ground, same effect like MirceaKitsune's ODE on entities but with shot-based holes and the items got darker and darker if you dont stop shotting at them. AWESOME!

let me throw a short video about golden eye, maybe someone is interested to watch it, it starts on 1:18



I love it MirceaKitsune and I would implement it directly into every mod of course with more mass, unfortunately I'm not so sure if Hardcore Quake gamers would be happy with such non quake features heh


RE: Physical entities test (ODE) - Mr. Bougo - 04-05-2012

[Image: 007mouth.jpg]

I really can't unsee that mouth, no matter how hard I try.


RE: Physical entities test (ODE) - Halogene - 04-05-2012

I want this to be in XPM settings. Then I start to hide the megas in duels.


RE: Physical entities test (ODE) - rafallus - 04-05-2012

There can be some epic trolling with that, imagine knocking strength to slime on afterslime map.

BTW are items destroyed if they fall out of map like on space maps?


RE: Physical entities test (ODE) - MirceaKitsune - 04-05-2012

(04-05-2012, 03:04 PM)rafallus Wrote: There can be some epic trolling with that, imagine knocking strength to slime on afterslime map.

BTW are items destroyed if they fall out of map like on space maps?

They should return back to spawning point. In my test that didn't work for some reason, but the code is there.


RE: Physical entities test (ODE) - hutty - 04-05-2012

no Soelen ... your not alone ... i was thinking that too

besides very nice ... a little buggy to be default (and the small heaths don't scatter as much as I would like them to)

but I am certainly up for the mutator option.


btw ... what does the crylink do to the items?


RE: Physical entities test (ODE) - rocknroll237 - 04-06-2012

Oh ffs Mr Bougo! Now I can't look at that picture without seeing the mouth. ARRRGGHHH! But anyway, I like the feature, but I don't think it's really useful or anything. It could get pretty annoying. But yeah, as a mutator, it will be fine.


RE: Physical entities test (ODE) - PinkRobot - 04-06-2012

Good stuff this, well done.

This does mean that all models need a bottom though :p Those shell boxes are see through when you flip them over ;]


RE: Physical entities test (ODE) - jaykay - 04-14-2012

two thoughts on the implementation:

the applied force is too low. when the laser pushed people ~5m high, it should have a much bigger impact on ammo boxes.

when some items get a rotation by the apllied force, that rotation is slowing way too fast. i think that parameter is called damping (or at least it was in bullet), but i'm not sure.


but it's a nice idea Smile the more people work with ODE, the better Smile with some modifications it could actually be feasible for the game (something like "when an item is not at its spawnpoint and does not move for some seconds, let it vanish and start the respawn counter, or teleport it back")


RE: Physical entities test (ODE) - hutty - 04-14-2012

i think teleporting back is good ... but only if everyone is a distance from the item ... then It won't be weird to have the precious mega armor you've pushed half way across the map disappear right in front of you (minecraft does this for its badguys)


RE: Physical entities test (ODE) - Mr. Bougo - 04-15-2012

Is it weird to have gibs and dropped weapons disappear in front of you?


RE: Physical entities test (ODE) - Archer - 04-15-2012

Item/weapon physics would be really funny imo, also because it can have some tactical uses too. Imagine somebody wanting to pick up a Mortar, then you just shoot at it so he can't pick it up on time, and then you finish him off ^^


RE: Physical entities test (ODE) - FruitieX - 05-13-2012

Haha this looks like an awesome mutator!

Do this by default for *dropped* weapons please. ;D