Sign in to follow this  
ender_341

x64 physics engines?

Recommended Posts

I'm looking for a physics engine to integrate into my game but I am running into trouble finding information on any that are x64. The only one that I could find anything conclusive one was that PhysX does not support x64. The other engines I have checked out ( Bullet and Havok ) just say PC support which is pretty broad. Does anyone know if these support x64, or if not know of any engines that do?

Share this post


Link to post
Share on other sites
Are you actually *compiling* your game in 64-bit mode, or just running it on x86_64 machines? The latter case works just fine - your application will be a regular 32-bit application, and can use 32-bit libraries.

For the former, you may be facing a problem, although no doubt Bullet or ODE could be ported to 64-bit (with some effort on your part). However, you most likely don't need to be compiling for 64-bit, unless you have *massive* (in the range of 4+ GB) memory requirements - and at that point, your target market is getting pretty small.

Share this post


Link to post
Share on other sites
The intrinsic benefits of 64-bit, for the vast majority of applications (and games in particular) is minimal. In fact, in some cases (because of the larger size of pointers) you may perform worse than 32-bit (though that's offset by the fact that 64-bit CPUs have more directly addressable registers, but then that is offset by the fact that in 32-bit mode the CPU will use register renaming to get more than the "normal" number of physical registers - it's a complex topic and one that can only be resolved by profiling).

The main reason for porting applications to 64-bit is to gain access to the larger address space - nothing more.

So, I personally would suggest that unless you actually need that larger address space, you just continue to compile your program as 32-bit. It'll run just as well (and possibly even better) on a 64-bit system.

Share this post


Link to post
Share on other sites
It might be helpful to know why you want to use x64, is it part of a specification, or do you just feel like it.

If you use 4GB + of memory the chances are your game is going to be massive like 30+ GB, which is unrealistic. Or your not controlling your resources effectively.

I agree with the above comments the speed will not be a massive difference.

Also with 4GB+ your going to have a ridiculous number of verts, normals and massive textures to fill that.. most systems won't be able to run apps like that.

PureBlackSin

Share this post


Link to post
Share on other sites
Quote:
Original post by ender_341
I definitely don't need it to be 64-bit it was more of a hope since the rest of my engine runs on x64 so I was hoping to I could find a physics solution that did too.
Absolutely no need to compile in 64-bit unless you need the huge amounts of memory. After all, 32-bit code runs seamlessly on both 32-bit and 64-bit machines, whereas 64-bit code won't run on 32-bit machines.

Share this post


Link to post
Share on other sites
Quote:
Original post by ender_341
I definitely don't need it to be 64-bit it was more of a hope since the rest of my engine runs on x64 so I was hoping to I could find a physics solution that did too.
I can understand the temptation, and as swiftcoder says, you might be able to get one of the opensource engines (such as ODE) to run under x64, but I guess if not, don't sweat it :-)

Share this post


Link to post
Share on other sites
I find the apparent matter of course of "64 bits is mostly about being able to use more memory" a bit stunning, especially since the OP talks about physics engines.
While that is certainly true for many cases, it is by no means the only truth, and I'd be very careful about making such an assumption about a complex software such as a physics engine of which I'm not intrinsically familiar with every implementation detail.

Apart from being able to (in fact having to) use addresses twice the size as before, all your general purpose registers are twice the size as too, and they're not only larger, but you also also have twice as many of them. You also have twice as many SSE registers.
This may be no difference at all, or it may be The One Difference for applications that need to perform more than 5-6 operations on more than 3-4 small numbers regularly.

One good example is elliptic curve DH, which I've seen run 12 times faster in 64 bit mode, using the exact same source code. When you see this happen for the first time, you think something is broken, because it just cannot be. :-)

I'm not saying that 64 bit will make everything magically better -- it won't. However, it sure does have advantages beyond merely addressing more memory, and it is hard to make a categorial judgement whether these are important or not. It might just happen that a particular physics engine benefits from it big time, or not at all.

Share this post


Link to post
Share on other sites
The PhysX SDK 3.0 will support 64 bit. I've managed to compile PhysX 2.8 from source to support 64bit, though that's not likely to be an option for you I'm guessing. Not sure when it's out, but it is on the way.... could just compile in 32bit for now.

Share this post


Link to post
Share on other sites
I know that there is a 64 bit Linux version of Newton
http://newtondynamics.com/forum/viewtopic.php?f=9&t=4922&start=0

but in terms of performance, the only thing I've seen is compilation time is sligthly slower and I think it was for gcc.
I am guessing 64 bit sucks in general and is the reason why it hasn't taken off for the ordinary home computer.

Share this post


Link to post
Share on other sites

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