Jump to content
  • Advertisement
Sign in to follow this  
_damN_

Best practise for creating a level editor

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

Hi there... I am about 3/4 finnished developing a 2D game engine and so far its working great! But then i thought, it would be great and maybe even a bit more "Commercial" to add a level editor somehow but im not really sure how to go about doing this. Is it a good idea to create the level editor on top of the engine within the same folder(2 solutions within the same project) or should it be a completely different project but still be built on top of the engine. Or should it be a completely different project that has nothing to do with the engine? I hope im not sounding too confusing... Any help would be appreciated! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by _damN_
Is it a good idea to create the level editor on top of the engine within the same folder(2 solutions within the same project) or should it be a completely different project but still be built on top of the engine. Or should it be a completely different project that has nothing to do with the engine?
Another option, which you don't appear to have considered, is to make the editor in-game.

Whichever way you choose to do it, I would suggest reusing as much code and functionality as possible from the game itself - after all, many features are the same (graphics, etc.)

Share this post


Link to post
Share on other sites
Hi! Thanks 4 the reply...

I have actually considered that. But because its an engine and not really a specific game, i think it would be better in this case to have it as a different application to build a map etc and then save it... Then have the engine be able to load it when necessary... But im not really sure. Its always good to get other peoples ideas.

Share this post


Link to post
Share on other sites
You could do what torqueX does with TorqueX Builder and have the engine generate an xml file on compile which the editor reads and can manipulate visually. Then the engine reads the xml file to see what's been thrown in and acts accordingly. (At least that's how I understands it works from what I saw)

Share this post


Link to post
Share on other sites
I am making a 2D game as well (I am a lot less complete than you are, however), and I plan on making a game editor as well. My planned design process goes like this, basically:

1. Design the game. Ensure it retrieves all of the data for it's levels from associated files.
2. Create a console based application (seperate project) that reads txt documents and creates map files based on what is typed in the txt file (essentially, a very basic level creator), just for creating the maps of the main campaign.
3. Create a sort of 'dev' mode in the game that lets me explore created levels to ensure they are up to par and that everything is where I want them.
4. Put the campaign together and finish the game.
5. THEN worry about making the editor (as a seperate project), which basically expands upon the console level editor by using a GUI and replacing the text input with user input and project save files.

I want the editor to be seperate from the game, simply because I want the game to be simply the game (it seems more polished to me this way) and because I don't want to try to take on two projects at once (the game is begin enough).

Initially using the TXT method is extremely user-unfriendly and may be nearly impossible for even a more slightly complex game, but I only want the method for creating levels prior to the game's completion to be at least feasible, which it is (again, for my simple game).

If your game is complex enough, you may NEED a level editor, but if you look at unreleased level editors used by professional game companies, they are consistantly user-unfriendly, and only in-depth enough to get the job done.

Share this post


Link to post
Share on other sites
"I want the editor to be seperate from the game, simply because I want the game to be simply the game (it seems more polished to me this way) and because I don't want to try to take on two projects at once (the game is begin enough)."

Having the editor created with the game isnt necesarily less polished. And you wouldnt be taking on 2 projects really... Because the map editor would already use alot of the origional drawing code i think. And because it gets released with the game, it would be more "commercial" quality.

Ive avoided making level editors for a long time because im scared it would be hard. But i really wanto make one that i can re-use multiple times for different projects. So now ive decided to make one alongside my engine.

Im not even really sure where to begin. How would you save the map data in a text file? What kind of data would it save? Would it just be numerical numbers representing different tiles?

Share this post


Link to post
Share on other sites
Quote:
Original post by _damN_
How would you save the map data in a text file? What kind of data would it save? Would it just be numerical numbers representing different tiles?
In what form does your game load levels right now? I would suggest using that to start with.

If your levels are currently hard-coded, then go grab a few open-source or mod-able games of a similar type, and check how they do it - avoid SuperTux on this score, unless you are comfortable with LISP [wink]

Share this post


Link to post
Share on other sites
Hey, _damN_.

These are just a few thoughts on your Engine/Level Project. Igonre if you will or take a gander. It may give you just that little bit of knowledge to impart to you where you stand with your level editor:

1. You mentioned that you were scared for a long time about creating level editors? You say that you have created an engine capable of 2D graphical display and functionality! By the Builder! Canst thou see that thee hasnt maketh unto Hammer's demise (Read: Why are you putting yourself down when you've done more than most of the programmers, artists, animators and designers have- possibly in their entire careers/hobbies)

2. If you have built a 2D engine (and I'm assuming this is up to mid-level functionality and professionalism; although its more likely that you lied - or didn't realise - and have made something that isn't up scratch like an end user's GTA2 editor), you do not have as much to worry about, as you should already know some of the functionality behind your engine. You shouldn't procrastinate about something which you are probably not going to do. Hard-code or flexi-code, make the choice ASAP!

3. In my experience of using professionally develeoped level/map/game editors for PC games such as Deus Ex, Thief III(Unreal Engine 2); Fallout 3, Oblivion, Morrowind (GameByro); are developed solidly and have fucntionality that almost every lone person (Who at least has modicum of sanity) would not attempt. For this case, I mean that if you are going to create one for your 2D engine, remember that the engines stated, "COULD", be "USED" for different "TYPES" of games but "COULD NOT" be used to create the different types without "Re-coding" elements of them (UT2004 and Thief III, being excellent examples). Be prepared for it and don't get the funny idea to create a level editor for multi-project, multi game type games, it just doesn't happen.

Alright, I've said enough. Dismiss as you may and please. Remember, however, that you will fail untimely to succeed on top. Intepret as you may, I've got a monkey on my back that I've got to deal with, and his name is SANITY.

Share this post


Link to post
Share on other sites
Your editor will depend a lot on the type of game you've built. I always get tempted to use my game engine to build an editor, but after having tread this path a few times, I'm pretty sure it's usually not the best course. Games are usually not gui heavy, but editors obviously are. That said, your editor will possibly share some game logic and structures.

In general, I'd suggest building your editor in a gui friendly environment. Something like C#/Winforms. If the language is the same as the game's, then you may want to attempt to separate the necessary game logic/structures into a library that you can share between the editor and the game.

Share this post


Link to post
Share on other sites
Mmmm first of all... Dex seems like a crazy person... But great respect because you are as much a fan of thief as i am! :-D Well.. i can assure you that i have made the engine and i wasnt lying. Maybe im just a little bit too modest when it comes to my programming knowlege.

I actually thought last night that it would be possible to make the level editor with the code of the engine... Thinking about it, it really seems like it will work. The thing is, im not so great at windows programming like MDI's etc. I think thats what i always avoided. But i want the editor to be able to handle many different types of projects. That said... The editor doesnt have to always be used when making a game with the engine. Loading and saving maps is sufficient for now...

Anyway, thanks for the replies!

(wATch This SpACE)

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!