World of Goo Programming (Physics Engine Question)
- Login to post comments
Sat, 01/29/2011 - 22:30
Hello,
I am beginner in game programming.
For writing another game like world of goo, i start with SDL.
But i don't know how can use geometry and physics in game.
Do you know a book or engine to start geometry and physics in games?
ODE (Open Dynamics Engine) is what 2DBoy used in World of Goo, as far as I know (At least, ode.dll is there in the World of Goo folder).
Or, if you have a physics book handy and a bit of time on your hands, you can make your own engine. It's fun!
Good luck!
IRC | Chapter Tutorial | Reference Guide
Thank you for fast answering!!
For the most basic stuff, just write some code like
Then by changing vX and vY you can move the character around, and jump, and fall.
Another Planet finally has an official release! Download chapters 1 through 3 here! Thank you for waiting so long while I kept starting over.
I actually am toying around with some physics at the moment myself, and found that physics code such as gravitation is easier with vector velocity (velocity and direction) rather than separate X and Y velocities, but it depends on how you're going to use it. (If you want objects realistically glancing off each other, vectors are easier too)
IRC | Chapter Tutorial | Reference Guide
I like using all 3 and converting them each frame. Best of both worlds.
Also you need the direction to rotate the sprites/images/whatever.
Another Planet finally has an official release! Download chapters 1 through 3 here! Thank you for waiting so long while I kept starting over.
Ah, yeah, like the rotational velocity? Haven't gotten that far yet myself, but I'll get there.
IRC | Chapter Tutorial | Reference Guide
I am beginner in game programming.
For writing another game like world of goo, i start with SDL.
But i don't know how can use geometry and physics in game.
Do you know a book or engine to start geometry and physics in games?
Since you mentioned SDL, I'm assuming you're programming in C++? From what I know, the APE physics engine is a good bet. Although it's originally for ActionScript 3.0, there is a C++ SDL port, so you might want to look at that. Unfortunately it doesn't look like it's being developed anymore, but still...
http://www.cove.org/ape/ (the SDL port is on the right)
New GooFans Rules | My Addins
If it's C++, ODE would work well.
Another Planet finally has an official release! Download chapters 1 through 3 here! Thank you for waiting so long while I kept starting over.
That's cool. So what, anyone can just use the same physics engine as WoG for free? Just from that DLL?
New GooFans Rules | My Addins
Download from the web site.
Another Planet finally has an official release! Download chapters 1 through 3 here! Thank you for waiting so long while I kept starting over.
My guess is that you'd need to link in a couple libs too, but yes. Should be fairly straightforward. Most of the open source libraries that I've used from one time to another have been very easy to use.
IRC | Chapter Tutorial | Reference Guide
I am beginner in game programming.
For writing another game like world of goo, i start with SDL.
But i don't know how can use geometry and physics in game.
Do you know a book or engine to start geometry and physics in games?
Since you mentioned SDL, I'm assuming you're programming in C++? From what I know, the APE physics engine is a good bet. Although it's originally for ActionScript 3.0, there is a C++ SDL port, so you might want to look at that. Unfortunately it doesn't look like it's being developed anymore, but still...
http://www.cove.org/ape/ (the SDL port is on the right)
Yes, i am programming in c++.
I think ODE is enough for 2D game in c++.
Thanks
Yup, probably is. When (if) I get back into C++, I'll probably have a go at ODE. It seems more... reliable than APE. I mean, 2DBoy used it!
Only, I'm wondering, is it compatible with SDL?
New GooFans Rules | My Addins
Why wouldn't it be? I mean, SDL is a _graphics_ library while ODE is a _physics_ library. If they don't work with each other, there must be something terribly wrong with how you're trying to put them together. Besides this, 2DBoy used them together, so they must be compatible. The only reason that I could think of two libraries not working together is if they're conflicting (like OpenGL and DirectX) or if their copyrights don't fit together (but even then, a good lawyer might be able to make them work together).
IRC | Chapter Tutorial | Reference Guide
Well that's cool then. It's just I didn't know that 2DBoy used SDL for WoG. It's just that from what I know of physics libraries and programming (my best experience being with AS2) is that if the physics library isn't made for a graphics library, it's gonna be pretty hard to get them to cooperate.
But now that's all cleared up
New GooFans Rules | My Addins