Maps :)

This is a discussion on Maps :) within the Game Programming forums, part of the General Programming Boards category; Hey everyone, I am currently making a 2D game (again), but currently my guy can only jump around in the ...

  1. #1
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    Arrow Maps :)

    Hey everyone, I am currently making a 2D game (again), but currently my guy can only jump around in the empty 640X480 screen. I don't want to hard-code a map into the game (which would really suck), but I don't want just a few rectangles for obstacles or something. So for a map format, I was thinking of how I might be able to easily edit a map and add miniscule details, and I thought of creating a 640X480 monochrome bitmap and using the "colors" to define which areas (pixels) are obstacles, i.e. you can't go through them. That way I could edit a map using Paint, and I wouldn't have to make a level editor or anything.

    Is this a good idea, or should I think of something else?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    More details, please?

    What you suggest would be great for a maze type thing, but horrible for trying to program Super Mario World.
    Away.

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    great for a maze type thing, but horrible for trying to program Super Mario World.
    9999 GB map!

    Well, I'm aiming for a Liero-style game (ever played it? It's like a real-time Worms). So I need to be able to have the disappear-when-blown-up terrain, like in any decent Tank Wars etc. game. Everything stays on 1 screen, the 640X480 window. A couple of really small characters jump around/grapplehook/shoot, and basically try to kill each other. So it's not exactly a maze, which would be more like tiles, but it's not a side-scrolling storyline-driven game either.

    Is that detailed enough?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Well to destroy your onscreen bitmap is not hard. First load in the original bitmap into memory and then as things blow up and tear up the terrain, simply remove pixels from the bitmap - and use this bitmap in your double buffer.

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Ah, right! That makes sense. Although currently, I'm just using FillRect() to make a black background. But to remove and check if pixels are movable, should I be using SetPixelV()/GetPixel()? Or is there some better way of accessing the whole screen's pixels?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading maps
    By divineleft in forum C++ Programming
    Replies: 1
    Last Post: 07-05-2006, 10:09 AM
  2. Hash_map, STL maps query
    By alvifarooq in forum C++ Programming
    Replies: 15
    Last Post: 06-07-2005, 09:07 AM
  3. DDX/DDV and Message Maps
    By axr0284 in forum Windows Programming
    Replies: 2
    Last Post: 01-07-2005, 07:55 AM
  4. maps as reference?
    By robquigley in forum C++ Programming
    Replies: 2
    Last Post: 11-26-2003, 08:12 AM
  5. Finding terrain maps...
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-25-2001, 07:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21