Results 1 to 10 of 10

Thread: Map Editor, Where to start?

  1. #1

    Thread Starter
    Hyperactive Member psycopatchet69's Avatar
    Join Date
    Sep 2004
    Location
    Grand Rapids, MI
    Posts
    256

    Map Editor, Where to start?

    I am learning Direct draw, and i would like to make a map editor for an Rpg. Can anyone help me here? I dont know where to start...A few things the editor would need
    For my first editor, these few simple things would work

    -load a bmp (tile set)
    -create a new bmp with user defined width and height
    -Let the user (mainly me) drag the cursor on the tileset to select a tile in 16/16 intervals (all my tiles are big, but 16/16 intervals)
    -Save as new bmp

    Can anyone help me with this? Or at least point me somewhere to help me?

  2. #2
    you should not save maps as bmp, you should use multi-dimensional array to save the bitmap x, y in tiles

  3. #3

    Thread Starter
    Hyperactive Member psycopatchet69's Avatar
    Join Date
    Sep 2004
    Location
    Grand Rapids, MI
    Posts
    256
    Alright, then i guess ill do that, but i dont know where to start, can you help me with that

  4. #4
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    On my very first tile engine my map file was simple a text file full of numbers

    Each number represented a tile gfx, or an object, or a character.
    6x6 square of tiles.
    0 0 0 0 0 2
    0 1 0 0 0 0
    0 0 0 0 0 0
    0 0 0 3 0 0
    0 4 0 0 0 5
    0 0 0 0 0 0

    In that case each number repsented a rock, or a tree. All the zero's were the basic grass tileset.

    Easy to use and manipulate but not worthy of anything professional.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  5. #5

    Thread Starter
    Hyperactive Member psycopatchet69's Avatar
    Join Date
    Sep 2004
    Location
    Grand Rapids, MI
    Posts
    256
    Halsafar, do you still have that old editor? If you do, would you mind if i had a look at it to help me figure this out?

  6. #6
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    If I do it will be on one of the sessions on one my many cd-rw backups.

    I'll take the time to look around.

    As for now what exactly do you need to understand?

    Pick a file format, if it the idea above then great its easy.
    Write some code to load up the file.
    That is all up to you, what I did was have a big array full of graphics which corresponded to the number on the map. It also help all the player graphics and stuff.

    So for making maps, I just loaded that same array into icons in the form. Then created a grid using only lines. It is easy to get mouse coords so you can easily know which tile the user is in.
    Have him select a tile, click, place the tile in a 2 dimensional array so you can save what id it was.

    When you save, just save the file, oop through the array saving row by row.

    I'll PM you if I find it. Its gotta be somewhere, it will more clearly show it.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  7. #7

    Thread Starter
    Hyperactive Member psycopatchet69's Avatar
    Join Date
    Sep 2004
    Location
    Grand Rapids, MI
    Posts
    256
    Well i started work on what i said in my first post, and i uplaoded it.

    Im going to add a collision generator for it next, using basically the same method, with creating shapes, and the drag method, and then saving all the coordinates into a txt
    Attached Files Attached Files

  8. #8
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601
    nice start.

  9. #9
    New Member
    Join Date
    Dec 2004
    Posts
    13

    Smile Re: Map Editor, Where to start?

    Hey, I just realised that I asked a question about the tiling you used in my new post, Halsafar. I sent you a Private Message, but I guess you didn't get it. So could you reply in the new post about the method you used? If you have that file on a CD-RW backup, that'd be really helpful

  10. #10
    Junior Member
    Join Date
    Dec 2004
    Location
    Örebro, Sweden
    Posts
    29

    Re: Map Editor, Where to start?

    I have made a really simple editor, but it has 2 layers, and 4 different tiles, (two for lower, and 2 for upper layer), and then you can save and load the maps, you can take a look at it =)
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width