Jump to content
The Dark Mod Forums

Save Region


Recommended Posts

According to issue #178 the Save Region feature is crashing.

 

I could locate the crash in map.cpp:1595:

region_startpoint = &GlobalEntityCreator().createEntity(
	  GlobalEntityClassManager().findOrInsert(eClassPlayerStart, false));

The EClassManager is returning an empty IEntityClassPtr that is NULL, hence the boost::exception.

 

What I'm wondering is how useful this feature really is and what culprits it may provide when extracting parts of large maps (I could imagine that the entity numbering is screwed up and script targets may break).

 

Thoughts/comments?

Link to comment
Share on other sites

As far as I know the findOrInsert() method should never return NULL, but should create the entity class if it does not exist in the cache. I can't say what the value of Save Region is as a feature though -- doesn't it basically do the same thing as Save Selected? I don't see why we need two features for this.

Link to comment
Share on other sites

It should seal the selected "region" off with brushes and places an info_player_start to the current camera position. It's some kind of shortcut and thinking about it I'd vote for keeping it but move it to a different menu location.

 

Regarding the IEntityClassPtr: it was definitely NULL, but I haven't investigated the reason for it. The region code is a bit of a mess, so I'll refactor this whole thing into a proper class.

Link to comment
Share on other sites

I've found the reason and it's actually my fault: I misspelled a registry key and the result was empty, which in turn caused the EClassMgr to return an empty IEntityClassPtr().

 

I'll fix it and upload it.

 

edit: Fixing it doesn't make it better, the func_statics are not handled correctly by the region save, so I'll have to fix that as well.

Link to comment
Share on other sites

Ah, I just figured out how Regioning is meant to work: It's basically the same as Show/Hide, but stronger. You can define a region in your map and every scene::Node that is outside gets set to the state "excluded" (same as hidden, but stronger). You can continue working on the visible region and even use show/hide on the visible objects until you turn the Region off again.

 

And of course you're able to save the current region to a separate file where it's auto-sealed and an info_player_start is placed.

 

Overall, I think that's not a bad idea at all and it gives us another way of implementing a layer system basing on the scene::Nodes themselves.

 

I'll see to it that the current code is a bit more organised and is working ok, because it's a feature worth keeping.

Link to comment
Share on other sites

What I'm wondering is how useful this feature really is...

Thoughts/comments?

I guess my opinion is already known as the tracker ^_^, but just to get it out there: beyond useful, I qualify it as essential. Compiling an entire map of the size of a Doom3 level and beyond, each time you need to verify that something works right, is really unfriendly. In DoomEd, you simply choose a region by one of the available methods, compile just that limited area, and launch. Seconds to compile and launch, as opposed to potentially many, many minutes (even hours in extremely large maps).

 

Most Favorite Feature! (...well, one of 'em)

Link to comment
Share on other sites

Save Selected and Save Region is not quite the same, as "Save Region" does not depend on any selected items. It saves all the non-excluded nodes to the file, whereas the "Save Selection" command is independent on the current Region. I'd vote for keeping that separate.

 

However, as long as we can't compile any maps, this feature will remain half as useful, as Sneaksie mentioned.

 

I could look into creating a collision model (.cm) file for the map, which would of course be tricky, but my knowledge in regard to the .proc file is zero.

Link to comment
Share on other sites

I must admit that I never used this feature and never did much mapping in DoomEdit, so I can't say for sure how this is intended to work in DoomEdit.

 

Isn't it desired that only the current region gets recompiled and not the whole map? Some kind of differential compile? SneaksieDave, is this possible in DoomEdit?

Link to comment
Share on other sites

I was assuming that the region was saved to a separate file, with sealing walls and a player start location, and this separate map file was compiled by Doom as if it was just a normal map. Even if DoomEdit does provide a built-in "compile region only" option, the separate map file is as close as we can get without the map compiler.

Link to comment
Share on other sites

I was assuming that the region was saved to a separate file, with sealing walls and a player start location, and this separate map file was compiled by Doom as if it was just a normal map.

This is true and is/was already functional and I agree that there probably is not much more we can do.

Link to comment
Share on other sites

This is getting confusing. Even more confusing, is that it sounds like we're all saying the same thing but not realizing it. ^_^

 

In DoomEd, open a map, and zoom the view into the limited area you want to compile. Make sure it has light and a playerstart in it, as I'm currently not sure if DoomEd handles that for you if not. Then do Region | Set XY. Then BSP it. You can now enter that limited are in Doom3 by running "map whatever.reg" at the console.

 

I assume how it would work in DR would be to save that region out with:

-bounding walls to seal

-a player start

 

and then the user would "dmap whatever.reg" at the Doom3 console to compile it.

 

Edit: Oh, of course, since this is a separate application from Doom3, DR could just as well save out a .map instead of a .reg. Unless... maybe Doom3 uses .reg to ignore leaks? I'm not sure.

Link to comment
Share on other sites

Ok, so it seems we're even with DoomEdit in that respect. :)

 

DarkRadiant can already save the map with automatically created wall/ceiling brushes including info_player_start entity. Of course the extension is .map.

Link to comment
Share on other sites

DarkRadiant can already save the map with automatically created wall/ceiling brushes including info_player_start entity. Of course the extension is .map.

Awesome. In fact, it might be better, since DR treats it as an independant, sealed map (assuming .reg in Doom3 isn't in fact needed to ignore leaks, and DR's sealing is bullet-proof. Which it probably is - I imagine you can just get the largest bounds and then build a simple box around everything).

 

I just found some oddness (this is DoomEd). The warehouse.map is 426kb. I created a region to outline the steps above which is 123kb. It is saved out as warehouse.reg. However, when I re-open the map, it contains all of the original data. :huh:

 

Maybe the .reg is just a partner file to the .map. I dunno. Either way, it seems like DR might be handling it already in a more understandable and straightforward manner. :thumb:

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...