libnds Psuedo-GL, remove the floats

Post Reply
Rexhunter99
Posts: 23
Joined: Thu Sep 09, 2010 1:28 pm
Location: Australia
Contact:

libnds Psuedo-GL, remove the floats

Post by Rexhunter99 » Mon Aug 01, 2011 6:48 am

What's the point in having the inlined floating point functions/wrappers? All they seem to do is confuse people, heck I still get confused and I've got about 2-3 months experience under my belt.

The co-ordinate system on the DS is not the same as a computer or dedicated 3D console, the co-ordinate system has a true physical limit of -32768 to +32767 as an integer, this means that game worlds have to be relatively small and cut out, depending on how you design it (those who use portals in indoor environments should be fine so long as the world moves around the player, not the player through the world) worse was the use of glOrtho in tutorials by Nehe instead of glOrthof32() which is the correct function. Since floating points are converted to fixed values it can get confusing, very quickly as to what floating value is what fixed value.
Before I had learned about the co-ordinate system properly, I was screaming at the glOrtho function, I just wanted a view that spanned 256x192 pixels, but glOrtho didn't make that easy.

I am actually writing a document for my website that explains, in depth, the way you should program your 3D Nintendo DS game, without using floats.

Sorry that I am ranting but why would you, Wintermute, put in functions into a library that is only going to utterly confuse a lot of people?
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D

eradsoft
Posts: 30
Joined: Fri Dec 17, 2010 1:34 pm
Location: Either side of South Bypass, Madrid, Spain

Re: libnds Psuedo-GL, remove the floats

Post by eradsoft » Mon Aug 01, 2011 8:08 am

I do not see a problem in having float functions regarded that you
know the limitation in range. Thanks in any case for the post.
I am actually writing a document for my website that explains, in depth, the way you should program your 3D Nintendo DS game, without using floats.
I am sure it will be clarifying and look forward to reading it. I have a real mess with the polygon IDs and
all the posibilities of texturing and effects, perhaps you write something about this.
Thanks
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: libnds Psuedo-GL, remove the floats

Post by WinterMute » Wed Aug 03, 2011 11:50 am

The inlined floating point wrappers convert floats at compile time and most of this was subject to extended discussion on IRC at the time. Obviously DS code should use fixed point math rather than floating point but, amongst other things, the inline functions give the end user some idea of how floating point relates to fixed point.

I didn't personally put this stuff into libnds, most of the GL layer was written by Dovoto and GabeBear with several contributions from other people. So far you're the only person to complain about it being confusing so either nobody is talking to us about it or your view is highly subjective,
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests