Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Map Editors!

This topic is 6785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lately, I have noticed that alot of people have been complaining about having to make map editors. Classic examples are: Yeah, I know a map editor would be good, but it would take ages to build, or, it would take heaps of skill to make a map editor. Well, this post will hopefully show you guys that a simple map editor can be built in a short time frame and with a little amount of effort. Ok, for the puposes of illustration, I am going to assume that the engine is a tile based engine and that it reads it''s level data from a file. Lets say we have a world that we want to populate with grass, trees, rocks, animals and what ever other stuff one can think of. Simply build a standered window and place heaps of blank squares on it, resemblying a checker board. Now when a user clicks on a square the program displays a level tile there, the user just keeps clicking until they get the tile they want. That is easy to implement in code. To be honest, if U can''t do something like that, I don''t know how U are handling DX. Of course things start to get a little more complex when tiles take up more than one square, but that should not take too much more effort to implement. This assumes that U know a little about the win32 API and that U are creating the map editor for a 2d game Hope that helped - I ain''t wana see any more complaining about building map editors, or I will go crazy, arhhh! ~Spike You can contact me at luke_howard@dingoblue.net.au

Share this post

Link to post
Share on other sites
I agree. I was a bit touchy about making a map editor for the game I'm working on now, but I did, and I must say it turned out pretty good! Also, the mad editor itself teaches you a lot about how the tile system is going to work in the game, in a simpler environment (and with debugging available ).

Plus, if you have something like Delphi, Visual Basic, or C++Builder, the windows part will be [u]really[/u] easy. Although I used VC++ and MFC anyway, just so it would be easier to share code if the projects were in the same directory and workspace...

Jonathan Little

Edited by - Qoy on 4/17/00 12:55:37 PM

Share this post

Link to post
Share on other sites
I think a good soulution is that you load the file, edit it and then saves it OVER the old file.

Maybee i''ve misunderstood your question...

Game project(s):

Share this post

Link to post
Share on other sites
Yes, It appears I forgot to look over the file writing part.
Never mind, this part is not to much harder. Simply assign a number to each object( eg. 4 = tree ). Then write each tile in order to the file, so you will have a file looking like this:


Of course the file will be larger than that (most probably), but that should give you the basic idea.

Now it comes to writing that stuff into the game. Build an array to hold this data:

int tiles[25, 25]; // used to hold tiles read from file

Now you simply take the numbers from the file one by one, so that the array reads the same as the file. Note how I made the array 2 dimensional, I find that that always helps, as you can take the world row by row, collum by collum.

Hope that touched up on that issue a bit.


You can contact me at

Share this post

Link to post
Share on other sites
Hello Guys,

Spike your complaints are dually noted. I''ve posted a message about the map editor I''m building. People need to post so that they can get ideas on how to do something correctly and not screw around and run down the wrong path.

I myself am very new to game programming but not programming and this is my first application having to something with a game indirectly and I promise you I need all the help I can get from people like yourself.

Anyway my map editor is pretty much along the same lines as what you had in your post with the exception that the map data I write to a file will be read by the game engine to build 3D representations of the 2D objects.

Right now I''m building the GUI part of the map editor using Visual C++ and MFC, which is turning out pretty good considering I''ve never used MFC.

But is there anything I''ll have to do different in the code since the engine is 3D based?

Thanks to All and to All Goodnight .


Share this post

Link to post
Share on other sites
hello all,

Well I think everyone has there own way of going about building a map editor. Now if someone has the energy and would like to share with the rest of the gamedev community on how they would go about building one please please wright an artical with the source code to the editor you built. This way someone would accualy see how the stuff you are talking about is implemented.

thanks for your time,


Share this post

Link to post
Share on other sites
I agree with node_5r, I have learned something about tile making and editors, but there is still a gap in between the stage of figuring it out and actually getting a map editor. Any help would be great. Something like source would be great...or an article or something, jsut a little more help...from some people who know. Thanks

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I''m in the process of coding my map editor for a 2D tile-based game like
Warcraft, and I''ve overcomed a lot of difficulties getting it to work out
efficiently. One of the first problems I experienced was an ever-changing
map file as I created more and more tiles. I was saving the index number
that the tile represented and if I happened to change or move tiles around,
it would mess up the entire map file. So instead of associating index numbers
for my tiles, I started assigning types to them. For example a tile could be
assigned a ''grass'', ''water'', or ''dirt'' type. And as long as I kept this format,
I could move tiles around anywhere I wanted without messing up the entire
map file.

Just some food for thought.

Share this post

Link to post
Share on other sites
I currently making my animation/sprite file editor. After that I''ll work on my map editor. It''s being done in VB and I use XML as my data format which makes it easy to read... sometimes :D.

Also when you''re working on the editor it''s best you use the same algo or better yet, the EXACT same function and methodology in your game.

-Now Working on Pokemon like Engine!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!