Sign in to follow this  
Umpe

Map editor

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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>?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this