Message Boards

Topic: Odamex Map Limits  (Read 8284 times)

Offline durian

  • Posts: 6
    • View Profile
Odamex Map Limits
« on: September 24, 2013, 01:28:36 »
Hullo, I'm working on map that ideally I'd like to be playable in Odamex, but I'm having a problem: The map is pretty line intensive and - although I haven't surpassed what I took to be hard limits (there are currently around 30k lines and 58k sides, which will compress to 17k) if I try to open the map in Odamex it crashes immediately (to test, I tried deleting a particularly line intensive section, and then it opened fine). Notably, it only does this if I build the nodes with a nodebuilder other than Zennode; if I build the nodes with Zennode then it will run in Odamex, but there are large map-breaking HOMs everywhere (this is nothing to do with Odamex - it's the same in any other port). I'd like to use ZDBSP to build the nodes, since that doesn't generate the HOMs, but then the map immediately crashes Odamex :( Any advice here on what I'm doing wrong would be greatly appreciated. Thanks!

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: Odamex Map Limits
« Reply #1 on: September 24, 2013, 10:43:10 »
If you don't mind uploading the map and posting a link, we'll gladly take a look at exactly what's causing the crash. We can't really tell much from your description but I'm sure a debugger will make easy work of it.
Odamex Development Team Member

Offline durian

  • Posts: 6
    • View Profile
Re: Odamex Map Limits
« Reply #2 on: September 24, 2013, 11:42:42 »
Brilliant, thanks! If I can help it, I'd rather not upload the map itself (it's a bit of an unfinished mess right now), but here's a map which replicates the behaviour:

https://dl.dropboxusercontent.com/u/28198906/rocks.wad

This is a map that I made just to do some design work on some scenery, chunks of which I then copied into the proper map. It was after doing this that the problem started.

I've rebuilt the nodes of this one with ZDBSP (without any additional parameters) and Odamex crashes when it tries to open it, so I'm guessing it's the same problem.

Thanks again for your help :)

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: Odamex Map Limits
« Reply #3 on: September 24, 2013, 13:43:49 »
When loading this map (specifically trying to spawn the player), Odamex gets caught in an infinite loop trying to insert the player into the list of actors in a particular subsector with the R_PointInSubsector function. R_PointInSubsector iterates through all of the BSP nodes trying to find a leaf that's a subsector. In this WAD, BSP node #0 has two child nodes, #0 and #64978. The fact that node #0 has itself as its own child creates an endless loop.
Odamex Development Team Member

Offline durian

  • Posts: 6
    • View Profile
Re: Odamex Map Limits
« Reply #4 on: September 24, 2013, 14:15:28 »
I see! Well, I'm pleased that you've been able to figure it out so quickly - thanks for taking the time :) I'd be lying if I said that I fully understand the diagnosis, but 'infinite loop' makes sense enough. So, pardon my ignorance, but is there something straightforward that I can do to make the map playable, whilst continuing to use ZDBSP? Or is it a deeper issue, either the nodebuilder or with Odamex?

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: Odamex Map Limits
« Reply #5 on: September 24, 2013, 14:19:46 »
Are there any ports that successfully handle the test map? PrBoom+, Eternity, and ZDoom 1.23 all appear to have similar code for R_PointInSubsector. If any of those ports can handle the map, then I can probably assume that the NODES lump of the map isn't being correctly parsed by Odamex prior to trying to call R_PointInSubsector the first time.
Odamex Development Team Member

Offline durian

  • Posts: 6
    • View Profile
Re: Odamex Map Limits
« Reply #6 on: September 24, 2013, 14:31:24 »
Hmmm... It seems to open fine in the current stable versions of prboom+, Eternity, and ZDoom/Zandronum.

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: Odamex Map Limits
« Reply #7 on: September 24, 2013, 14:33:41 »
After investigating a little further, it appears that your test WAD makes use of the ZDoom Uncompressed Node format. It's my suspicion that ZDBSP may automatically switch to this format if a map has over a certain threshold of SEGS or VERTEXES. It appears that both Eternity and PrBoom+ have code for handling this format. While adding code from one of those two sources is certainly possible, it may not be an entirely trivial task. I will file a bug report (feature request) on our bug tracker as a reminder to look into adding support for this format.
Odamex Development Team Member

Offline durian

  • Posts: 6
    • View Profile
Re: Odamex Map Limits
« Reply #8 on: September 24, 2013, 14:47:57 »
That's unusual! But if ZDBSP does it automatically then I guess that makes sense.
Off hand, I just rebuilt the nodes with both DeepBSP and glBSP, and the map still won't run with Odamex (though, the crash is a little different in each case).
I'm not sure if this muddies the waters further, or if this is what you'd expect. But if you like, I can post the versions with these different nodes also.

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: Odamex Map Limits
« Reply #9 on: September 24, 2013, 14:53:31 »
Those node builders all seem to have their own extended node formats to get around vanilla Doom limitations. PrBoom+ has code to handle DeePBSP and glBSP nodes as well so it's not surprising that Odamex can't handle them (it only has code for vanilla Doom format nodes).
Odamex Development Team Member

Offline durian

  • Posts: 6
    • View Profile
Re: Odamex Map Limits
« Reply #10 on: September 24, 2013, 14:59:02 »
Good stuff - that must be the problem then.
Many thanks for your time, and for filing the feature request. I'd really like my stuff to be playable with Odamex, so I hope it's a feasible addition, and not too tiresome to implement.
Cheers! :)