bitmap size exceeds vm budget

Put your problem here if it does not fit any of the other categories.

bitmap size exceeds vm budget

Postby multiplydivide » Sat Sep 17, 2011 1:01 am

I am having an issue with exceeding my virtual memory.
I have a game framework which greatly resembles the game framework from the book "begining android games" by mario zechner, with some mild modifications.
I am loading in a large number of high res sprites, totaling roughly 7megs, and continue to get an error that I am exceeding my virtual memory.
it is my understanding that I should have at least 16 megs total to play with, could anyone give me some insight on this?
Thanks
multiplydivide
Developer
Developer
 
Posts: 34
Joined: Wed Apr 28, 2010 2:09 am

Top

Re: bitmap size exceeds vm budget

Postby multiplydivide » Sat Sep 17, 2011 2:32 pm

So I have found my problem and am now searching for a solution.
The original problem was I was ignorant as to how android stored their images and that they take up roughly double the memory of the png file, so moving on to a new solution....

I am trying to create an evolution game where as you grow sprites of increasing size come in that you must avoid, right now I am loading all necessary images/sprites for the game at once, one way I could possibly save on space would be to asynchronously load in the larger images as they are necessary, recycling the smaller, and now not so necessary images, however to create the feeling of a living breathing ecosystem I would like to be able to incorporate all sprite images within the world at all times

to read all the necessary images in I can scale some down, but when I go to draw them I am going to need to scale them up again, am I truly limited to only 24 megabytes of space or is there a way/trick to loading more images in, I have seen some pretty elaborate games running on android devices and I cant imagine they stayed true to only 24 megs of space.

Thank you in advance for any and all help...
multiplydivide
Developer
Developer
 
Posts: 34
Joined: Wed Apr 28, 2010 2:09 am

Re: bitmap size exceeds vm budget

Postby phishman3579 » Tue Sep 20, 2011 2:47 am

I've run into this problem also when doing motion detection. This solution wasn't right for me but it may help you.
http://stackoverflow.com/questions/4775 ... 966#823966
phishman3579
Freshman
Freshman
 
Posts: 9
Joined: Sun Aug 28, 2011 4:49 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests