Jump to content
  • Advertisement
Sign in to follow this  
Rikonator

Map Editor/Tookit

This topic is 2325 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

I'm a pretty new game developer (if I can be called that), having started working with C++ and SDL recently. I managed to make a few simple clones. I also worked on a platformer (more of a tech-demo), with poor physics and levels created using a tile editor I made in SDL.

I now want to improve the complexity of my games, and hopefully create a good, unique 2D game. I have been reading about game physics and am trying to create an engine with basic physics. I intend to have complex game objects, as well.

Now, to I want to make a utility or a map editor to help me design levels which my game can use. Something in which I can place objects arbitrarily, and define their properties.

I have been searching, but I haven't been able to find any tutorials/articles for this particular topic. I'll really appreciate if you can tell me how I should approach this. And what should I use to do it. Is SDL sufficient, or do I need something else?

Share this post


Link to post
Share on other sites
Advertisement
The question is quite broad, I don't think there's a simple (or any) answer to that question.

[spoiler]It totally depends on the game: tile/gird based or not, how large the maps are, is there some kind of portal system, like rooms or not. Heck, we don't even know what genre you have in mind.

Totally depends on your goals with the editor (do you wantat reusable, complex tool, or just something with which you can make maps for that specific game), etc.

Maybe MS paint is just enough for the job, probably with a dead simple, external tool for converting the color data for your map format. This would be sufficient for a tile/grid based game.
Maybe a simple text editor would be enough, where you specify coordinates, properties of object or whatever.
Maybe some generic XML editor would suffice.

Or maybe you could roll your own. In that case, the "approach" is no different than making any application. Just take a piece of paper and a pen, then start brainstorming. If you have specific questions while doing it, you will find the answer for them. But a general "tutorial how to make YOUR editor" doesn't exist (I hope...).


EDIT: sidenote: learning "how to approach" problems is the guts of software development in my opinion (well, it's certainly the gut of something, but we may be arguing about the meaning of the term "software development").
Learning/getting this skill is very important. And IMHO the only way to learn it is to struggle with it on your own.
[/spoiler]

EDIT2:Oh, sorry, I totally missed some of your paragraphs... Edited by szecs

Share this post


Link to post
Share on other sites
You can use Tiled to create maps. It allows for custom properties to be added to tiles, layers, and objects.

If you really want to make your own... well that's a decent undertaking. I'd recommend using Qt for your GUI, and to start by figuring out how to create simple Qt applications, building up to your map editor. Or you could just modify Tiled as necessary, but that's still a fair amount of work to figure it all out. Edited by Cornstalks

Share this post


Link to post
Share on other sites

You can use Tiled to create maps. It allows for custom properties to be added to tiles, layers, and objects.

If you really want to make your own... well that's a decent undertaking. I'd recommend using Qt for your GUI, and to start by figuring out how to create simple Qt applications, building up to your map editor. Or you could just modify Tiled as necessary, but that's still a fair amount of work to figure it all out.


For a level editor, I would stay the hell away from C++. Even with Qt.

The end result of a level editor is generally a data file. It doesn't need to be fast, nor in the same language as your game, so there is little to no reason to pay "the C++ tax". This is one of the reasons why C# is so popular among tools programmers. Unlike in C++, making GUI apps doesn't involve the same amount of fun as a root canal.

That said, if you do go ahead with C++, use Qt!

Share this post


Link to post
Share on other sites
I have been searching some more, and I came across this article.

It looks quite suitable for what I have in mind. Something like this will also allow me to place objects arbitrarily, and define behavior.

What I have in mind is a top-down action/puzzle game in which you have to lure your enemies into traps. In my map editor I would like to place these traps, mark their bounding polygon, along with their position, orientation and scaling. You can have different types of traps. One is your run-of-the mill snap-trap, which ensnares when you step on it. The other is triggered by a button somewhere on the map, which swings a hammer about a certain point, smacking any enemy unlucky to be there. So say I load the snap-trap object, I can mark it's behavior as self-triggered and effect as ensnaring. Then I load the hammer-trap, which is triggered by the button object, and adds another collidable entity into the world, which swings in a certain area, having certain acceleration, mass, etc. This trap will have a new game object to add when it is triggered.

I think an xml format map is suitable for it, I can separate surfaces from objects. I can add or neglect properties for the <object> tag, ensuring that I can define different types of behavior.

Is this approach towards levels too naive/improper? I really have no idea. And can something like this be implemented using Qt? Qt seems like the tool to add more utility, rather than using keys to select layers or mouse wheel to pick assets.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!