Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Tilemap Editor (working title)  (Read 38213 times)

0 Members and 1 Guest are viewing this topic.

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #15 on: January 09, 2010, 04:53:22 am »
Quote from: "WSPSNIPER"
did you use a seperate image for each tile or did you use a sheet and how if you did cause i am trying to figure out how to clip and blit sheets in sfml like you can in sdl and allegro but can not figure it out yet, sweet editor keep it up


Nope it uses tilesets/tilesheets

mainly the functions you should use is SetSubRect

how I do it is create a sprite for each tile set the sprite to use the tileset image and set the subrect appropriately

then if the current layers tile is that tile then position the tile and draw it.


Anyway
Quote

08 January 2010
   released version 0.8.1 of TilemapEditor

     Change log:
        -New: Toolbar added with three icon sizes (16x16, 24x24, and 32x32) You can configure the size via the Properties Window
        -New: Export all Layers as images added
        -Fixed: Minor problems with gui control positions fixed
        -Fixed: Bug introduced in V0.8 in regards to the default "null" tile being -1 instead of 0
        -Updated: Tiles Window doesn't "shuffle" tiles on resize anymore


Quote

10 January 2010
   released version 0.8.1.1 of TilemapEditor

     Change log:
        -Fixed: Fixed "Fix Tiles" in that it still broke the program and did not respect "null" tiles
        -Fixed: Fixed Export to Image


Quote

18 January 2010
   released version 0.8.2 of TilemapEditor

     Change log:
        -New: Current Layer now shows up in the status bar
        -Fixed: Erase Tool was erasing things on the next row if you went out of bounds on the x axis
        -Fixed: File saving/loading was forcing all characters to be lowercase due to an earlier fix
        -Fixed: Minor GUI corrections
        -Fixed: If you had a selection on the map and then switched tools the selection rectangle stayed on the screen
        -Fixed: On opening a map the current layer resets to 0 (potential bug)
        -Fixed: Status bar didn't update properly on Undo/Redo
        -Updated: If a image can not be loaded then the tileset will go back to default (one white tile)
   -Updated: MapViewer.exe
   -Updated: Test.zip


Quote

20 January 2010
   released version 0.8.3 of TilemapEditor

     Change log:
            -New: Minimizing the application now tells the application to stop updating. Should reduce CPU usage when the app is minimized
        -Fixed: If saving/loading fails it will be reported to the user
        -Fixed: Framerate preference was not respected
        -Fixed: Resizing the main window did not refresh the map properly
        -Fixed: Opening a map with a background sometimes showed the background as white
        -Fixed: Opening a map did not refresh the map properly
        -Fixed: Scrolling a map sometimes did not cause the map to refresh properly
        -Fixed: Minor memory leak when using backgrounds.

Nothingness0x

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Tilemap Editor (working title)
« Reply #16 on: January 24, 2010, 11:23:00 pm »
When you put collision into the editor I think I m gonna use it for my game cause its the best editor I ve seen so far, i mean for now it is not usable, but if you put everything we need into, its gonna be perfect

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #17 on: January 28, 2010, 05:09:50 am »
Haha I would like your definition of usable. Right now I see it as lacking some nice features other map editors have. Collision Layers are probably the next thing I will implement.

But yeah also I did kinda forget some DLL files in the last release (silly me) since I am now linking with the audio libraries of SFML. Those have been fixed now.

Also thanks for all of your bug reports!  :D

Quote

31 January 2010
   released version 0.8.5 of TilemapEditor

     Change log:
        -Fixed: If you load the same image twice the application asks if you want to replace the first
        -Fixed: Save always brought up the filedialog window
        -Updated: Map name is now displayed in the title bar
        -Fixed: Config file was being saved in the wrong place sometimes.
        -Updated: You may now save to image if there is no tileset (before the app ignored it)
        -Updated: Cooler Selection Rectangles
        -Fixed: Resizing the editor when you had a tile selection killed the selection.
        -Fixed: Creating a new selection on the map required two clicks (now you can just select outside of the selection)
        -Fixed: Erase Tool and Rectangle Tool use when first click is out of bounds

29 January 2010
   released version 0.8.4 of TilemapEditor

     Change log:
        -Fixed: Map did not refresh correctly on Clear
        -Fixed: Hiding the layer you currently are editing now makes the app yell at you
        -Fixed: When loading a tileset the tile window fully snaps to the image width when loaded.
        -Fixed: When changing a tileset or tile dimensions if a tile becomes invalid it will be set to -1
        -Fixed: Bug when opening and then creating a new map
        -Fixed: Bug with Erase Tool

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #18 on: March 01, 2010, 08:38:11 am »
New version.

Quote

28 February 2010
   released version 0.9.0 of TilemapEditor

     Change log:
        -New: You may now dim lower layers
        -New: You may now set the grid size in tiles
        -New: TileBased Collision Layers
        -Fixed: On loading a map where the image is missing the application now asks for that image instead of exploding
        -Fixed: Fixed a couple of bugs with Undo/Redo

Lokk

  • Full Member
  • ***
  • Posts: 228
    • View Profile
    • http://betadineproject.wordpress.com/
Tilemap Editor (working title)
« Reply #19 on: March 05, 2010, 11:41:51 am »
Good job !
Is there any documentation about the map format ?

Nothingness0x

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Tilemap Editor (working title)
« Reply #20 on: March 15, 2010, 12:36:06 am »
I do not understand how the collision management works ? I mean how do I put collision on my map ?? Besides can you tell us more about the way the map are saved ?? In an xml file ? Every informations are saved ? (tiles positions collision ...) It would be helpful to know this in order to program a map reader using your maps in our games

thanks

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #21 on: June 01, 2010, 03:50:36 am »
Haha well I feel that I can call this V1.0 now. I have fixed plenty of bugs and redid some of the things in the program. So there are a lot of changes in this version if anyone just happens to have did something with this your .map files are now incompatible you are still able to load it within the program though (File > Import > Other).

Quote

30 May 2010
released version 1.0.0 of TilemapEditor

Change log:
-New: XML Exporting / Importing
-New: GBA formats Exporting
-New: User Manual
-New: Improved .map format (see Technical Information in User Manual for specification) the program will still load the older version.
-New: Advanced Import / Export (use this to open maps saved in the older format)
-New: Map Walker Program to test collision and a generic starter for games.
-New: Playtesting maps from within the program
-New: You can now zoom in/out the tileset
-Fixed: Selection when selecting from different corners
-Fixed: Selection not vanishing when switching from Select Tool.
-Fixed: Zooming in on map is a lot nicer (camera stays in its position)
-Fixed: Tile Window always changing when image loaded / changed map properties. Now it only changes when a new image is loaded or tileset zoom changes
-Fixed: In addition made the Tile Window sash change less annoying when loading wide images.
-Updated: Map Viewer Program to work with new map format.
-Updated: You may now load from a txt file


Also as usual any bug reports are appreciated! :D

And lastly here is the Source code for the MapWalker program (IN C++) this can be used to make a basic game that uses maps made by my program

MapWalker

@Nothingness/Lokk Sorry for not responding sooner, college caught up with me :/ the map format used was documented in the first post (though the link for it was rather hidden). I have changed the format and it is now documented in the User Manual provided with the program.  The source code above includes a reader for the new format.

To use the collision editor all you have to do is Map > Properties under the Collision Tab select HasCollisionLayer.  Then choose MapBased and TileBased (the only type supported at this time).  From there change the current layer to collision and then you are able to tell which tiles are passable or not.

Nothingness0x

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Tilemap Editor (working title)
« Reply #22 on: June 01, 2010, 01:05:07 pm »
yeah but you didnt post the version 1, the one in the first post is still v o,9

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #23 on: June 01, 2010, 01:28:39 pm »
The link always points to the latest version? I downloaded it and checked...

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #24 on: June 07, 2010, 11:17:53 pm »
I updated the first post with more up to date material

Also another update
Quote

07 June 2010
   released version 1.1.0 of TilemapEditor

     Change log:
        -New: Map Templates. To use have a map named template.txt (in the proper format) in the same directory as the program.
        -New: Map/Layer shifting
        -New: Capturing areas of the map and using it as your current tile (Eyedropper)
        -New: Save on exit.
        -New: File History.
        -Fixed: Memory leaks in a couple of special/error cases (TextMapHandler)
        -Updated: Now always shows the background of the map in a faint blue.
   -Updated: Config file format.

Quillraven

  • Newbie
  • *
  • Posts: 11
    • View Profile
Tilemap Editor (working title)
« Reply #25 on: June 18, 2010, 05:38:27 pm »
is there a reason, why you use -1 for "unused" tiles instead of zero? -1 is harder to "parse" than a zero imo.

also your xml file has a lot of unnecessary whitespaces, which again, makes it harder to parse/read.

would be nice, if you can optimize that a little bit? :)

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #26 on: June 19, 2010, 02:48:11 am »
I don't believe its any harder to parse if the unused tile is -1.

All you have to do to parse that section of data is to split the data into tokens using space and a new line as a delimiter (you can use strtok or something equivalent).

And then for each token from the string just convert it into an int (atoi or something equivalent).

or you can use stringstream. either way should work well for this.

Btw in my next update there will be more negative numbers (not just the unused tile) in the layer data for animated tiles.

And as for the whitespace thing splitting the string into tokens should take care of that, but I use wxWidgets to export the XML data and I just have control over the Nodes and Data it outputs, I'll check again to see if I can fine tune it.  But really that shouldn't be a problem if you follow the method above.

But you could also use an xml reading library like tinyxml or something. I haven't used tinyxml for anything, but I've heard good things about it.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Tilemap Editor (working title)
« Reply #27 on: June 19, 2010, 06:07:36 am »
I'm not a fan of xml unless it's specifically for user editing.

Maybe a better solution would be for output modules so you don't have to worry about your code base going out of date or hacking it together just to change it?

Then with a quick edit you can make it 0 or whatever you want and never have to worry again.

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Tilemap Editor (working title)
« Reply #28 on: June 19, 2010, 08:08:16 am »
Xml is not the main save type of this program, It is actually my own format .map . How the data is laid out in the format is explained in the User Manual.  

Also I do not understand what you are suggesting in your post.  If it is what I think you mean then I have already done that.  There are several ways to save your map (.map, .txt, .xml, .png, etc.)  And in the future if someone wants it to support another format they will be able to write a handler for it.

Also there is already a reader for my .map format in my first post. It is included with the sample program's source code.

But I am not changing the unused tiles tile id I've changed it many times before and it will break files exported from the program which the number of times I do this I want to keep very small.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Tilemap Editor (working title)
« Reply #29 on: June 20, 2010, 02:48:29 am »
I just don't see the point of negative numbers when they can be characters looked up from char codes (or simply representative characters) to be compact and aid in compression.

There is internal parsing logic either way.