Jump to content
  • 0

Can I edit a map and retain the original blockmap position?


almostmatt1

Question

Disclaimer, I have only an very basic understanding of mapping in general so my apologies if this is something basic. I'm using Ultimate Doom Builder and am definitely willing to trying out new programs if they can help.

I make Doom TASes, a process that involves a lot of brute forcing input combinations for specific outcomes. The larger and more complicated a map is the longer the brute force process takes. For example, I did some tests a while ago and brute forcing 1 million input combinations in Doom 2 Map 1 took 74 seconds while brute forcing just 10,000 input combinations in Sunder Map 19 took 700 seconds. Most differences aren't nearly this dramatic, but they're significant. I'll often run brute forces that take hours if not days, and often it is viable and massively beneficial to edit out huge unnecessary portions of a map prior to starting the brute force.

 

The problem I've encountered is that when I edit a map in Ultimate Doom Builder, when I save it, the position of the blockmap relative to the positions of the walls changes. This is an issue because there are some tricks that rely on the blockmap existing in a particular place. If you get perfectly close to a wall which is to your South or West you can maintain up to 14.5 units/frame of momentum in multiple directions while stationary (yes, this a kind of "wobble" trick), but if the wall happens to directly sit on a blockmap line this momentum limit does not exist. Additionally this trick is not generally possible when the wall is to your East or North (momentum simply dies and stays at 0), but if the wall happens to be on top of the blockmap line it is possible to maintain momentum in these directions (definitely East anyway, I don't actually recall testing North now that I think of it). So, this creates a situation where edited maps that I create for faster brute force times occasionally stop being viable in situations where walls either previously did and now don't, or previously didn't and now do, exist on the blockmap, because I need the behavior of these tricks to remain consistent. 

Is it possible to take a map, remove large parts from it, and have the position of the blockmap remain unchanged?

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

I guess yes. to an extent? Every time a map is saved, it's saved as a collection of lumps (i.e. different bits of data underneath an empty marker that tells the engine what map to correspond the data to). You could make your changes, and then with an editor like Slade, load an earlier version of said map and copy THAT blockmap lump into your newly modified WAD. Keep in mind though just how important an up-to-date blockmap is -- blockmaps control player / enemy collisions, as well as whether or not certain hitscan attacks / projectile attacks are actually hitting. In addition, I don't believe your runs will be valid if you actually try to submit them on any leaderboards, so at best it may just be a fancy thing to have for show / personal use. It's definitely possible, though! Just have to get creative and a bit hacky.

Share this post


Link to post
  • 0

Thanks! I'll poke around in Slade and see how I go. 

I appreciate the heads-up on those points. :) Thankfully it shouldn't pose a problem. I'll only be going through this process at times where the player movement being brute forced occurs prior to monster interaction or in the No Monsters category, so the combat implications of the blockmap are sidestepped and the only factors should be player movement and interaction with map geometry remaining consistent before and after the edit. I've done it a couple of times before in instances where this blockmap issue doesn't pop up (by that I mean I did not do any tricks that rely on the position of the blockmap) and so far it's worked quite well. If movement behavior remains consistent between the original and edited wads, demo inputs achieved using the edited wad can be played back with the original wad with no concerns. On the point of submitting them - for TAS (tool-assisted speedrun) demos, which are submitted separately and labelled as such, the whole endeavor is about using tools to see how quickly the game will technically allow itself to be played rather than actually playing it normally and legally, so unlike regular non-TAS speedrun demos any methods used in pursuit of this are fair game. They exist on the same tables but are marked differently aren't competitively compared to human runs.

Share this post


Link to post
  • 0

You can pretty much forget about using the old BLOCKMAP lump, since the linedef indexes will not match anymore after you deleted geometry. Might even crash because it'll try to reference indexes that aren't even there anymore.

 

Your best bet is probably to create a dummy sector at the bottom left to align the blockmap correctly. Note that ZenNode based nodebuilders add a padding of 8 units on both axes to the blockmap's offset, so depending on the nodebuilder that was used to process the map, and the nodebuilder you're using you have to take that into account.

Also note that depending on the nodebuilder used and its settings the actual blockmap blocks might not be the same, although I assume that doesn't matter for your usecase.

Edited by boris

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
Answer this question...

×   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...