Circle collision box for drops instead of a square.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Circle collision box for drops instead of a square.

Post by Nirahiel »

Since a small picture is better than a thousand words, here is one :
Belts.png
Belts.png (3.7 KiB) Viewed 9641 times
Currently, the items have a square collision box.
That means when they arrive in a belt, all nicely compacted, when red turns left, blue has to wait until red is completely gone to start to go up, and when it's on top of the belt, it has to leave completely again before the 2nd red can come in, etc.

With circle collision boxes, it's different, when red starts to go left, blue can gently slip against red and still go up, that way, when red is gone, blue has already started to go up, and is even done already. It can now go left without waiting, letting the 2nd red go up immediately.

I think THIS will fix the issue we have with turns in belts where you have to use faster belts at the edges or else gaps will appear. :)

Image
Goddohando
Inserter
Inserter
Posts: 34
Joined: Wed Sep 25, 2013 7:47 am
Contact:

Re: Circle collision box for drops instead of a square.

Post by Goddohando »

Good idea!
It would make it much better.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Circle collision box for drops instead of a square.

Post by ssilk »

It will fix it, but you have calculate with radius it eats much more CPU. And it changes the gameplay completely cause when the items jam and there is nothing on the other side of the belt, some items would be pressed to that side.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Circle collision box for drops instead of a square.

Post by Nirahiel »

ssilk wrote:It will fix it, but you have calculate with radius it eats much more CPU. And it changes the gameplay completely cause when the items jam and there is nothing on the other side of the belt, some items would be pressed to that side.
Not necessarily, cause the belts push the items outwards naturally :)
Also it can be done without eating CPU, keep bounding boxes square if you want, but then make it so that when an item is on the top of the belt, just starting to go left, then let the other one clip through and go up, that could also fix the issue.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Circle collision box for drops instead of a square.

Post by kovarex »

I have spent some non trivial time solving different kind of problems with belts already, so I know that every solution brings some new problems almost every time :)

This particular solution would help in some cases, as you propose, but, in some other it would bring new problems. The included picture is the first one I came up with after thinking about it for short time, but I'm quite sure, that the game would bring some new ones :)
Attachments
The two items would like to move in their directions but they can't, these are stucked.
The two items would like to move in their directions but they can't, these are stucked.
belt-problem.png (12.63 KiB) Viewed 9620 times
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Circle collision box for drops instead of a square.

Post by Nirahiel »

Give priority to items coming from the top then, or in general, if a belt is coming from the side of another one, the merging belt have less priority than the main one ? :)
Like, there is a small invisible wall that pops on the (in this case right, looking from the direction of the items, or left if you just look at the picture) side of the main belt to prevent items from entering until the belt is clear.
grobyc
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sat Apr 27, 2013 8:49 am
Contact:

Re: Circle collision box for drops instead of a square.

Post by grobyc »

I don't knew the encoding but:

If materials goes on belt from left to right it use straight graphics of belt, if materials goes goes from let to down its corner and use corner graphics and you code it use two different graphics.
If u can display different graphic used on corner, maybe there is possibility to code:
if it's corner then use 150% of basic speed of used belt

simple thought but is possible to code?
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Circle collision box for drops instead of a square.

Post by Nirahiel »

Yeah it's possible to make the belt naturally faster on a turn. That could work.
Post Reply

Return to “Ideas and Suggestions”