android - How to use lots of bitmaps in a game without exceeding VM memory budget? -


in game have 12 different animations , each animation consist of 10 bitmaps , each bitmap 200x150 pixel. every time user touches screen(virtual gamepad) 1 of animations play. easy job performance wise having trouble. loading bitmaps on array beginning of game cause crash game because of vm memory budget problem. seems other option recreate bitmaps everytime need , recyle them, might cause lag because of creating time , garbage collection. can't think of third option asking you. there memory efficient , not laggy option ?

that's 14mb of memory animations might lot vm heap should fit nicely graphics card memory. assuming using opengl (if not have to). in case can build frames one-by-one, bind them texture , release them vm's memtory. fast wouldn't or offer sort of loading feature if lag greater 1/2 second or so.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -