Sign in to follow this  
ballack

how do i create a level editor

Recommended Posts

Spudder    385
Your gonna need to be more specific - what sort of game is this editor for?

The requirements of a level editor vary according to the game it's being used for, level editors for an FPS are going to be radically different than those for an RTS or RPG.

Share this post


Link to post
Share on other sites
ontheheap    798
Hey ballack, I'm getting ready to work on my fourth game which is going to be a 2d side-scoller platform game similar to super mario bros. 1 for NES. Here is a link to some win32 tutorials about creating a level editor for a tile based game.

First thing I always do when I'm about to start a new project is use the gamedev forums search for anything I think would be relevant. For instance, searching for "level editor" will give you a bunch of old topics discussing what level editors are, why they're needed, etc.

A scripting language is basically used to separate game content from the game code. Say, for instance, you are making an RPG. Instead of having all of the items/weapons/npcs/etc hard coded into your engine (which would then need to be recompiled each time a change is made), you use an external scripting language (such as Lua).

The game engine would then have code to communicate with the scripts, that way you could make changes to the script and have them reflected instantly inside your game without needing to recompile anything.

Something I've thought of (don't know if it's a good idea or not) is to use Lua for communication between my game and level editor. So I can run the game and the editor (both separate exe files) and make changes to script through through the editor, and see those changes reflected in the game right away. I don't know how feasible that would be, but it seems like it might be a good idea. You can see by my choice of words in that sentence that last sentence that I'm very unsure just how sound that idea is...

- heap

Share this post


Link to post
Share on other sites
cfrankb    170
I agree with Spudder, we'll need to know what kind of game you are trying to build. Editors come in all shape and size. They can be as simple a view and document that contains an array of ints or they can be a hell of lot more complexe.

Just a few days ago, I released the first public preview of my freeware side-scroller construction kit. The editor alone took me a whole month to put together.

http://pages.videotron.com/cfrankb/lgck

Share this post


Link to post
Share on other sites
cfrankb    170
Quote:
Original post by ontheheap
Say, for instance, you are making an RPG. Instead of having all of the items/weapons/npcs/etc hard coded into your engine (which would then need to be recompiled each time a change is made), you use an external scripting language (such as Lua).


Or you could also store the properties of the items and weapons in a resource file that could be edited separately. Scripts would be better suited to extend the engine, provide additional functionality that are subject to change from game to game.

Share this post


Link to post
Share on other sites
cfrankb    170
Quote:
Original post by BBB
I never really understud why people place the editor and the
engine in different executables,


Maybe that has to do with "modular thinking". Perhaps the editor is being built by a different team than the one who is making the engine. Or the editor was made first, before there even was an engine... Or it is running at a different resolution/color depth...

Perhaps it just made sense to the author because a separate editor

1) can be shared between several projects

2) can be recompiled without having to recompile the main engine

3) is not automatically distributed with the game

4) the resource file cannot be edited while in use

Quote:
i really like built-in editors
since you don't have to have 2 instances of the graphics modules
running and it's easier to to support realtime editing


I wrote both integrated editors and stand alones. While I also favor the former, sometimes it has just not been practical for whatever reason.

Share this post


Link to post
Share on other sites
Kevlar-X    122
Some simple games (and even some non-simple games) can be created with nice looking levels, without the use of a level editor.
For a simple platform game, create a string which represents the map using a text editor.

IE: for an 8x8 top down game, where G== grass, and W == water.


gggggggg
gggwwggg
ggwwwwgg
gwwwwwgg
ggwwwwwg
ggwwwwwg
gggwwwgg
gggwgggg

and you have yourself a lumpy 'realistic' looking lake for a tile based game.
(The same concepts translate well to side view games)

Why bother with writing a tool to make things easier, if its not really going to be that difficult in the first place? :P

Hope that helps,
- Jacob

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