Creating Level Editors
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!
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
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
It''s a dialog...
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
There are so many awesome free level editors out there, Mappy, TileStudio, why would anyone want to make their own?
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.
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]
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]
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
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
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
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
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
Thanks for the URL
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement