Hey all,

This is the first in what will be a series of posts dedicated to the tools involved in Meridian development, explaining how they work and how to use them and where applicable, what we’ve done to improve them. These posts are intended both to help current volunteer devs learn more about the tools, and also as an introduction of sorts for anyone interested in joining the team and working on Meridian 59 (whether that be on 103, or any other server).

This post is starting off a bit in the deep end by explaining the recent changes to the Meridian 59 room editor. In that sense it is geared more towards those who have operated it previously and found it very difficult at best to build rooms with.

The room editor used to create all the rooms in Meridian 59 is an old port of the Doom room editor WinDEU. This editor was only able to compile on an old proprietary Borland compiler, and was largely unchanged from what was used to make rooms in ’90s. As anyone who has tried to use the editor knows, it is prone to crashing and most attempts to make or edit anything more complicated than a square cause the editor to fail to generate a BSP tree for the client. Slopes were a wonderful feature added in the late 90s, but a lot of the time using slopes caused gaps in the world scenery where the slope meets up with another surface. Many rooms when loaded in the client had strange lines in the floors and ceilings where sky would show through, which could be minimised by changing the geometry of the room in the editor (and if you were lucky, it would even build the room!).

Recently, we were able to port the room editor to build with Visual Studio 2013 which opened up the ability for us to make changes to the code and compile it. As a result we’ve been busy the past month going through the editor (and client) and fixing up all the issues, the most important of which is the BSP tree generation. This was being done completely in integer values, which meant a lot of rounding errors and is the cause of most rooms failing to build. This is also the reason for the abundance of sharp corners and shapes in Meridian rooms, as this made the tree generation more likely to succeed. The calculations have all been modified to work in floating point, and the client also now loads the tree data in as floating point values. Along with fixing the room building itself, this also fixes the lines and cracks in the room ceiling/floors (caused by inaccurate polygon data) and slopes not meeting up correctly with other room textures (inaccurate slope plane equations).

This means we can easily build new rooms in any shape or configuration we like, and we’ve also begun editing and fixing up existing rooms (many rooms had ‘helper’ lines to allow the room to build, but also increased the time necessary to load those rooms). Unfortunately it also means that 103 rooms are not compatible with anything other than the 103 client or the 103-specific Ogre 3D client, and those clients will be unable to load rooms saved with older, unfixed versions of the room editor.

We have also begun adding ‘templates’ to the room editor. These will be groups of objects that are frequently used, such as a building or a specific configuration of vertexes, lines and sectors that can be added with a single menu command to save a significant amount of time when building a new room. The first template available is for a torch:

torchtemplate

The torch can be added similar to how a polygon or rectangle is added, from the Standard objects menu:

roomeditfix

The second ‘insert rectangle’ button on the toolbar will also activate the ‘add torch’ function (no icon available yet). Four angles can be chosen: 0 or 360 which places the torch going north, 90 (east), 180 (south) or 270 (west). Placing the torch on or near a linedef will place the torch on that linedef. When placed, a dialog box will pop up telling the user where to place the dynamic light for the torch in KOD coordinates (the position of the middle vertex).

The undo/redo behavior in the room editor has been improved – the maximum number of each is now 50 (increased from 5) and saving a room will no longer clear the lists.

Sector and linedef copying bugs have also been fixed – copying a linedef was not copying the associated sidedefs (sidedef copying was implemented for copying sectors only, not linedefs) and copying a sloped sector would not copy the slope data (again, not implemented). Both of these now work correctly, and copying slope data will assign the slope heights to the new vertexes. Copying an object will now offset it -30x, -30y from the original to facilitate moving it afterwards.

In addition, many causes of editor crashes have been dealt with, leaving the room editor a viable and relatively (compared with the previous version) pain free program to use for building Meridian rooms quickly. We will continue to make improvements and especially add more templates to make room building much quicker and easier to facilitate future expansions and new content additions.

To obtain the new room editor, just fork our repo on GitHub, clone it to your computer and runĀ  ..\roomedit\roomedit.exe, or build the .exe yourself using Visual Studio 2013 (solution file is also in the roomedit directory).

-Delerium