Sign in to follow this  

2D rigid bodies - working tutorial?

This topic is 3775 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ive found several tutorials but gotten none of them to compile due to the fact that all needed libs are never included, and when i find the libs and headers it needs they are wrong versions etc etc. So: 1. Is there any code doing box-box rigid body example that included ALL it needs to be compiled? (so i can start to disect and understand) 2. How hard is it to make it myself? What i need is cars (rectangles) bumping into other cars, trees etc. I realize its much more simple if i skip rotation + consider all bodies circular... thanks a lot E

Share this post


Link to post
Share on other sites
1. Box2D

2. That really depends on your level of math and your comprehension of physics.

May I say, you are very unlikely to understand what is going on just by looking at the code. You'll need to read the tutorial on the website, and its rather math heavy. Good calculus and linear algebra basics at least.

Share this post


Link to post
Share on other sites
thanks Steadtler, the precompiled is very clear and just what im after. It doesnt compile though...



E:\GDC2006_ErinCatto\Box2D\World.cpp(19) : error C2653: 'set<struct Arbiter,struct std::less<struct Arbiter>,class std::allocator<struct Arbiter> >' : is not a class or namespace name
E:\GDC2006_ErinCatto\Box2D\World.cpp(19) : error C2146: syntax error : missing ';' before identifier 'ArbIter'
E:\GDC2006_ErinCatto\Box2D\World.cpp(19) : fatal error C1004: unexpected end of file found


//And loads of this:
E:\GDC2006_ErinCatto\Box2D\World.cpp(114) : error C2374: 'i' : redefinition; multiple initialization



am i doing something wrong? Thanks for your help

Share this post


Link to post
Share on other sites
vc++ 6.0
see above for what errors it gives me. Should i just include all files and make a project of it or what? Thats what i did and it produced those errors.

If i try with the lite it instead:

_CRTIMP __declspec(noreturn) void __cdecl exit(__in int _Code);

//compiler complains about that line
box2d_lite\glut.h(147) : error C2065: '__in' : undeclared identifier




Plz help :)

Share this post


Link to post
Share on other sites
Quote:
Original post by suliman
vc++ 6.0

Plz help :)


Get rid of 6.0. It's a horrible compiler that can't compile valid code. Upgrade to MSVC 2005 express edition (and install the PlatformSDK too). It's free and a good compiler

That's why nothing is compiling for you. Your compiler is broken.

Example (this is illegal in 6.0 but is perfectly correct code

for ( int i = 0; i < something; ++i )
{
}

for ( int i = 0; i < something; ++i )
{
}



it thinks that i is declared one level of scope up, instead of inside the for loop scope. That's what all those duplicate errors are about.

-me

Share this post


Link to post
Share on other sites
Wait... So you are using Visual C++ 6.0 and yet your Windows OS is broken..

Why not contact Microsoft support and get them to solve your problems for you? As you obviously have a legal version of Windows then it shouldn't be a problem for you. It is wrong that you own a legal version and yet you can't update it.

If you don't own a legal version of Windows then get one before asking for help here. I for one (and I am sure people will agree) do not tolerate pirates.

Good luck :) .

Share this post


Link to post
Share on other sites
really necessary shadow? i think we all know that.

So i must get myself a new compiler? Ive been thinking about it for a while but it seems kinda strange that 6.0 can compile most of the stuff i donwload and ALL the stuff i code myself but i bow to greater knowledge :)

Ill be back if it doesnt work with a more solid compiler. Thanks for your input
Erik

Share this post


Link to post
Share on other sites
Yes, Yes it was :) .

I am glad to hear that you are getting a better compiler. Visual C++ 6.0 is unsupported and it doesn't compile correct code (as other people stated).

Some modern libs have dropped support for Visual C++ 6.0 which is why you are probally getting errors.

Share this post


Link to post
Share on other sites

This topic is 3775 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this