Results 1 to 6 of 6

Thread: Map Editor Extras (need help)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    1

    Map Editor Extras (need help)

    Hi everyone!
    Im sorta new to thes forums and I was hoping i could get some help
    I'm making a Tile Map Editor(2d) in VB.net(2005). I got the basics down, i.e, TileSetBrowser, TileMap, able to place tiles on the map, able to place multiple selected tiles on the map.
    But i'm having a hard time with extra tools besides "Pencil". The tools i'm talking about are:

    Square fill
    Circle Fill
    Line
    Fill
    its basicly like in paint except with tiles.

    Any help would be apperciated

  2. #2
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Map Editor Extras (need help)

    Ok and what is your Question?
    I dont understand what you are asking..

    (200 Posts! )

    506C65617365205261746520506F7374732E2E2E

  3. #3
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: Map Editor Extras (need help)

    well since its Vb.net you can use

    picturebox1.creategraphic.fillrectange

    for the line you can set the inital coords in the mousedown event then draw the line to the current mouse position.
    Rich

    A)bort, R)etry, I)nfluence with large hammer.
    Please take a moment to rate useful posts.

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: Map Editor Extras (need help)

    Not too sure Rich read your entire post, since you obviously can't use the graphic objects to (directly) place your tiles.

    What you could do, if you did want to use a lot of concepts of paint programs is the following.

    Create an off-screen bitmap/graphics object the same dimensions as the user's map.
    Assign each tile type to a colour.
    As the user edits the map update the graphics object appropriatly (each time a user places a tile(s) on the map).

    To deal with more complex stuff (as you listed) you could use appropriate graphics methods (like the FillRectangle function Rich mentioned) to draw on the bitmap. You'd then scan for changed pixels and update your tilemap accordingly.

    This method could be very quick for implimenting many different paint-like functions (as little as one changed line (the graphics method called) per function). Also, if you do go with the first method you could even display the graphics object as a small 'overview' of the user created map.However, if your map is very large then the update may take too long for it to be useful.

    If that is the case you'd have to code each function yourself. It would be useful to search for info on these functions implimented in a paint program, since the method would be exactly the same. Instead of dealing with pixel colours you'd be dealing with tile types.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  5. #5
    New Member
    Join Date
    Jun 2006
    Posts
    4

    Re: Map Editor Extras (need help)

    Well, if you got the basics right then you must have done it using Bitmap and Graphics class.

    @SLH
    What you said wouldn't be right.. I mean he can just make square by looking at point a and B and changing the tiles in beween.

    The other ones I don't know. I'm guessing he stored the tile data in to an array like so, Tile(layer, x,y) = data. Thats how i would do it.

  6. #6
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: Map Editor Extras (need help)

    Quote Originally Posted by Mr_mo
    Well, if you got the basics right then you must have done it using Bitmap and Graphics class.

    @SLH
    What you said wouldn't be right.. I mean he can just make square by looking at point a and B and changing the tiles in beween.

    The other ones I don't know. I'm guessing he stored the tile data in to an array like so, Tile(layer, x,y) = data. Thats how i would do it.
    Why must he have used the Bitmap and Graphic class for a tile engine? He's placing tiles on a grid, not changing colours of pixels...

    I know he can do a rectangle (for example) very simply with a few for-loops, (and I suggested doing each manually as an option in the last part of my post), however i thought it may be easier to try the first method i gave when he comes to doing circles, filling areas, and more complex operations. P.S. There's no right and wrong, just different ways of acheving the same thing, i suggested 2 ways.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


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