conorkirk wrote:The iPod's can do floating point math, but it is slow as it is emulated...
You're right: I should have been clearer in my original post. Any platform can do floating point computations, even my old Atari 8-bit from 1983. The relevant question is if there is hardware support for floating-point computations.
Emulated floating point performance is very likely waaaaaay too slow for real-time applications. If you've ever done 3D programming for the 286 or 386, or 486SX, you'll probably recall that everyone was doing fixed-point math (search the web for some 3D tutorials from that era).
I haven't actually tested floating point performance on the iPod, but I strongly suspect that you will indeed be forced to switch all math to fixed-point to achieve reasonable performance. Remember you're translating hundreds or thousands of vertices, each with 3 elements, by matrices, each with up to 9 elements, at frame rates at least 10fps. For a small scene, assume 1000 vertices each being transformed only once (world space->screen space), at 10 fps. This is more than 90000 math operations per second - can you do 90000 software-emulated floating-point operations per second on the iPod?
Furthermore, you'll generally need to transform objects more than once (object space->world space, world space->screen space). Also you need translation operations (a 3x3 9-element matrix only contains rotation information), which will add more math operations for each vertex.
This is just for 3D geometry transformation. How about Irrlicht's software renderer? Does it use fixed point or floating point? For the iPod, the software renderer absolutely must use fixed point, as there is absolutely no possible way that a software rasterizer using software-emulated floating point can achieve interactive frame rates on a platform like the iPod. Quick proof: Assuming latest iPod 5G with 320x240, that's 76800 pixels. Assuming you have an indoor scene, then all pixels on-screen must be rendered. Rendering a texture-mapped pixel requires one divide operation to achive perspective-correct mapping. Also you need miscellaneous other increment/interpolation operations per pixel. (You can avoid some of these divides if you do scanline subdivision or ignore perspective correction, which looks terrible.) But at least you're talking 76800 divides per frame. At 10 fps, that's 768000 divides per second. Add that to the 90000 mathematical operations you need per second for the 3D geometry transforms, and you're up to 858000 math operations per second.
So... I suggest brushing up on your fixed point math

Check out the Doom sources - though it's only 2.5D, they use a software renderer. The Doom techniques are almost useless for full 3D engines like Irrlicht, though. That reminds me, the game Descent has been open-sourced, and it contained a full 3D engine with software rendering (and fixed-point math). That might be a good way to see how a real game used fixed-point in practice. See this thread for more information
http://www.emuboards.com/invision/index ... =25756/mhz