PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

GapiDraw and FLOAT

I'm just wondering why an engine where so many optimizations have been made still uses the 'float' type when many mobile devices have to emulate this type slowly. All the frame synchronization could quite easily be achieved using ticks instead.
Hi Krakken,

Can you be more specific about your tick method ?
Ticks as in GetTickCount().

Frame synchronisation can be done using integer values. If there's a use for float that benefits the final game in this case, I don't see it?
Krakken wrote:I'm just wondering why an engine where so many optimizations have been made still uses the 'float' type when many mobile devices have to emulate this type slowly.


Hello!

Well it's so few operations involved, and they are only performed maybe 20-30 times per second. So the CPU hit is not really measurable. On stationary PCs GapiDraw uses QueryPerformanceCounter, which makes it hard to not work with floats on so large values. So to keep the code clean we opted for the same float types on both mobile and stationary computers, despite that GapiDraw uses ticks on the mobile device for timer resolution.

Cheers
Johan