1 / 15

Coping with Fixed Point

Coping with Fixed Point. Arto Astala, CTO Arto@Fathammer.com. Fathammer. Mobile Gaming Technology X-Forge™ Game Development System Client focused Complete solution 4 years of experience Game development Internal development Game Development Partners Industry cooperation

ivie
Download Presentation

Coping with Fixed Point

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Coping with Fixed Point Arto Astala, CTOArto@Fathammer.com

  2. Fathammer • Mobile Gaming Technology • X-Forge™ Game Development System • Client focused • Complete solution • 4 years of experience • Game development • Internal development • Game Development Partners • Industry cooperation • Samsung, Gizmondo, Tapwave, Nokia • Intel, TI, Nvidia (& MediaQ), ATI • Channels (TBA)

  3. Summary • How do you do it without floats? You don’t !!!

  4. Outline • The Audience • The Difference • General Strategies • The Production Chain • Coding • Summary • Q & A • Demo

  5. The Audience • Who you are? • Professional experience • Graphics experience • Art experience

  6. The Difference • Problems in any math • Loss of precision • Speed of calculation • Implementation effort • The artists • With floats you don’t usually notice • In mobile / embedded there is no difference • You can partly choose your problems • There is a difference • Space, Speed, Effort limitation • Try to optimize the recurring effort • Fixed is better sometimes

  7. General Strategies • Don’t fight the system • Some things are just done in float, no matter what • Avoid risky operations • Train the artists • Know your system • Order operations • Debug math • Create precision offline • How many polys per pixel you need • Be careful • Audit the content • Debug the math • Use floats when needed (e.g. physics)

  8. Production Chain • All starts with content • Usually most effort, by far • Optimize effort • Avoid mistakes • Tool chain massages it into suitable shape • Use all the precision you can • Verify everything • Pre-calculate • Real-time processing in the device • Understand the problems • Don’t cumulate the errors • Solutions available, both math only and full game engine

  9. Production Chain: Art • Love your artist • Art is done in float but understanding is needed • Set limits • Use natural one unit • Avoid extreme differences and sizes • Document! • There is enough precision • Scale at export if necessary • Track the scaling factors • Remember textures & UV mapping • Remember device differences • Perspective correction, lights, raw performance differences

  10. Production Chain: Tools • Use all available precision • Doubles are good for fixed point • Select appropriate representation (quarternion) • Filter out all unnecessary data • Pre-calculate as much as you can • Win-win: improves both performance and precision • Verify your content • Weed out problems • Fast preview for artists helps • Verify limits • Useful error messages • Keep the coder out of the loop

  11. Production Chain: Device • Use old coders • Re-use at its best :-) • Avoid risky things, bad things • Order of operations • Use alternative algorithms (normalize, length) • Exploit the content • You know it, trust it! (limits) • Discard errors, not precision • Collect transformations • Delay or eliminate world space • Calculate relative to camera

  12. Coding • Make always the same errors • Use libraries, they are there • Debug / trace your system • Use precision where needed • Cumulation of errors • Catastrophic errors • Low volume • Physics • Alternative ways • Sliding origo • World size limits • Shift decimal point, use multiple representations

  13. Summary • Success is achieved by care and feeding of the artists • Understand your system • Discard errors, not precision • Just do it (without floats) • Don’t reinvent the wheel • There is always a way

  14. Questions ?

  15. COPING WITH FIXED POINT: • Using fixed point in applications on top of OpenGL ES • Maintain accuracy, avoid overflows and methods for improved performance • Effective use of fixed point in OpenGL ES applications • Float to Fixed-point based engine conversions, for those who want to write for common-lite STAYING GROUNDED IN A FLOAT FREE WORLD

More Related