• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Images or Shapes?

Hi everyone.

I've just started developing a tile based game for android. Seeing as how efficiency is so important on mobile devices, I was wondering how I should go about drawing the level.

Level terrain will be made up of walls and holes, both of which use the same set of simple shapes (see the attached image).

One way of drawing the level is to go through each space in the level and draw the image corresponding to that space type in its position. This is the method I used in the c# level editor I made for this game and it worked but I don't know how efficient it was.

The other way that I've come up with would be having the level as a table containing a View for each space. Each space then gets a small canvas to draw on and they use android's shapes to draw themselves.

I was just wondering if anyone knew which method would be more efficient.
 

Attachments

  • Space Types.PNG
    Space Types.PNG
    5.1 KB · Views: 91

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones