'Bimap To large For Memory
I am coding a game in java similar to Among us (A game where the important part, for now, is that players see only part of a big map) and the way I was drawing the map is with a bitmap that is several times larger than the screen, and I move the position of the map around, but the bitmap is too large for the memory, does anyone have an idea to help me fix this? or a different idea for loading the map?
Solution 1:[1]
AFAIK, most map UIs (whether with real maps or game maps) use a tile system, where the map is divided into tiles that get loaded and unloaded as needed. See Peter Laurence's libraries for the classic View system and Compose UI.
And, if you are developing a game, see if your game framework offers some sort of map solution.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | CommonsWare |
