jump to navigation

Level Editor October 19, 2010

Posted by luciusdxl in Uncategorized.

Once DarkXL reaches BETA, which is just a few major builds away as I’ve been saying, I plan on continuing the built-in level editor.

The fact is, however, that the current version of the level editor is already built into DarkXL and has been for many versions. It’s kind of broken right now, as expected since I haven’t worked on it in a long time, but you can try it out. You can load and save a level, edit sector geometry and create new sectors. 3D mode is broken right now – not sure why it’s something that I’ll have to debug when I get back to it. In addition splitting sectors and connecting sectors is a little wonky right now, again things have changed in the core a bit so naturally I’ll have to fix a few things.

So if you want to try it out, just to play around with it, here are the instructions. Please note that I haven’t worked on this thing in months, backup any levels before using the editor with them and expect bugs and wonkiness. That said, if you avoid 3D mode (the ‘M’ key) then it’s actually pretty stable.

First extract your level using WDFUSE, make sure the “*.lev” file is in your directory. If you pass in a level that doesn’t exist, it will be created on save.

To load a level, run DarkXL with this command line:
DarkXL.exe -eLevelName.lev

Use the arrow keys to move around

+ – to zoom in and out

[ ] to change the grid size

L SHIFT-L to change the map level.

T brings up the texture palette

G brings up the geometry palette

Right-Mouse Click near a sector/wall/vertex to select it.

Left-Mouse and Drag on a handle to move the selected sector/wall/vertex (depending on handle selected).

Click on Sector/Wall/Vertex on the toolbar on the bottom to bring up the associated dialog.

To assign a texture, select it in your texture palette (left click) then left click on the texture slot in the wall or sector dialog.

To put a different texture in a palette slot, right click on it, use the arrow keys to scroll through the texture list, then left click on the new texture that you want.

To draw a sector, left click in an open spot. Keep left clicking to place new vertices – you’ll notice that they’re connected to the previous vertex by a line. Once your shape is complete, hit ENTER. Note that it automatically creates the last line between the last vertex and the first vertex. You you draw a sector inside another sector it automatically becomes a subsector. You do not need to create a hole before creating a subsector.

To create a hole or column, draw you sector inside another sector and hit SHIFT-ENTER.

To cancel your drawing without creating a sector, Click on the Right Mouse button.

To place a predefined shape from the geometry palette, bring it up (‘G’ or click on Geometry on the toolbar), left click on the desired shape (default is line). Then left-click on the map to place. Right click cancels (just like the lines), ENTER creates a sector or subsector, SHIFT-ENTER creates a hole or column. Point mode currently does not work in the 2D view, but later you can use it to insert vertices.

To split a wall, draw a line that intersects it and hit enter. If you draw across multiple walls, they should all be split at the intersections.

To create and adjoin, make sure two vertices of the new sector lie on an existing sector line. This is a little flaky at the moment and will probably only work on horizontal or vertical edges. See the picture below:

[Before Hitting Enter – Notice that two vertices from the shape that I’m drawing lie on an edge of the sector on the left. The overlapping portion of the edges will become the adjoin]

[After Hitting Enter – Notice that the new adjoin is where the edges overlapped, it is lighter green]

To set sector or wall flags, select the sector/wall, bring up the dialog (toolbar on the bottom) and click the boxes for the various flags.

It is not currently possible to change floor or ceiling heights, light levels, texture offsets, etc. in 2D mode.

To save, simply click on Save on the toolbar.

To exit click on Exit.

Anyway play with it if you want. Use at your own risk. Feedback is good, just remember that this is not in what I’d normally consider a releasable state. But it’s good enough to play around with and get a feel for some of the concepts.



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: