redmotion: ShiVa3d: Optimising 3d on Android

27 January 2011

ShiVa3d: Optimising 3d on Android

Just discovered "Delta Time".

In Shiva I'm applying 'Delta time' to anything and everything that moves in the game. You can do this by:-

1. Getting last frame time with something like this:-

local nTime = application.getLastFrameTime ( )

http://www.stonetrip.com/developer/doc/api/application-getLastFrameTime

2. Then whenever you apply movement or a physics force to something apply this calculation to the value:-  value*nTime*60 (the 60 being 60hz refresh rate).

Then, even if your device is only managing 10FPS you'll still have exactly the same play speed as if it was playing back at 60fps. It will also mean that playback is at the same speed on your device and in the editor, reducing the number of times you need to compile, copy over to and run on the target device. (My phone (its old) can't be used with the Shiva tools .apk)

3. Minimise the number and/or complexity of colliders - use Shiva box shapes with 100% transparent materials and collider attributes applied to them whereever possible. DO NOT just apply them to complex meshes or entire level models as it will quickly kill FPS.

My poor old HTC Hero can only muster a measily 10FPS but the game is still playable.

Which means I can hold off from buying a new phone for now. :-)

5 comments:

oakleyses said...

christian louboutin outlet, louis vuitton outlet, longchamp outlet, prada outlet, louis vuitton outlet, uggs outlet, christian louboutin, michael kors outlet online, ugg boots, replica watches, nike outlet, christian louboutin uk, chanel handbags, uggs on sale, tory burch outlet, longchamp outlet, cheap oakley sunglasses, michael kors outlet, burberry outlet, tiffany and co, tiffany jewelry, polo outlet, polo ralph lauren outlet online, ugg boots, nike free, oakley sunglasses, longchamp outlet, oakley sunglasses, ray ban sunglasses, prada handbags, uggs outlet, kate spade outlet, burberry handbags, oakley sunglasses wholesale, jordan shoes, ray ban sunglasses, louis vuitton, louis vuitton outlet, ray ban sunglasses, gucci handbags, michael kors outlet online, michael kors outlet online, louis vuitton, christian louboutin shoes, nike air max, nike air max, oakley sunglasses

oakleyses said...

vans pas cher, replica handbags, nike roshe run uk, hollister uk, burberry pas cher, sac hermes, kate spade, true religion outlet, ray ban uk, michael kors pas cher, coach outlet, oakley pas cher, nike air force, lululemon canada, air max, mulberry uk, longchamp pas cher, true religion jeans, true religion outlet, new balance, nike roshe, nike air max uk, north face, nike tn, nike air max uk, abercrombie and fitch uk, coach purses, ralph lauren uk, michael kors, hollister pas cher, michael kors, hogan outlet, sac vanessa bruno, nike free uk, true religion outlet, polo ralph lauren, michael kors outlet, north face uk, coach outlet store online, converse pas cher, ray ban pas cher, nike blazer pas cher, nike free run, polo lacoste, timberland pas cher, nike air max, guess pas cher, sac longchamp pas cher, jordan pas cher, louboutin pas cher

oakleyses said...

ugg uk, pandora jewelry, ugg,uggs,uggs canada, pandora jewelry, moncler outlet, canada goose uk, moncler, louis vuitton, canada goose jackets, louis vuitton, replica watches, barbour, thomas sabo, converse, marc jacobs, moncler, canada goose, vans, canada goose, pandora uk, ugg pas cher, louis vuitton, ray ban, links of london, toms shoes, moncler outlet, louis vuitton, hollister, wedding dresses, canada goose outlet, barbour uk, lancel, louis vuitton, juicy couture outlet, canada goose outlet, moncler, moncler uk, swarovski, montre pas cher, swarovski crystal, canada goose, coach outlet, ugg, gucci, karen millen uk, nike air max, supra shoes, converse outlet, hollister, juicy couture outlet, moncler, doudoune moncler, pandora charms

Anonymous said...

jordans shoes
jordan outlet
supreme official
golden goose outlet
kyrie 7
giannis antetokounmpo shoes
bape
stephen curry shoes
supreme outlet
supreme new york

Anonymous said...

jordans shoes
jordan outlet
supreme official
golden goose outlet
kyrie 7
giannis antetokounmpo shoes
bape
stephen curry shoes
supreme outlet
supreme new york