Jump to content
  • Advertisement
Sign in to follow this  
Keyeszx

Maps or level editors

This topic is 2118 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 was wondering before I got started if someone were to make their own game using C++ or some language and some libraries how would they add multiple levels or maps? Would they have to input everything manually? Would they have to build their own level/map editor? Could they take a preexisting level/map editor and adapt their game to recognize what another level editor puts out?

 

What is the best path to go about making levels/maps for a game?

 

Sorry if this isn't the right section, I couldn't think of where it might go.

Share this post


Link to post
Share on other sites
Advertisement

- For something like pacman you may get away with manual input. Better even to have an external text file of some kind.

- Ideally using a preexisting solution would be best because you can get to work on your game.

- If, for some reason, you can't adapt it to your needs and you can't adapt your needs to it, (or you need in-game level editing) rolling your own will also work but will take at least twice as long as you think it will.

 

Tiled is fairly well done and pretty popular. There are others if you look around, depending on your needs.

Share this post


Link to post
Share on other sites

A mixture of the things you said.

 

In the past I've used all these approaches. I'd recommend that you don't spend time building your own editor, if possible.

 

* Use a text-editor to edit a text-file, and have the game load it as a tilemap of some kind

* Use an existing tilemap editor (designed for games)

* Use a graphics bitmap editor (e.g. Gimp) and edit a bitmap; load it as a tilemap, background, collision map or something like that.

* Use an existing vector-editor (Inkscape, Flash) and convert or load the files in your game

 

In some cases it might be helpful to convert data into a different format for use at runtime.

 

Object placement and definition of logic e.g. "this button opens that door" can be tricky to do with standardised tools, you might need to knock up an object-placement editor, which could easily be inside the game itself (you run the game in a special mode, perhaps use a command-line option)

Share this post


Link to post
Share on other sites

What I like to do is make my maps in Blender, output a collada file, parse it into my own level format, and load it into my game. I wouldn't recommend it for a professional game development team, but it works.

Share this post


Link to post
Share on other sites

I was wondering before I got started if someone were to make their own game using C++ or some language and some libraries how would they add multiple levels or maps?

Whatever way they want, maps or levels or any of those game terms really don't exist in a computer, you're just talking about loading relevant data to help your application display things where they need to be displayed or so they can react to the world.

It entirely depends on what kind of game you're making. For instance a 2d tile map editor like Tiled is generic and just outputs information in different file formats using their own description of how the data should be laid out in the file, then you just load that data and grab whatever relevant information you need into your game objects.

But really, like I said it's totally generic, if your game is simple enough you can do the same thing by typing numbers in an array and passing it to one of your functions or typing letters in a text file and reading a single string and parsing it into a game map. What matters is that the data conveys the information you need.

Save files work the same way really, it's all just permanent storage for information.

Would they have to input everything manually? Would they have to build their own level/map editor? Could they take a preexisting level/map editor and adapt their game to recognize what another level editor puts out?

In general it's a time spent vs time saved thing, for instance if you think of a big AAA game like a 3d shooter or an MMO the team making the game obviously has thousands of hours of map development to do so investing in creating or licensing out a powerful tool ends up saving a ton of time in the long run.

Looking at it in the opposite light if you're just throwing together a simple map out of a text file it might be faster for -you- to just type down the text instead of dealing with making a tool or using a third party tool.

Share this post


Link to post
Share on other sites

how would they add multiple levels or maps?
They don't really add "the maps" to the game. Rather, they give the game the ability to load a map at time. They then have somewhere a small script telling which level is first, and each level has annotations of other levels to follow. So in the C++ code itself probably does not even know about the levels. The scripts might know about the first or for some simple games, they could be whole level lists.

Would they have to input everything manually?
In the C++ code you mean?

This is referred as hardcoding and it's well known to be a source of problems. It is only adequate for extremely small datasets. achild above suggests "pacman" to be simple enough to go with manual input and I sort of agree for a single level.


Would they have to build their own level/map editor? Could they take a preexisting level/map editor and adapt their game to recognize what another level editor puts out?

The opinions here are more varied. There has been a time in the past when having your editor was necessary. Right now it's more like an option. People pointing out simple games having editors on their own don't get the point. Those talking about UnrealEd forget Unreal Tech is a large share of the whole game development industry.

Personally I think dedicated editors are done - there are a lot of advantages in allowing an artist to use the editor of his choice and just import the work.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!