Best Way to Handle Complex Level Architecture in Games

Last Updated:

  1. fastismatt

    fastismatt New Member This Topic's Starter

    Dec 22, 2009
    Likes Received:
    Hey all,

    I'm designing a 2D sidescroller-style game and I'm trying to figure out the easiest way to design a map. Right now my plan is to have two layers for the map, one invisible and one visible. The visible one will simply be painted into the background, and the invisible one will not actually be painted. The invisible one I plan to have as an array of numbers where each cell corresponds to a tile in the landscape. How the player interacts with the landscape at that tile depends on the value held in the cell.

    Now I just need to figure out an easy way to import values for this array which may be thousands of columns long. My plan right now is to create a grayscale image where each shade of gray corresponds to a different type of surface, and then to import this image as a bitmap. However, I can't find a way to turn the bitmap into an array. Is there an easy way to do this or a tutorial anywhere I can read?

    Or does anyone have a better approach to this problem?

    Thank you,

  2. KeithG

    KeithG Well-Known Member

    Nov 15, 2009
    Likes Received:
    If you have an hour to kill:
    Google IO 2009 -- Developing real time games

    That session video was fairly informative and packed with some decent ideas on how to get acceptable frame rates .. and what will kill your FPS (specifically the garbage collector)

    He's developing "Replica Island", which you can follow the blog here.

    This blog post, contains some decent links to other game engines & other references ...

    Hope that helps

Share This Page