How to draw lots of bitmaps on screen in an Android game without slow performance

前端 未结 6 1979
一个人的身影
一个人的身影 2020-12-28 20:32

I want to make a tile based game for android. At the moment I am drawing each tile as a separate bitmap. I have a big for loop that reads from a string and draws different

6条回答
  •  攒了一身酷
    2020-12-28 20:51

    another thought, from a non programmer, is maybe create a large tile background that scrolls, etc.. and a second top layer where moveable items (players, npc, items) are drawn on top of the background. therefore scrolling should be faster and less overall (re)rendering. I imagine this might be more resource intensive than referencing already rendered tiles (as mentioned in another suggestion above).. but it might not be, you'd have to give it a shot and see. :-)

提交回复
热议问题