Map editor

Started by
7 comments, last by Krohm 16 years, 2 months ago
Hi, I have a question to all you ppl out there with more experience in programming games than me. Me and my friends has started to make a game and I will try to build the maps. The question is: Should I write som sort of map editor, wich saves the values of the things you have "drawn"? If that is a good idea, how shall I start? Shall i do some basic things, wich I can use several times? Thx for any answers /Umpe
Advertisement
Depends. What engine are you using? Are there any editors out there already that do what you need? Are you willing to code such a behemoth? Do you even have any programming experience?

FlyingIsFun1217
This all really depends on what kind of game you're making. You could google Mappy which is a map editor that can be adapted to many different kinds of games.
If you really want to write one yourself I would recommend taking a look into c# as it tends to make building applications a lot easier. You can just drag and drop all the menus and UI elements you need.
I have som experience. Started out 3 years ago in school with c++. This is my first big 3d project, so it's not supposed to be too much details.

The game we are planning to do is some sort of ball is going down a road and you are supposed do watch out for stuff wich is in the way. So I were planning to make some straights, turns and some slopes ande that these have a value wich can be stored and read in to the app.
So what sort of variables are in the map? If there is an editor out there that lets you make maps with those elements, try it out. If not, feel free to make your own.

FlyingIsFun1217
For a simple game like that, writing a good editor will likely cut it without being too difficult. I've seen one being developed just a few days ago. It was a bit too minimalistic wrt what I'm used but it was very effective. The guy writing it told me it took about a day to roll a first (sort-of-stable) version however I don't know how much things were reused so take this with some salt.

Previously "Krohm"

thx guys... I think I'll try some for my own, 'cause it'll be a good experience. But thank you for all help.
Back with a new question :D. How shall I save the maps I've done? Shall I save every cordinate or have like a letter for every sequence? Something like W=straight, A=left and D=right? and then use <fstream>?
It really depends on your perspective.
Personally, I'm a big fan of natively binary formats. They generally take much less time to load (parsing is expensive, believe it or not) while writing a converter can still give you the advantages of having a text format.
Binary formats scale well, typically introduce less data overhead and, if you ask me, they allow cross-referencing without going mad.

Text formats always ended up biting me sooner or later. Besides that they're going to encode 32bit floats as many-bit strings, besides that you'll need some sort of parser-like machinery, the benefit of human readable representation is quickly lost as the complexity of the format grows or the amount of information scales.

So, what's the best in your case?
I don't see why you shouldn't use a binary format - the meaning of your data could then be inferred from the structure - but I encourage in making your own, critical decision.

Last note: someone will, by sure, tell you to use XML. I have to point out XML is an eXchange format, a common ground for different platforms. As long as you're the only provider, the point is moot. XML is also terribly inefficient in terms of memory usage, with tags sometimes exceeding the footprint of information (which it's inefficiently encoded itself).

Previously "Krohm"

This topic is closed to new replies.

Advertisement