Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 30 — August 22nd-25th 2014 — Theme: ??? (Suggest a Theme)
  • Ludum Dare 30 Begins: in 25 days, 10 hours, 33 minutes, 56 seconds
  • [ Real World Gatherings | Ludum Deals (coming soon) | MiniLD #53 ]


    How Run Away maps work?

    Posted by (twitter: @Dax0u)
    December 20th, 2011 8:37 am

    Hello everyone!

     

    A little post to explain how I create levels in Run Away.

    All the system is based on pixels.

    First I got my set, here is my Hell set.

    Then I create on my paint editor a new image where 1 pixel is one tile in the game (classic).

    To choose which tile to use, I work on the Red color, Grass will be 0, Water will be 100 …

    Then I add foes, bonus, checkpoints  and tuto points with Green color

    And to conclude, the Blue allows me to select a specific one. For exemple I can chose the foeI want to spawn.

    Here are my maps

     

    For the last one, that’s what we have in game:

    In the game, the loading is really static, I could have added information on the Alpha of the first pixel to store data on the level for exemple the set (if it’s forest or lava) and the id (to know the order).

    My local values for each colors.

    int GrassRed = 0;
    int WaterRed = 100;
    int PanelRed = 130;
    int EndRed = 150;
    int SpikeRed = 160;
    int BossWallRed = 170;
    int DefaultRed = 255;

    int SpawnGreen = 100;
    int CheckPointGreen = 200;
    int FoeGreen = 150;
    int BonusGreen = 160;
    int TextGreen = 170;
    int ShadowGreen = 180;

    int FishBlue = 100;
    int BirdBlue = 101;
    int SawBlue = 102;
    int HalfSawBlue = 103;
    int HalfSawLeftBlue = 104;
    int BirdNoCollideLeftBlue = 105;
    int BirdNoCollideRightBlue = 106;
    int SawNoCollideTopBlue = 107;
    int BossBlue = 120;
    int BossDamageBlue = 121;

    //int SpawnSideRightBlue = 255;
    int SpawnSideLeftBlue = 254;
    int SpikeRightBlue = 254;
    int SpikeBottomBlue = 253;
    int SpikeLeftBlue = 252;

     

    Thanks for reading, if you want some other little post on how my game works, please comment :)

    2 Responses to “How Run Away maps work?”

    1. Deza says:

      Why not store them in three dimensional vectors? Seems much easier.

    2. Dax says:

      I prefer to have a graphical vision of the map, especially when we don’t have much time and I don’t have an external tool to visualise it.
      Besides I can use my image map in XNA like a ressource in my content while text files are not managed.
      And if I want something smaller then my pictures, I need to have binary files that I can’t edit easily.

    Leave a Reply

    You must be logged in to post a comment.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]