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.

Dark GDK / JGC v3 Beta - Ragdoll Physics - Not Using: DarkPhysics, Newton, Havok, ODE, etc.

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 18:02 Edited at: 6th Jan 2009 18:03

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 18:02 Edited at: 14th Jan 2009 08:11
Here's the EXE

[edit]UPDATED - has a toggle cam view now - so you can FALL as a rag doll kinda - Definately intersting[/edit]

[edit2] Updated Again [/edit]

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 18:24 Edited at: 6th Jan 2009 18:24

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 18:25 Edited at: 14th Jan 2009 08:13
Primitives EXE attached... Vehicles are next!

[edit] I forgot to mention or display on the screen, that in the primitives demo you need to press the HOME key to START DROPPING objects! Also Right Mouse Button enables the Camera Panning - and WASD controls work... Hold SHIFT to go faster [/edit]

[edit2] Updated EXE[/edit2]

Attachments

Login to view attachments
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 6th Jan 2009 18:38
Ill do anyhting for that! Awesome!

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 6th Jan 2009 19:04
Oh!! The humanity!!!!!

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 6th Jan 2009 19:29
You made that all without physics engine? Pretty impressive. Love to see how.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 19:33 Edited at: 6th Jan 2009 20:38
Oh there's an engine...

[edit]
... Yeah, I specifically sought out as light an engine as I could find, made it thread safe (for DarkGDK to coexist in threaded or non-threaded mode), and integrated it into DarkGDK... basically because my DarkPhysics won't compile with the new vs2008. Yeah the engine core doesn't have threading - but I wrapped up the solver so I could get the improved performance.

I have a project I'm working on for Iron Infantry that will eventually be a product in it of it self. ... but back to the vehicular fun ... (Been coding like a banshee)...

[/edit]

[edit2]
@Jezza - I see why you typed that (though a bit curt) - the thread header definately is meant to say that none of the leading physics engines were used... like Ageia...
[/edit2]

zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 6th Jan 2009 20:48
Jason u just kicked the "boring" out of me with the "ragdoll" app. Great work as usual.

P.s can i be a little bad and post a small bug? I just can't help myself bro

Can't wait to see what you will come up with next. Cheers
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Jan 2009 20:56 Edited at: 6th Jan 2009 23:52
I wouldn't call that a bug - what's happening is the stairs has a certain restitution (give and rebound).

If (I didn't state this in the program - but wasd controls work, add left shift and your cam goes faster) Anyways... If you see just how high those primitives are falling - there is a bit of inertia/velocity on the way down - that puts some objects through the stairs.

With a parameter change or two - I could make those stairs like concrete...

Additionally - I can make entities "BREAK" in that you can have ONE physical ENTITY get busted and automatically spawn off new "physics objects" from them...

Thanx for the kind words - been working on this pretty hard... let me tell you - you have to write a lot of code to make this stuff easy to use... it's one thing to tell code a sphere or a ball into the engine, and quite another to have it work multithreaded in darkgdk and running pretty smoothly.

--Jason

[edit]...though if it was a game and things were doing that... yeah... I'd say its a bug then [/edit]

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 7th Jan 2009 01:00
So did you make the physics engine, or find one? Either way very cool!


jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th Jan 2009 01:31 Edited at: 7th Jan 2009 02:36
I ALMOST decided to make one... but no... And I looked at many of them... and my goal as I mentioned above way to find something extremely LEAN... I mean... I was still on the fence to write my own... (as a math study side benefit exploration in transforms, trig etc. calculus) ... I was about ready to tackle that...

...until I started thinking about what's involved... so the search continued for something REALLY lean to maybe use as a base... and I found one. It seems to be abandoned.. however I have all the source code except for the original dll project - I think I have an open source version that is possibly a version or two back from the last dilly the author released... I guess I should name the engine for ya:

[href]www.tokamakphysics.com[/href]

It's one of the leanest I found in a hobby coder's (potential to sell not hampered by high licensing costs - e.g. Havok)... It's got joints, materials - even poly perfect material settings for terrain! (Think swamp - sinking in mud... Or Rubber Gymnastics mats with boing!)

It doesn't have water - and I'm currently having a work filled time getting the DarkGDK wrapper to handle the ability of this engines ability to make complex shapes from primitives (using DarkGDK limbs at the moment for visuals of physic meshes) Additionally - it does convex also - and I'll get to that eventually also - I'm planning to make a utility that combines the original mesh + usage of the qhull binary file formats - so that one can load, model, test, experiment with the complete physics engine in a visual way. (I'm sick of scaling and guessing - and hoping things will look right)...

all in all - the performance I'm getting seems to be pretty decent especially with the extra boost the multi-threading code made.

How have these demos been running for you folks? Fast? Slow? Impressive? Lame?

--Jason

[edit] thanx Zuka! [/edit]

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 7th Jan 2009 02:31
http://www.tokamakphysics.com/

Bad link, Jason. That one goes to one of those crappy generic search sites, the above link is correct.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th Jan 2009 06:04
I'm still shooting for vehicles but I'm working with a seemingly long deserted engine LOL - has all the pieces but no documentation - but at least I have (think I have) most of the source code

Now - there is a vehicle demo that has all kinds of "missing" things in it - and all I have for a visual is precompiled exe's and some source that won't compile for tons of reasons.

So I'm just picking the sample source apart to see what I can do... I ran into an issue where the car is made of two main boxes but are one entity in the physics engine - need cheap "physics" display though - so debugging is possible via visuals of the physics entities themselves... So - this screams darkgdk limbs.. so I did that ... and made progress - but it was pretty difficult getting it in a form that is easily usable from DarkGDK... I've uploaded a picture. I didn't both with the EXE because its uneventful and just confirm code - not as exciting as the other exe's - though a major milestone nonetheless. (I'll leave this pic under the "View" button - have a look )

--Jason

Attachments

Login to view attachments
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 7th Jan 2009 16:16
Tell me if you need any kind of 3D, 2D or anyhting else

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th Jan 2009 16:28
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 7th Jan 2009 19:50
email recieved

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 7th Jan 2009 19:52
Ragdoll EXE updated - You can toggle the camera to "FALL" as the highest up ragdoll

Still working on the Vehicle stuff - pretty tricky.

zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 7th Jan 2009 20:13
Quote: "jason: Ragdoll EXE updated - You can toggle the camera to "FALL" as the highest up ragdoll
Still working on the Vehicle stuff - pretty tricky. "

Dunno why but i was thinking of starting a "WLJFC" aka We Love Jason Fan Club .
No really you keep on amazing me Jason. I am so happy i get to learn allot from you.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Jan 2009 07:44 Edited at: 8th Jan 2009 07:45
@Zapakitul - Thank you for the encouragement.

I have something for ya - it's a medialess demo of some cars.. I KNOW it's still kinda bumpy at speed - but I wanted speed for the ramps and haven't figured out how to truly tame the suspension perfect yet. I suspect (only because I've been banging on this a LONG TIME) that its something to do with the sensors (that touch the ground and serve as wheels) and I think different materials, scale would tame thins out a bit... good old mass changes too

Anyway .. here it is....

Vehicular Fun


Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Jan 2009 07:46 Edited at: 8th Jan 2009 14:56
Vehicular Fun Demo attached...

[edit] Added Ability to Press HOME to bring your vehicle back if it gets lauched out of the play area - willingly or via physics overload LOL[/edit]

[edit2]Fixed up the "Super Jump" (DEL Key) so you can land on buildings... (Takes a few tries) LOL[/edit]

Attachments

Login to view attachments
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 9th Jan 2009 00:57
Looking very good so far bro. Good job.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 9th Jan 2009 02:40
@Jason
Quote: "I suspect (only because I've been banging on this a LONG TIME) that its something to do with the sensors (that touch the ground and serve as wheels) and I think different materials, scale would tame thins out a bit... good old mass changes too
"


I bet its because the wheels aren't really round. It's probably so sensitive to the flat spots on the wheels. Just a guess.
Question, what is the threading toggle for?
You know I'm going to be needing something like this pretty soon.....
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Jan 2009 03:40
Quote: "I bet its because the wheels aren't really round. It's probably so sensitive to the flat spots on the wheels. Just a guess."
.. And a Good Guess it is!

What's odd is that there really aren't wheels as far as the physics engine is concerned! There is something like a wheel... but its not in anyway related to a mesh. Isn't that odd? I know it sounds silly - but the wheels you see are objects that just sized according to the diameter "they are supposed to be" to give a visual.

The way it works are these things called "Sensors"... they are like a RAY CAST, and you iterate through them and do math based on the info you can get from them... like the collision normal (to the ground) and you can can make them springy (The cause of many a car flying off in to space is the elastic properties of these things! LOL - I'll eventually care about dampening stuff - its just a demo of what's coming ) Well - they server as your suspension also... The Wheel is just suspension length plus diameter / 2.

Now - the sensor is fixed to the rigid body of the car, and translates spring forces to it. Additionally... to give each wheel traction - you apply "force" and "torque" to them - which is why I was able (during development horsing around figuring it out) why I was able to make a car that was popping wheelies! I've already been thinkning about the motorcycle bit and that makes for an interesting puzzle.. that might be solved with some "centrifical" (Spelling? LOL) forces being applied appropriately... or something less "realistic" combined with the physics to give a decent play.

So - I haven't got the problem nailed - nor am I currently worried about... because there are alot of other variables I've yet to mess with that might be effecting it.. such as I don't dampen forces yet - and this is why the cars may jostle when idle... they still have some minor forces bleeding off... With a simple "range check if force < whatever - then clear" kind of thing - that can be eliminatedc. Another issue is I'm using all default material ZERO in that demo - the ground, the car, the buildings, the walls - they all have friction and resititution like a wet rubber gym floor it seems. I can have many materials... and on terrain actually apply a material per poly! Snow - ice - concrete - scattered about! (I like that feature - but haven't toyed with it yet. I'm currently reorganizing the code to be integrated with the rest of my JGC lib, and already it's integrated into the frustrum culling system etc.

Multi-Threading - The multi-threading toggle utilizes some code I wrote that fires off the physics calculations in a separate process (often other CPU or CPU core) while I call the DarkGDK sync function. The reasoning is I get two major time consuming tasks working in parallel.. when the two tasks meet up on the other end... I then manipulate the DarkGDK objects (if enabled - like they are in these demos) to be oriented as the physics engine dictates. In short - on a REALLY fast video card and PC - its not a big difference... but regardless - it tends to always run faster using this technique.

My favorite part of this physics engine is HOW LIGHT IT IS! It's FAST! And I have the source code so I'll be doing whatever is necessary to maintain and improve it. I've read there are some quirky things in it regarding slide joints and even those sensors... but I plan to hammer it out.

You might have noticed the rag doll demo is particulally smooth... and in that primitives demo... I'm throwing 1500 live physics objects around and FPS hardly EVER dips! that's pretty darn cool!

thanx for stopping by! I'm liking the looks of your project as well... and I for one love how your tracks are coming out! Guess I need to write a DBPro plugin now for this engine eh?

--Jason

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Jan 2009 01:42 Edited at: 10th Jan 2009 01:43
Visually? Not to much different - except the arms and legs have cylynders and are more interesting... but the milestone is this is all integrated to JGC v3 Now - It was before - but now the code is much cleaner IMHO...

(Exe to follow)



Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Jan 2009 01:44 Edited at: 10th Jan 2009 02:57
Exe for new RagDoll Demo

[edit]Updated for more accurate timer based simulation[/edit]

Attachments

Login to view attachments
draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 10th Jan 2009 06:22
Fantastic work Jason I'm waitin for the day you turn this gigantic library of work into a game, because that will be one fine day

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 10th Jan 2009 08:17
will this engine be released to the public in any form?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Jan 2009 14:09
@draknir_ - Thank you very much! all of this ultimately will trickle into a game or two... it's all part of the master plan

@bjadams - The open source version of the JGC (Jegas Game Classes) is here http://code.google.com/p/darkgdkoop/ .. but you'll have to stay tuned for the answer to your question because I haven't decided.

--Jason

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Jan 2009 08:08 Edited at: 14th Jan 2009 08:08
But things are starting to look really cool
Here's what's in the works - note - updating the ragdolls and the falling object demos while I'm here posting this picture preview of what's going on with Jegas Game Classes v3 (JGC DarkGDK OOP) and Tokomak Physics so far... (See attached - I'm all happy )

--Jason



Attachments

Login to view attachments
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Jan 2009 11:43
Not bad. Not bad at all!

3700+ Athlon 64 - Geforce 7600 GS - 2GbDDR2 RAM - 40Gb Hdd (In this pc) - Windows Vista Ultimate (x86)
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 15th Jan 2009 18:59
Cool!

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 15th Jan 2009 22:18
Cool, but my game uses PhysX. It's got FLUID SIMULATIONS!

Even though I'll never use them... and to be honest, I don't think I'm sticking with PhysX. I have the time and skill to make my own.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2009 03:37
I posted the Vehicular Fun Demo (Tokomak Physics etc...) here: http://forum.thegamecreators.com/?m=forum_view&t=143488&b=22

I figured it's come far enough to warrant its own thread. I hope you agree

Thank you for the kinds words folks - they are very encouraging

--Jason

Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 16th Jan 2009 22:27
Great work as alway Jason, I've been following your work for awhile now but never had the time to sit down a post a few messages. Back in action soon though, so until then, enjoy your 15 minutes of fame and keep up the great work

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.

Login to post a reply

Server time is: 2024-09-30 15:19:34
Your offset time is: 2024-09-30 15:19:34