Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No obvious way to create a disconnected linedef inside a sector #48

Open
pwiecz opened this issue Oct 15, 2022 · 5 comments
Open

No obvious way to create a disconnected linedef inside a sector #48

pwiecz opened this issue Oct 15, 2022 · 5 comments

Comments

@pwiecz
Copy link
Contributor

pwiecz commented Oct 15, 2022

Hi,
I wanted to create a linedef inside a sector with its both side referencing the enclosing sector (to have a disconnected teleporter inside a sector).
I can create a two-sided line: linetype(type,tag) step(0,len) step(0,sub(0,len))
But when I compile the project it will assign sector #0 as the neighbouring sector to the linedef.
If I try to assign a sector to such line: forcesector(get("sector")) linetype(type,tag) step(0,len) linetype(0,0) step(0,sub(0,len)) rightsector(0,0,0), I gen an error: "both sides assigned to the same sector".
To compile my project I've created a hacked version just disabling the error: pwiecz@8868a26

I can see a few ways it can be handled:

  • leave it as it is. Perhaps this feature is not worth supporting. Or maybe there's already a way to make it work.
  • by default assign surrounding sector as the neighbour of such lines
  • allow explicitely assigning sectors to such lines

Best,
Piotr

@jmtd
Copy link
Owner

jmtd commented Oct 17, 2022

Hi, it's cool to see someone using WadC! Yes, I'm not sure how best to address this. When I've had a need to do something similar, I've created a tiny triangular inner sector with the connecting lines doing nothing useful but closing the inner sector. Is that not an option for your project?

I'd love to see your project, if/when you are ready to share it with people!

@pwiecz
Copy link
Contributor Author

pwiecz commented Oct 17, 2022

Hi.
My project is not a "real" doom map, more like a toy to see how far I can push the Boom engine. :)
You can see it here: https://github.com/pwiecz/conway.wad , it's really not a pretty code. :)
I've also written a small post about it here: https://www.doomworld.com/forum/topic/131881-conways-game-of-life-in-boom/

As I was experimenting with it, I thought that single disconnected lines had significantly lower performance overhead for the engine. Although since then I've learned how to use forcesector correctly and perhaps forcing all the triangular (or even rectangular) sectors to be the same sector would be enough. :)

P.S.
I've also came to implementing sidedef packing inside WadC to be able to increase the board size, but it's not a fully working implementation, and as such I've not yet written an issue nor pull request about that.

Best!

@jmtd
Copy link
Owner

jmtd commented Oct 19, 2022

This looks very cool. Working entirely from memory, each step populates an array of lines that are queued up to be put into the next sector which is created with leftsector/etc. Rather than adjust those existing functions to handle the disconnected-linedef case, perhaps we can add a new function that consumes the queued lines and assigns them to the last sector (or a user-specified one). WDYT?

I look forward to checking out your sidedef packing!

@pwiecz
Copy link
Contributor Author

pwiecz commented Oct 22, 2022

Your proposal sounds cool to me.
I don't know the code, so I have no idea if there may be any gotchas... :)

@jmtd
Copy link
Owner

jmtd commented Jan 13, 2023

Working entirely from memory, each step populates an array of lines that are queued up to be put into the next sector which is created with leftsector/etc.

Hm. It's not that simple. What I was remembering was the approach I used in Liquorice, a Haskell re-implementation of WadC. I need to think more about how to handle this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants