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 / Physics Engines (Wrappers?) and Dark GDK

Author
Message
iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 2nd Mar 2011 23:21
I'm trying to figure out the best way to implement Physics in my game prototype (Zero-G top down Space Flight game).

Tried writing my own code, and it was really tough and unlikely to be optimized. Looked up Dark Physics, and read that it was buggy and at points incomplete. Eyed Newton and ODE and Bullet, Newton looked the easiest, but I seem to need to write a wrapper?

Are there any wrappers for basic physics engines that work well with Dark GDK and are very easy to pick up?

Thanks,

Flamesilver
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 3rd Mar 2011 01:06 Edited at: 3rd Mar 2011 01:07
Check out one of these free physics wrappers:

QuickODE by me
Fulcrum Physics by Matty Halewood

iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 3rd Mar 2011 16:09
Thanks for showing me those! Before, the only thing I could find was Sparky's Collision (SC), and it was just detection without response and didn't account for mass, etc.

Seems like both Quick ODE and Fulcrum are great solutions to explore. Just wondering if you could give an unbiased opinion on the pro's and con's of either?

Thanks again,

Flamesilver
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 3rd Mar 2011 19:22
Well, I have to admit that Matty has put more effort into Fulcrum, as it seems to be the more complete package, with in-build support for character controlers, vehicles etc. I haven't tested it though... But you could still build your own vehicles with QuickODE. And I think PhysX in general is a bit more professional than ODE, but then again I'm not sure. Also PhysX is able to make use of dedicated physics hardware on some Nvidia cards. But ODE doesn't need any additional drivers, dlls, etc.
I have no idea about any speed comparisons though...
So it's just a matter of taste which one you will use, in the end both are great free solutions!
I will continue work on QuickODE in the next weeks so you can expect some interesting new features.

iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 4th Mar 2011 00:59
_Pauli_, thanks for your unbiased comments on both wrappers/engines.

I've decided to first explore in QuickODE, mostly 'cause I know I can count on support from you if needed (hint, hint, lol). What I'm looking for is very basic collision response, and planetary gravity modelling.

Best part about your wrapper for me is the 2D mode. My prototype is meant to be played Top Down, but with a 3rd person 3d chase camera for kicks. So I think it will work easily. Will need a bit more knowledge of your wrapper to integrate some true 3D effects (i.e. 3D explosions) down the line. Would it be hard to model a 3D explosion when you've got everything else set in 2D mode?

Thanks,

Flamesilver


PS: Are QuickODE and ODE royal-free should I decide to commercially release games afterwards?
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Mar 2011 01:24
I've not yet looked into the physics libraries listed under this page but there are some free and easy ones to use here:

http://www.ebonyfortress.com/blog/free-game-development-libraries/

I keep coming back to this page when I'm faffing about with something new to get working with GDK.

Warning! May contain Nuts!
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 4th Mar 2011 01:49
Quote: "Are QuickODE and ODE royal-free should I decide to commercially release games afterwards?"


Yes you can use them in commercial products without paying anything, but you have to include the ODE license and credits to the authors (and me) would be nice

Quote: "Would it be hard to model a 3D explosion when you've got everything else set in 2D mode?"


I think not because the explosion is more or less just a graphical effect which has no impact on the physics simulation.

Quote: "mostly 'cause I know I can count on support from you if needed"


Of course I'll be glad to help you, but please consider that I'm on vacation for the next 5 days so don't expect immidiate responses!

iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 4th Mar 2011 23:52
Well I've already got Quick ODE installed and working. Had to use the ode.lib that you supplied in the other thread. Demos compiled splendidly (lots of warnings, though). Now I just have to try out a few commands and integrate it into my code.

Wish me Luck
iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 5th Mar 2011 06:49
I've integrated Quick ODE into my code and it's a joy to work with! So simple. Requires a whole new way of thinking, though, because everything is governed by the system.

2 issues so far:

- If I set Physics.SetGravity( 0,0,0 ) my simulation doesn't move at all - i.e. the AddForce does nothing to the objects. But if I don't set gravity my objects pull slightly to the left (due to gravity). It's a zero-g space environment with no gravity. How do I achieve this?

- I can't GetLinearVelocity(), therefore I can't limit the speed of my objects. For example, I want each Ship to have a maximum velocity. If I can't get the velocity, then I can't SetLinearVelocity() because I don't know when it's moving too fast, and what direction it's moving in.


See if you can help me out with this.

Thanks,

Flamesilver

PS: I know you're on vacation, so any replies would be great whenever you get around to it.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Mar 2011 21:43
Quote: "Requires a whole new way of thinking, though, because everything is governed by the system."


Well, that's on purpose, hence the prefix "Quick" But I'm glad you like it! The next big update will give you the opportunity to either let QuickODE handle the complicated stuff or to tweak stuff on a lower level.

Quote: "If I set Physics.SetGravity( 0,0,0 ) my simulation doesn't move at all - i.e. the AddForce does nothing to the objects."


Oh, I wasn't even aware of that! I'll have to take a look into it, because it's not how it should be. You should be able to create a non-gravity environment. Give me some time to check it out.

Quote: "I can't GetLinearVelocity(), therefore I can't limit the speed of my objects."


Ok, that's another command that I would have to add. You can calculate the velocity on your own though, by subtracting the objects position before the physics update from the position after.

Login to post a reply

Server time is: 2024-11-19 12:38:36
Your offset time is: 2024-11-19 12:38:36