🔒 Locked
Level editor
Advertisement
Original Post
Hi everyone, I'm going to make a 2D level editor for an RPG game I'm making. I've never made one before and I need some suggestions on how to set it up and design it. I'm using c++ and of course, it's a GUI game, not console.
Uhh, by level editor, you mean map editor right? You could just use a pre-made map/level editor. Mappy is a very good one and has a playback library for most graphics APIs, and its free. If you do make your own, you will need to encrypt it somehow so people cant manually edit it. As for me i use mappy if I need a map editor, but you can make your own if you want.
Mappy is a decent editor, but creating a editor of your own is good experience and is better suited for your game as it is crafted for that purpose.
That said, I suggest you look at this site.
That said, I suggest you look at this site.
Be sure to make it easy to synchronize descriptions of objects in your game and such in your level editor with out having to do it twice.
As for a GUI, I'm using the Qt Framework by Trolltech, and of course, the MinGW open source version. It's very flexible, extremely extensive (I doubt you'll use a tenth of the whole thing for your level editor). However, it compiles somewhat slow on my computer (1.4 GHz), and I have yet to successfully comile in debug mode, plus the Form Designer (yes, Form Designer) is a little buggy when you get out of hand with embedded layouts. But it's still very awesome. Yes, I said it. Awesome.
As for a GUI, I'm using the Qt Framework by Trolltech, and of course, the MinGW open source version. It's very flexible, extremely extensive (I doubt you'll use a tenth of the whole thing for your level editor). However, it compiles somewhat slow on my computer (1.4 GHz), and I have yet to successfully comile in debug mode, plus the Form Designer (yes, Form Designer) is a little buggy when you get out of hand with embedded layouts. But it's still very awesome. Yes, I said it. Awesome.
If you are going to make a level editor I highly suggest using c#. It is much better suited to application development than c++. You can use .NET for windows or Mono if cross-platform compatibility is a concern.
Quote:
Original post by jkleinecke
If you are going to make a level editor I highly suggest using c#. It is much better suited to application development than c++. You can use .NET for windows or Mono if cross-platform compatibility is a concern.
It's your opinion that c# is better, my opinion would be to stay away from .NET (which is bloated,slow and sure you sometimes don't have the DLL-Hell, but you'll get the Security-Hell which is much worse)..
Just make it in the language you are most comfortable with, there is no better language..
I made a Map-editor/game-editor about 14 years ago completly in Turbo Pascal and the game-engine i wrote was in pure assembly, and it's the best way to learn about gameprogramming to write your own editor and game-engine..
But then again 14 years ago, there wasn't much info on the subject and you really had to figure it out all by yourself.. hehe.. those where the fun days..
All right guys, thanks. I'll take that advice to heart and make my best attempt. I agree Super Dre that making your own engine and such is the best way to learn, because I have many game programming books (all c++) that teach anything from console to DirectX, but I want to use my own engine and editor for my games. I don't want to create a copy of theirs just with different variable names. Well, I guess it's time to get to work...
Some more thoughts to add -
I too am currently making a level editor for my 2D RPG written in C++. I have been basing my design off the Warcraft III Editor; my game engine complies into a DLL, and from there, I can either load it up in play mode, that is, wrapped in a bare-bones window, or load it up in my MFC application, giving me the ability to click and drag objects around, etc.
Every object in my engine can be controlled only through the scripting engine, meaning every button I click in my MFC application has only to run a script to get the desired result, rather than running some ugly, hard-coded thing.
I spent a lot of time trying to write my editor in C#, but getting C# to interface with my non-managed engine DLL was an impossible nightmare, so it was back to good old MFC. I get the same framerate in my level editor as I do in my game, so if I need to run a scripted sequence or animation or anything else from within the editor, it looks exactly the same as it would in-game. If I need to launch the current map I'm working on in "play mode" so I can test input, etc, it's a single button click. Very handy!
MFC4LIFE!!
I too am currently making a level editor for my 2D RPG written in C++. I have been basing my design off the Warcraft III Editor; my game engine complies into a DLL, and from there, I can either load it up in play mode, that is, wrapped in a bare-bones window, or load it up in my MFC application, giving me the ability to click and drag objects around, etc.
Every object in my engine can be controlled only through the scripting engine, meaning every button I click in my MFC application has only to run a script to get the desired result, rather than running some ugly, hard-coded thing.
I spent a lot of time trying to write my editor in C#, but getting C# to interface with my non-managed engine DLL was an impossible nightmare, so it was back to good old MFC. I get the same framerate in my level editor as I do in my game, so if I need to run a scripted sequence or animation or anything else from within the editor, it looks exactly the same as it would in-game. If I need to launch the current map I'm working on in "play mode" so I can test input, etc, it's a single button click. Very handy!
MFC4LIFE!!
Quote:
Original post by Quasimodem
I spent a lot of time trying to write my editor in C#, but getting C# to interface with my non-managed engine DLL was an impossible nightmare, so it was back to good old MFC. I get the same framerate in my level editor as I do in my game, so if I need to run a scripted sequence or animation or anything else from within the editor, it looks exactly the same as it would in-game. If I need to launch the current map I'm working on in "play mode" so I can test input, etc, it's a single button click. Very handy!
I had to do a little digging myself to find a suitable method for my c# editor to interface with my non-managed engine. But after a little tinkering with my build settings everything has worked out just fine.
I'm not one of those people that will advocate one language for every solution, but c# was built for application programming. I've been working with MFC for the past 8 years at my job and I still have nightmares about the MESSAGE_MAP(). Plus, with c# you get a fancy GUI right out of the box. Just my two cents...
Quote:
Original post by jkleinecke
I had to do a little digging myself to find a suitable method for my c# editor to interface with my non-managed engine. But after a little tinkering with my build settings everything has worked out just fine.
I'm not one of those people that will advocate one language for every solution, but c# was built for application programming. I've been working with MFC for the past 8 years at my job and I still have nightmares about the MESSAGE_MAP(). Plus, with c# you get a fancy GUI right out of the box. Just my two cents...
Would you be willing to make a post or write up a tutorial on how you did this? I spent weeks playing with Tao and all the C# NeHe samples and as many other hopeful techniques as I could find. I did finally get my unmanaged DLL to run and draw to my C# application, but as soon as I displayed a single texture, my FPS went from above 300 down to *4*! "To hell with this!" I thought, and went back to the MFC standby. There is a sad lack of info on this type of thing, I think if some one were to write up a solid framework that anybody could use as a starting point, it would be incredibly helpful!
The trick is to turn your unmanaged dll into a managed one. Turn on 'clr' from the compiler options, now your assembly is managed (you can compile unmanaged c++ in clr). The only problem now is that you don't have any classes or functions exposed in the assembly. So from here you have to write some simple managed c++ wrapper classes that are 'public'. Now your dll will behave just like any other assembly in .NET, the only real issues are callbacks and strings (you'll have to google for more info).
Quote:If you use something like Mappy or Tile Studio, it will allow you to focus on the creation of your game rather then the tools used to make it.
Original post by Servant of the Lord
Mappy is a decent editor, but creating a editor of your own is good experience and is better suited for your game as it is crafted for that purpose.
Sounds like fun,... the level editor that is.
I would highly recommend that your game engine be stable, as in you are not going to change how images and player/npc action is processed or you are going to have to edit your editor as well.
I would highly recommend writing your own, so you've got more control of your editor.
I've noticed that a lot of the level editors for a game, they fail to include npc controls, and triggers for traps and monsters and the like. If you include one in the publishing of the game, please make sure there is a way to control those additional features,... just a preferance thing.
I would highly recommend that your game engine be stable, as in you are not going to change how images and player/npc action is processed or you are going to have to edit your editor as well.
I would highly recommend writing your own, so you've got more control of your editor.
I've noticed that a lot of the level editors for a game, they fail to include npc controls, and triggers for traps and monsters and the like. If you include one in the publishing of the game, please make sure there is a way to control those additional features,... just a preferance thing.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement