[16.30] Rail Planner direction fixed after first ghost placement

This subforum contains all the issues which we already resolved.
Post Reply
wizard07ksu
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Dec 29, 2017 11:00 am
Contact:

[16.30] Rail Planner direction fixed after first ghost placement

Post by wizard07ksu » Sat Mar 17, 2018 2:33 am

This might actually be two bugs, but I'm putting them both into one report since they both deal with the rail planner.

The first issue, which is new to 0.16.30 (experimental), is that after placing a set of ghosts using the rail planner, the orientation of the next rail piece gets set to "up".

Expected behavior based on previous version is that when you first SHIFT+CLICK to start rail planning, the orientation of the track entering the square the cursor is over will be chosen by the system. The game will figure out the best way to get from origin to cursor, and will orient the track appropriately. The system will STOP choosing the orientation of the final track piece after the player rotates the track. All of that still works.

My broken expectation is that after placing a section of ghost track, the game will remember the orientation of the final rail piece. E.g., if I wanted to turn some track, I would rotate the track for the direction I want to go and place it. Then, the next track ghost will still be facing the same direction. But what is actually happening is that the new rail planner orientation will be due north/up. Pics are attached (Planner Orientation*).

Further, after placing a section of ghost track with the rail planner, the system will no longer change the orientation of the final track piece. Its as though I rotated the track to point up. I have to manually reorient.

The other bug is related to a weird collision box issue with curves. See attached pics (Collision Box*) for an example. My expectation here is that this should either be a collision for all cases or none. Either that radar is in the way of the rail (should not have been able to place the curved segment), or it shouldn't be in the way of either the curved segment nor the diagonal segment. Right now, the inconsistent behavior is really annoying.
Attachments
Planner Orientation - Setup.png
Initial setup for planner bug(s).
Planner Orientation - Setup.png (971.76 KiB) Viewed 1291 times
Planner Orientation - Desired Bahvior.png
Desired behavior of rail planner.
Planner Orientation - Desired Bahvior.png (803.96 KiB) Viewed 1291 times
Planner Orientation - Actual Current Behavior.png
Current behavior of rail planner after placing segment.
Planner Orientation - Actual Current Behavior.png (2.26 MiB) Viewed 1291 times
Collision Box - Layout.png
Layout to get collision box conflict.
Collision Box - Layout.png (425.07 KiB) Viewed 1291 times
Collision Box - Conflict.png
Shows the conflict between the radar and diagonal rail.
Collision Box - Conflict.png (917.56 KiB) Viewed 1291 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 9481
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Rseding91 » Sat Mar 17, 2018 11:48 pm

Thanks for the report. I fixed the first issue for the next version of 0.16.

The 2nd issue is not currently fixable. Curved rails use 2 different rectangular bounding boxes so if an entity would collide at the intersection of those 2 bounding boxes where they don't overlap it doesn't collide due to missing both bounding boxes. When you try to build the diagonal rail it's a single rotated rectangular bounding box and it does overlap that little corner where the curved rail missed and isn't buildable.

Curved rail bounding boxes can't be adjusted without braking multiple other rail related setups and we aren't going to add support for non-rectangular bounding boxes so we're stuck with what we have now.
If you want to get ahold of me I'm almost always on Discord.

wizard07ksu
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Dec 29, 2017 11:00 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by wizard07ksu » Sun Mar 18, 2018 6:30 pm

Good to hear about the ghost fix! And thank you for the explanation on why you can't fix the 2nd one. I don't think that will matter a great deal - I've played the game for over a year and haven't seen this until now. It likely won't come up very often.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2000
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Jap2.0 » Sun Mar 18, 2018 7:32 pm

Rseding91 wrote:Curved rails use 2 different rectangular bounding boxes so if an entity would collide at the intersection of those 2 bounding boxes where they don't overlap it doesn't collide due to missing both bounding boxes. When you try to build the diagonal rail it's a single rotated rectangular bounding box and it does overlap that little corner where the curved rail missed and isn't buildable.

Curved rail bounding boxes can't be adjusted without breaking multiple other rail related setups and we aren't going to add support for non-rectangular bounding boxes so we're stuck with what we have now.
A few things:
1. What negetive effects would enlarging curved rail bounding boxes a couple pixels really have? It wouldn't break anything that's there currently (c.f. turret and boiler size changes). Are there any very common rail setups that make use of things very close to a curved rail, and even if so, isn't it part of the game to build around other stuff (at least with belts, and to some extent bots, although I don't want to start that debate here) and changes like this (expecially considering that we're still in alpha)?
2. I keep hearing about how curved rails have two bounding boxes. Would it help performance any if you internally split curved rails into two (or even more) entites? I though I heard once that having to check if everything has two bounding boxes hurt performance for everything, but I can't seem to find that now and it easily could've been optimized since.
There are 10 types of people: those who get this joke and those who don't.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9481
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Rseding91 » Sun Mar 18, 2018 7:57 pm

Jap2.0 wrote:1. What negetive effects would enlarging curved rail bounding boxes a couple pixels really have? It wouldn't break anything that's there currently (c.f. turret and boiler size changes). Are there any very common rail setups that make use of things very close to a curved rail, and even if so, isn't it part of the game to build around other stuff (at least with belts, and to some extent bots, although I don't want to start that debate here) and changes like this (expecially considering that we're still in alpha)?
I changed them once and it was around 3 weeks of bug reports and new tests to fix all of the things it broke with the end result being I fully reverted the bounding box size changes. You can run the test suite that ships with the game after making changes yourself locally to see if you broke any of the things we currently have tests for. Most likely you will :)
Jap2.0 wrote:2. I keep hearing about how curved rails have two bounding boxes. Would it help performance any if you internally split curved rails into two (or even more) entites? I though I heard once that having to check if everything has two bounding boxes hurt performance for everything, but I can't seem to find that now and it easily could've been optimized since.
That's something we've talked about doing as well. We just haven't gotten around to it yet because the current system mostly "works".
If you want to get ahold of me I'm almost always on Discord.

Dune
Fast Inserter
Fast Inserter
Posts: 154
Joined: Tue Dec 12, 2017 4:27 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Dune » Sun Mar 18, 2018 9:42 pm

I just posted this 58813 bug as well, and created a video to go alone with it that I'll share here. https://www.youtube.com/watch?v=g8qslm1ftRI

Sorry, didn't see this in search when I posted mine. Thx for fixing it!
Image

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2000
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Jap2.0 » Mon Mar 19, 2018 1:11 am

Rseding91 wrote:
Jap2.0 wrote:1. What negetive effects would enlarging curved rail bounding boxes a couple pixels really have? It wouldn't break anything that's there currently (c.f. turret and boiler size changes). Are there any very common rail setups that make use of things very close to a curved rail, and even if so, isn't it part of the game to build around other stuff (at least with belts, and to some extent bots, although I don't want to start that debate here) and changes like this (expecially considering that we're still in alpha)?
I changed them once and it was around 3 weeks of bug reports and new tests to fix all of the things it broke with the end result being I fully reverted the bounding box size changes. You can run the test suite that ships with the game after making changes yourself locally to see if you broke any of the things we currently have tests for. Most likely you will :)
How do I run the test suite (or where is it found)?
Rseding91 wrote:
Jap2.0 wrote:2. I keep hearing about how curved rails have two bounding boxes. Would it help performance any if you internally split curved rails into two (or even more) entites? I though I heard once that having to check if everything has two bounding boxes hurt performance for everything, but I can't seem to find that now and it easily could've been optimized since.
That's something we've talked about doing as well. We just haven't gotten around to it yet because the current system mostly "works".
[/quote]

Ah, okay. Are multiple bounding boxes only used for the curved rails, or can it be used by mods (that it would break, although seperating curved rails would presumable do that to some extent already)?
There are 10 types of people: those who get this joke and those who don't.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9481
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Rseding91 » Mon Mar 19, 2018 3:23 am

In the game folder under "tests" there's a .bat file - just run that.
If you want to get ahold of me I'm almost always on Discord.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2000
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [16.30] Rail Planner direction fixed after first ghost placement

Post by Jap2.0 » Wed Mar 21, 2018 1:11 am

Okay, thanks.
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users