Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Laroche

Creating Level Editors

This topic is 5811 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''ve managed to finish up a small game, my first one, and started moving on to another project, a Diablo parody called Hack Slashers. I''m currently attempting to write a simple 2d level editor (c++, Win32 API, GDI) so I don''t have to hard-code in all the levels, but the problem is I have no idea how to go about doing it. right now it creates a window with a menu, and you can "load" tilesets and create new maps. But I have no idea where to put all this information. Do I create a child window which has the tileset in it? Where do I put the Map? How do I draw onto those seperate windows? Now the real question is: Does anyboy know of a tutorial on how to write tools like this for simple games? I don''t just want source-code, or some already made editor that I have to code plugins for, I''m doing this as a learning experience. Any advice helps. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
My only recommendation: share rendering code between your editor and your engine if at all possible. It''s always best to see things how they''ll appear earlier than later.

As for how to lay things out on screen, usually in a 2D editor, there is one large pane for the level editing, and a secondary, smaller pane for tiles. Click on the tile to activate that tile, then click in the window to "draw" (ala Paint) the tile into the world. As long as you keep dragging the mouse pointer, you keep "drawing." Release the mouse, and you''re done.

I''d also have it so that you can either place objects or tiles, but never both at the same time.

RomSteady - Able to leap off tall buildings in a single bound

Share this post


Link to post
Share on other sites
It''s a dialog...


--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites
There are so many awesome free level editors out there, Mappy, TileStudio, why would anyone want to make their own?

Share this post


Link to post
Share on other sites
quote:
Original post by nonnus29
There are so many awesome free level editors out there, Mappy, TileStudio, why would anyone want to make their own?


There are so many free games out there, why would anyone want to make their own?


University is a fountain of knowledge, and students go there to drink.

Share this post


Link to post
Share on other sites
I've got a question along these lines as well. I'm currently attempting to start a level editor for a small engine of mine, and I've realized, I don't have a clue what to do. Just how does a person actually render multiple, sizable OpenGL/Direct3D viewports in a window, within a normal app window?

I've been looking around for a good part of the day and I've not actually found anything on it. There's nothing in my Petzold book on it really, and that predates modern graphics programming.

I'm attempting to use the same graphics engine to drive both the normal game, and the editor viewports. I just don't know how to write the flippin app window =)

[edited by - Phoe on August 19, 2002 7:22:56 AM]

Share this post


Link to post
Share on other sites
I would build the editor directly into the game engine.

Your engine will need to display maps, allow the user to click (and determin where in the game world they clicked). It will need to to have some sort of gui.

Why not use these things to make a special editor mode that can either be started from a key press/menu option, or by passing some parameter to the program on the command line?

You dont want to end up maintaing two seperate programs. You fix a bug in one, and have to remember to fix it in the other.

Alan

Share this post


Link to post
Share on other sites
hey,

i found a tutorial about setting up an OpenGL window in a dialog. Hope this helps...

http://www.steinsoft.net/programming/tutorials/opengl_dialog/index.htm

later,
DarkMonkey

Share this post


Link to post
Share on other sites
If you keep the engine in a dll you don''t have to worry about 2 code bases. And I specifically need to learn how to make the window anyways, tools programming is somewhat required in the industry, and they don''t really teach it at my school. I also don''t want to write the scads of GUI code an internal editor would require.

Thanks for the URL

Share this post


Link to post
Share on other sites

  • 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!