Jump to content

[Crazy] Generating a UDMF map from a hand-written text file


MFG38

Recommended Posts

Crazy thought that just occurred to me: seeing as the UDMF format stores map data in a plain text format, what's the feasibility of making a UDMF map simply by generating one from a hand-written text file? I just did some googling around and came across some tools to convert vanilla/Boom-format maps to UDMF, and a lot of them seem to handle the process in two phases as follows:

 

  1. Generate a TEXTMAP file from a given map.
  2. Convert said TEXTMAP file into a UDMF-format map.

 

What I was thinking about is whether it'd be possible to eliminate the first phase entirely. Instead of generating a TEXTMAP lump from an existing map, you'd write one by hand, feed that to the program and it'd spit out a map. Writing an entire TEXTMAP file by hand does have some rather obvious caveats, but if nothing else, it'd be a fun experiment to see if a playable map could be made that way.

 

Now, if we were to do this, obviously we wouldn't want a mere 256x256 STARTAN cube with a player start and an exit switch in it. We would want something that looked and played like something resembling effort was put into it. We would want a map that would convince anyone playing it that it was made in an actual map editor instead of Notepad.

 

Thoughts? Experiments in doing this? Words of concern about my sanity? Share it all!

Share this post


Link to post

Checking one of the more smaller and less-detailed UDMF maps I've made, it looks like the elements in its TEXTMAP are broken down into essentially five sections at UDMF's simplest:

 

1. Things

2. Vertexes

3. Linedefs

4. Sidedefs

5. Sectors

 

Each linedef has information from two vertexes and one (or two if it's double-sided) sidedefs, and each sidedef refers to a sector.

To give you an idea of how much effort making a map "by hand" (by word-processor?) would be, this small, fairly close-to-vanilla map
 

Spoiler

image.png

 

hits just over 30,000 lines of code in its TEXTMAP entry.

Spoiler

image.png

 

I don't think it's very feasible for a human to "type-up" a map of even such minor complexity as this.

Edited by SMG_Man

Share this post


Link to post

The TEXTMAP lump effectively is the map.

 

Nothing stops you from writing that and putting it with the header and footer into a WAD. The big problem will be to keep track of everything. All map elements are implicitly indexed by their order. That means lots of things have to have their references changed when you remove map elements. For example when deleting a sector (assuming it's not the last one) you have to change all sidedef's sector reference for the deleted sector or any sector that comes after that.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...