1. Check out our companion app, Forums for Android! Download from Google Play

Images or Shapes?

Discussion in 'Application Development' started by Kailas, Aug 26, 2010.

  1. Kailas

    Kailas Member
    Thread Starter

    Aug 25, 2010
    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.

    Attached Files:


  2. id0001

    id0001 Well-Known Member

    Apr 20, 2010
    Student.. also software developer
    I think the most efficient way is to create a single custom view where you draw images directly to.
    You would have a 2d array of tiles and then you draw !! only the tiles that are visible on the screen.


Share This Page