Proposal Of standard C++ Math Library

Started by
9 comments, last by Charles B 19 years, 9 months ago
I just wanted to know if anyone is interested in helping me create a library for higher level math. I think this is one major thing that is limiting hobbyist game developers: they don't have time to write code for a better spline, or they don't know how write code for advanced collision detection. Also, if this library can become standardized, and a lot of people use it, I think we can discuss higher level gaming more efficiently. If anyone is interested, contact me at SIndurkya@yahoo.com. Or just leave a comment or suggestion.
Advertisement
Already being done?

The thing is do you want to specify a standard or make a specific implementation of functions the standard? I don't think either will happen, for game programming at least. Scientific computing has a various levels of BLAS functions for scientific computing which work very well for what they do. They are not very well suited to games though.

I think the first problem is people just have differnet structures for different things in their programs. You would probably have to do some serious programming witchcraft to fit everyones programming structures. Are you doting 2 3d vectors? Ok which order are the components in? Are they floats/doubles? What about pading in the structure? I need a fall back method also so if I don't have SSE I can fall back to MMX or the FPU. What if I'm doting one vector agianst 100 different vectors? Should I pull an entire cache line at a time?

Its all very up in the air and dependent on how each individual game is implemented. Maybe you can use a faster sqrt() function because you don't need the precision. I think the best thing would be for a repository of functions. Basic building blocks that you can use to build up your own library. Need an ultra snazzy cross production function that works on an opteron and can pipeline 100 products without thrashing your other thread that might use that stucture too? Well just look in a database of functions and grab it.

Actually I'm not sure how well that would work. It can take a while to fully develop a library like that and I'm sure all the major players have their own standards they start with. How would we convince people to open source something like that? Also if you want it to become a standard you can't expect anything in return.
I can see an open source implementation of the D3DX math functions (renamed, obviously) being quite useful...
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Boost also has some useful contributions, especially the basic linear algebra bits.

More importantly, however, what subsystems would you target this at? ODE is open to the public, so physics (at least rigid body dynamics, the common case) is already around. Most of the available open source engines seem to have similar modules available. So the question is, why not simply add your efforts to theirs, or at least consider asking to fork their dev tree?

ld
No Excuses
I checked out those libraries, but none of them have splines. We should create a free public library that has functions for all the splines. We could support float, double, and long double. I think the more people we can get to use a library, the more support we can get. But I don't like that CVS system. How about I just post all the source code, and if people have suggestions or questions, they email me?
Are we talking 2d splines or 3d?

ld

No Excuses
As mentioned in this thread, such a project was started last year. If you want to revive it, be my guest.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by Fruny
As mentioned in this thread, such a project was started last year. If you want to revive it, be my guest.

Your link to "this thread" is.. well.. it's linking to this thread... was that what you intended?

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
I've fix0red the link.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement