Posted by: EvilNando | July 30, 2008

Tile Map Editor: Version 2.4 RELEASED!!

With each new release the editor is slowly becoming a huge project to maintain.

After a lot of testing and debuggin here is version 2.4.

version2 4

A new feature the editor has is the terrain tool, which is nothing more than an additional layer of detail which you can paint in it like the tile block tool.

terrain list

 

The difference lies in that you can no longer flag tiles with id’s 1 or 0 (meaning passable or unpassable respectively) . Now you have to provide the editor with Terrain types before you can assign them to the tiles.

A terrain type is nothing more than a collection of data that holds an Id, a name, a speed value and a color.

terrain properties

 

The Id is the most important part of the data because it is the id what is going to be interpreted by your engine. this Id need to match the Id from a “Terrain List” to find out which speed value needs to apply to any Actor crossing that section of tiles.

Having this ability in your engine will give you an easy wait to reduce (or increase) a character speed when walking over tiles . This is a good way of representing terrain that it is difficult to walk across (or vice versa).

After you have finished creating all of your terrain types you can choose the terrain brush tool which will activate the terrain selector combo, after this you only need to paint over the map like you have been doing with the rest of tools

terrain combo

Don’t forget that at any time you can toggle terrain visibilty by using the hotkey Ctrl+R or by using the View Menu.

Note that the xml exporter and file saves have been updated to support this data, study how the xml is now structure if you wish to parse it correctly.

terrain xml

As you can see the Terrain Description is listed separated from the Terrain Layout in which you will only find a grid with the Terrain Id’s

If no terrain data has been provided the terrain layer will be filled with 0’s

This means that you cannot assign 0 as an Id value for terrain types.

One more thing: Save files ARE compatible between versions 2.2 and 2.4, yeah I worked hard to make that happen

If you are finding the editor useful please send me some comments, I wish to know which projects are being made with this editor.

Please don’t forget to send any bugs or comments to my email xnafantasy at gmail dot com or simply post a comment in this post.

Go now to the Releases Page and grab this version!

Here are the version changes included in the readme:

version: 2.4

FIXES:
– marquee paint icon replaced
– fixed a crashing bug on the tile palette functionality
– improved performance on map rendering routines
– minor tweaks to the menu layout
– added visual indicators to marquee selections (diferent colors for each marquee tool)
– xmap format supports terrain data loading
– xml exporter exports terrain data

NEW FEATURES:

– New tool: Marque walk block, replaces old walk block tool

– New tool: Marquee terrain brush and terrain type editor:
with this tool now it is possible to assing values to specific areas of the
tile map, this areas can be assigned with a speed factor that can be applied
to actors crossing such areas. Terrain layer and Terrain type list is exported
to XML format as well.

version: 2.3

FIXES:

– none

NEW FEATURES:

– New tool: Marquee eraser, replaces old eraser tool


Responses

  1. Nice work man. I’ll be checking this out when I get some time to devote to map making.. although I wont be able to make full use of the editor since my game engine purposefully isn’t taking advantage of a lot of the features provided.

    Thought you were working on your collision system, take’n a break from that?

  2. Well I actually finished the collisions, only thing left is to check actor to actor collision but right now I dont think thats going to be a problem.

    Looking at the new editor you can guess what I’m trying to implement in the engine right now 🙂

  3. I’ve been working on a few interesting tidbits, GameWindow class and a menu system built off of my old one. Its going along pretty good for now, but I have to re-work a few things 😦 Looks 100x better than the video I posted though.

    As far as actor to anything collision, its one of the more simple calculations you can do IMO. Not quite sure how you’re doing player to tile collisions, but you can work off that or just make a few helper classes to do the calculations for you (in my case, I used the same calculation for collisions, interactions, agro, etc, so much easier for me to put it in a helper class)

  4. (In my game) The collision logic is a class on its own

    the Collision class hands the object that implements it a collision box and also has functions which checks the current map collision layer with itself.

    All i need to do is type down a couple of lines where it also checks against all the actors in the current scene.

    Now that I write about this I think that it will be a good idea to run the actor collision checks inside of cuadtrees because one of the things I wish to have is many many many actors in one scene.

    Talking about the editor: even if you dont need all the current features, it still is a good idea to start using the last version, it has been optimized for perfomance.

  5. I’m curious if you’ll ever have an export to bitmap function? That would be awesome. 😀

  6. how to tile rendering?
    Use xna in winform ?

    (I’m developing tile map editor with c#, but I have problem , gdi+ is very slow..)

  7. @George:

    PNG export is already implemented in the editor but the feature wont be released until version 3.0 (mainly because I have not done proper QA on that feature) for more info: https://xnafantasy.wordpress.com/2008/07/19/new-feature-png-export/

    @Louise:
    Initially I went the GDI+ route but I got huge performance problems early on the development stage, that is why I went for a hardware accelerated rendering solution, in this case XNA

    if you are making a tile editor yourself, you should avoid GDI+ if possible, since you are using C# your best bet will be XNA, but first investigate how to get an XNA surface into a winforms app.
    For more information on this check out Nick Gravelyn’s web, the link is at the side bar in this blog

    Best of lucks

  8. You’re editor looks awesome. However, I am unable to run it. I get:

    An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in XNA Map Editor.exe

    Additional information: Could not load file or assembly ‘Microsoft.Xna.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d’ or one of its dependencies. The system cannot find the file specified.

    but I have XNA Game Studio already installed. I’m not really sure why it can’t find the framework. I downloaded the redistributable again and did a repair just incase something got messed up but it still can’t find it. I’m on Vista 64 so I wouldn’t be suprised if that has something to do with it.

    I am kind of curious though how you are displaying the sprite sheet on the right? Is that a second GraphicsDeviceControl or are you using something else like GDI+ ?

  9. Make sure you have version 2.0 of the XNA GS
    if you actually have this version installed probably it has something to do with vista64 (which I doubt because as far as I know there is no x64 version of the SDK) if this is indeed the problem I don’t know what to do at the moment because I do not have a spare machine where to install x64 vista until late October

    Until then I guess I have to say that Vista64 is UNSUPPORTED

    the “sprite sheet” as you call it is a custom control I created when I was developing the editor under GDI+ , this as you can see was the only piece of code that I could salvage from that doomed project

  10. nah, you salvaged the knowledge and roadmap on how to put such a project together, and I’ll bet it took half the time to build your 2nd (current) editor than it did to build the GDI+ project.

  11. Looks really good. Great work! I don’t see how to define the size of my tiles. Is there only one fixed tile size?

  12. I think its hard coded at 32×32. I just went into Paint.NET and took my tileset (tiles are 64×64) and scaled down the picture by 50%.. then when I loaded it up into my game, used the 100% tileset to read from and it all worked great.. took some XML tinkering though 🙂

  13. Hi! A dummy queston: I tried the prog using a PNG tileset with transparent color but it seems that the application cannot use it correctly.
    With others tiles set it works fine (in this case the bckground color is white).

    Is it normal or it’s a problem? I had to modify my PNG transparent color with photoshop (ie: set it to white) or what?

    thank’s!

  14. the editor supports PNG files with transparency
    thats what I am using for creating my game.

    check out that your tileset texture does not exceed your VGA memory

    tileset.width x tileset.height x 32bpp <= VRAM

    regards

  15. I’m also not sure how it does transparency, weather its a magenta color that renders it transparent or an alpha channel.. might want to look into what your method for transparency is and tinker around.

  16. One thing I noticed by the way, any particular reason you went from -1 for an unused cell, to 1? (skipping 0?)

  17. “(which I doubt because as far as I know there is no x64 version of the SDK) if this is indeed the problem I don’t know what to do at the moment because I do not have a spare machine where to install x64 vista until late October”

    Could you rebuild this and change the output system to “x86” rather than “any cpu”. I believe this will allow it to work on x64 systems. (From a Shaun Hargreaves blog post I saw about a similar problem).

  18. @Craig no reason in particular i just went for an arbitrary value

    @Jon Ill get a new build soon

  19. Is the source code of this ever going to be released?

  20. There is a possibility but right now it is a slim one

  21. Hows your RPG project coming along? Or have you spent too much time with other things (class / life) 😦

  22. Hi Nando, I just wanted to say that, along with others who have posted here, I hope you will release the sourcecode for this map editor, even if it is only for a current build and not for the finished product. I think it would be very useful to many of us if we can tweak even one or two settings which are currently fixed. If you’re not releasing the sourcecode for some other reason, perhaps you can setup the editor in such a way that it uses a .cfg file so you can choose different tilesizes or things like that. In any case, it seems you’ve got a good thing going here, good luck with your project!

  23. ei guys how can i import and add the save map with .xmap file type into xna? sowi just newbie

  24. guys pls help me out on how to add on xna the created map in xna tile map editor. im just new to xna and to this tool in creating a map and this thing is kinda useful on my thesis proposal. so pls pls can some one teaches me to import into xna and show on screen the created map. Thank you very much in advance. ^^

  25. Hey wewkis, take a look over here:

    http://nick.gravelyn.com/tile-engine-series/

    With the project files from his 13th tutorial, you can compile an engine, which can probably be adapted to show a map created with Nando’s editor. The project itself already has a map as well. Good luck!

  26. yow TheCinC thanks 4 d help i think this answer my question ^^. ahhm i have another question have you created an rpg two player game just lyk heroes might and magic in just 3 months long? couz im taking hard time to study xna and build my thesis proposal. i have 3 months left before meeting the 70% of game. good luk to me i guess. wahahaha

  27. woho i’ve seen the video, i think my brain has a major injured, so many codes, is that the way to import .xmap file on xna and display it on screen?

  28. forget the .xmap file, it is a closed format so there is no way for you to work with that, you should invest your time figuring out how to work with the XML file the map editor exports to.

    I suggest you watch the videos one more time.

    Consider this a good resource for learning tile map rendering
    http://xnaresources.com/pages.asp?pageid=21

    good luck

  29. thanks ones again guys for the help and suggestions specially TheCinC and EvilNando

    Sorry for having a lot of question coming from me ^^ i’am just having hard time learning xna. wahahaha

  30. EvilNando i have another question,, Can i use the map that i created in XNA tile map editor which is exported into .xml file and imported to xna?

  31. EvilNando i have another question,, Can i use the map that i created in XNA tile map editor which is exported into .xml file and i will import this .xml file into the content of xna and do some codes to display the created map?

  32. U need to write an xml parser that reads all of the map data that it is exported to the xml

  33. how can i write an xml parser is there any tutorial to that Mr.Armando? can you help me out to display the map i created with this xna tile map editor. pls pls i cant start my project couse im figuring out on displaying the map with .xmap or .xml file type

  34. wewkis, after reading your posts, it sounds like you have never programmed before or you haven’t been programming very long. Jumping right into one of Nick’s later projects is the last thing you want to do. It will just overwhelm and confuse you. What I suggest you do instead is forget about the map you made for now. You should go through Nick’s tutorials, starting from the beginning. http://nick.gravelyn.com/tile-engine-series/

    Yes, I know this will take time and apparently you have a deadline. There really is no other alternative besides grabbing something already made and trying to hack at it to get it to work with your format. If you really are a newbie at programming, then your chances of succeeding with that are slim to none.

    After you finish Nick’s tutorials, you will have a better understanding of the code in his project and you should be better suited to make modifications, including different file formats. There are also several other tutorials that you can find with a quick google search.

    Again, I can’t stress this enough. Don’t just download someone elses finished project and try to hack at it to work. If (and thats a big if) you happen to succeed, then what happens if you need to go back later and make a new change? You’re going to have to repeat the process all over again.

    If you don’t really have an interest in programming and you only wanted to create maps or be in game development, then find some programmer friends that will happily do the grunt work. Otherwise, start learning.

    P.S. You should probably do some research on your projects before you select them. It really sounds like you had no idea what you were getting into before you selected your thesis. Honestly, even with all the learning you would need to succeed at this, you should still have plenty of time to finish your thesis. If you do each increment of the tutorial on seperate days, then it would only take you 14 days. Or you could take a day off inbetween to tinker with it (recommended), and then it will end up at 28 days.

    Also, please don’t take this post the wrong way. I am trying to help you. If it sounds condescending, then I apologize because that was not my intention. Good luck.

  35. thanks for suggestion and the tutorial link Tom, Yeah your right I must learn the basic before going to hardcore programming. ^^

  36. guys can i have a question it is far away from tile engines. I would like to know if it is possible to have a chat option on xna game just like in warcraft that players can chat with 1 another when playing? Is there a tutorial to do that.

    P.S thanx again tom, evilnando and thcinc for the help i’ve already created a map and display it on screen by d use of codes. its fun. wahahaha ^^

  37. Hey I was wondering if you could tell me how you did occlusion?

    Also, are you working on a game for your engine?

  38. You need to sort all your objects by its y-component value either be from top to bottom or bottom to top

    you only need to do this to sprites that are going to be drawn in the same batch

    Right now Im having a break in the development of the game but I plan to resume work any time soon

    Maybe I’ll write a tutorial on sprite sorting since I have been asked many times about this

    good luck

  39. Hi when i try too start the program i only get a message a error xna mapeditor has runned into a problem and need too bee shutdown send or dont send :S dont know what the problem is

  40. Nick, do you think that you’re tile editor will someday support optional tile features such at flip (hz/vr) rotate (by 90 degree increments of course) etc to help us die hard tile artists trying to get away with using as few resources as we can?

    Support for such features would help people utilize much more efficient tile sets and such tile options could be implemented in the XML as a bit packed flag variable that accompanies the tiles index. You’d need 4 bits to to represent my suggested options, two for the flips and 2 for the rotations, and the remaining bits could be used for a number of other interesting effects such as possible tile pixel position offsets. Given that you’ll have a remaining 12 bits (given that we’re talking integers) to work with for an x and y component of the offset (6 bits each that could account for 64 values(+/- 32 the standard tile size). However, that is just one idea off the top of my head. There is a wealth of improvements that could be had if it were given the option to include data on how we want the tiles themselves rendered.

    I’d like to get your input on this, please contact me from the email supplied.

  41. Thanks for commenting

    first of all Im not Nick . My name is Armando in case you want to know.

    there are not many features planned for the tile map editor because I want to finish the game as soon as possible.

    the upcoming features that will make it to the editor in the near future are:

    variable tile size
    animated tiles
    scene tinting
    trigger placement
    actor placement

    these thing that you have pointed out are very interesting nonetheless probably I can think about this for a second version of the game because as I previously said the current game has a fixed feature set and for my sanity sake it will be better if I not stray away from what it is currently on paper

    Cheers 🙂

  42. Is the source for this editor available or could I have it to add said functions for my own use, on the understanding that I will not distribute any amount of the source (both original and modifies) or any executables I create through it’s modifications, lest my skin be boiled, my teeth rot, my eyes be gouged with spoons, my fillings be removes and have to pay some exorbitant fee of [you name it]?

  43. Im sorry but the source code is not available for the general public.

    My intentions are to eventually release it sometime in the future

    Good luck!

  44. Oh well, fair enough. Thanks for your time and consideration.

  45. When will Map Editor be compatible with v3 of XNA I do not use v2.

  46. Very soon, but in case you want to know version 2.0 and 3.0 can coexist in the same box with no problems at all , its what I’ve been doing so far

  47. I will not be installing v2 at all. What type of ETA will you need, from what it looks move the project to VS2008 reference the v3 dll and recompile.

  48. mmm ok

    Ill try to release a fix by Monday , there are a couple of bugs a wish to address before releasing anything so the weekend will give me plenty of time to do so.


Leave a reply to EvilNando Cancel reply

Categories