Skip to main content
GameDev.net gamedev.net
🔒 Locked

GameDev.Net Maths Library Questions

Started by D Aug 14, 2001 at 9:39 AM 8 replies 2.4k views
Original Post
D
D
Heya all fellow Gamedev.Net visitors. As we all should know by now GDN needs a bit of help from us to stay afloat, and a few ideas have been posted (i.e. Game development tools, Gamedev.Net shareware Game, International Drug Syndicate). One idea that MadKeithV and I came up with is a special Gamedev.Net Mathematics library. A library that will contain a whole bunch of optimised mathematical functions including Vectors, Matrices, and Quaternions along with the standard stuff. Then we would sell it to all the budding game programmers so as to speed up development, for a small price all of which would go to Gamedev.net. Now the tricky part comes in with wanting to know what you budding game developers out there want in a fast maths library. So what I am asking here is that all of you who are interested in such a fine product to tell us: A) What kind of features (functions, operators, classes etc) are wanted and needed in this type of library. (i.e. Matrix * Vector Array function, lots of operators, simple interface, templateted matrices?). B) What kind of architecture you use and the type that you would like to use, (i.e. classes with the works, bare classes with extra functions elsewhere, simple structs with everything done by other functions?) C) What langauges to support (C++ will be supported by default, but is there also a demand for C math library, or Pascal / VB?) D) What other compilers to support (Visual C++ 6.0 will be standard but we are hoping to also support Borland compilers as well) E) Should we also add support for Planes, Spheres, Collision detection, Physics algorithms, other wierd rotators etc? F) Any other particular algorithms, or comments that you guys would like to make would also be appreciated. - Cheers Dominik Grabiec (Dæmin) sdgrab@eisa.net.au
Daemin(Dominik Grabiec)
MadKeithV
MadKeithV
D3DX does not have recent processor-specific optimisations, and anyway, OpenGL doesn''t benefit much from D3DX''s math library.

What we''d like to do is build at the very least a library containg vector and matrix functionality, generally optimised with fast matrix inverse. We''d also do a manual or automatic detection of the CPU running the code, and selecting processor-specific optimised code based on that (i.e. MMX, 3DNow!, SSE, SSE2, and any Intel/AMD specific optimisations we can come up with).

The library would be general purpose, but with options to order the matrices in Direct3D format, or OpenGL format, for easy use with either graphics library.

We''re requesting input on the general interest of you guys in this, and judging from the response, there isn''t much. If you''d like to have this library, please respond.

Thanks for your time!


People might not remember what you said, or what you did, but they will always remember how you made them feel.
Mad Keith the V.
Check out my band, 22 Strings to Break here.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
DeltaVee
DeltaVee
Speaking as a programmer who has written (badly) 1 million maths libraries over his 16 year career I think this would be an excellent idea.

BTW, D3D does not contain any math routines other than combining two values.

Okay, I''m a bit biased in my needs as I have an interest in Space Sims (I never got over Elite). Anyone who has attempted flight mechanics knows from bitter experience that high school maths just ain''t gonna cut it, (which is a real bummer as I dropped out ).

Okay, my thoughts:

I. library should contain two math libraries:
1. fixed floating point (specify decimal accuracy?)
2. IEEE floating point

Why two? Some of us need the accuracy, others need the speed.

II. All binomials should have a fast look up, ie. sin, cos, tan, yada, yada, yada....

III. Standard vector (2,3 and 4D) library
IV. Standard Matrice (3 and 4D) library
V. Standard Quaternion Library

VI. Throw in some SLERPS, Barycentric coords and for kicks a Catmull-Rom interpolation.


Remember thats two libraries.

Oh did I mention, they must take advantage of any silicon available, whether it is an AMD, Intell, Alpha or whatever.

Well thats my 2 cents (would of been more but I donated the rest )



D.V.
D.V.Carpe Die<FONT C
D
D
"1. fixed floating point (specify decimal accuracy?)"

That''s a different choice, I doubt we would''ve considered including that. What kind of fixed floating point would be most useful? (16.16, 32.32, 24.8)?

The look up tables are a good idea, plus I think that the special Intel (SSE I think) fast approximation functions might be included somehow.

Also another question is wether we should include matrices and other functions using only floats, or both floats (32bit) and doubles (64bit), or just doubles?
Daemin(Dominik Grabiec)
MadKeithV
MadKeithV
I''d think that priority would be 32-bit floats, since that is what is used most often as the middle ground between accuracy and performance. I know very little about fixed point math. Basically I thought it had been superceded by floating-point coprocessing, rendering it slower than using straight floats. It may still have some advantages with MMX or SSE-specific optimisations though - someone will have to educate me on that.


People might not remember what you said, or what you did, but they will always remember how you made them feel.
Mad Keith the V.
Check out my band, 22 Strings to Break here.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
DeltaVee
DeltaVee
Why not a template library?

That way you can specify your ''own'' floating point types (fixed, float, double, long double).

The down side to this is that any newbies (and high paid experienced consultants, just take a look at the RougeWave template libraries ) will have to take a crash course in template usage.



D.V.
D.V.Carpe Die<FONT C
tcs
tcs
"BTW, D3D does not contain any math routines other than combining two values."

"D3DX does not have recent processor-specific optimisations"

OMG, how incredible wrong ;-) D3DX is one of the most powerful libraries out there. It can do a shitload off stuff, is well documented, bugfree and in D3D8.1 it contains processor specific optimizations. Actually, I can''t even imagine that anyone could write a lib better than D3DX, which is for free ;-)

More useful would be a shader system, which automatically uses vertex / pixel shader if available. Also, it would use nv_texture_shader2, nv_register_combiner2 and nv_vertex_program. Well, this is also more or less available for free from nVidia, but it is not THAT good.

So maybe a really powerful shader engine that supports the latest D3D8.1 features and all Nv OGL extensions could actually be of some use.

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
MadKeithV
MadKeithV
quote:
Original post by tcs

OMG, how incredible wrong ;-) D3DX is one of the most powerful libraries out there. It can do a shitload off stuff, is well documented, bugfree and in D3D8.1 it contains processor specific optimizations.



Literally from a Microsoft/NVidia powerpoint presentation:
"CPU Optimisations for some functions: Enable by D3DXCpuOptimizations()"
That particular function is not in my version of the D3D8 SDK, and when they say "some" functions, that''s usually a pretty big stretch away from "most" functions...
But of course, the only way to be sure is to test it!

So I''m getting the D3D8.1 SDK now.




People might not remember what you said, or what you did, but they will always remember how you made them feel.
Mad Keith the V.
Check out my band, 22 Strings to Break here.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
23yrold3yrold
23yrold3yrold
Anyone can code a 3D library Or just steal one from NeHe, Real Soon Now, etc. Maybe you guys can write some utilities instead. Nothing comes to mind; I make all my own stuff. What utilities do you all want? Request ''em and the GDNet guys will make ''em! For a reasonable fee .....
Jesus saves ... the rest of you take 2d4 fire damage.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.