Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record

Regular reports on Factorio development.
User avatar
FactorioBot
Factorio Staff
Factorio Staff
Posts: 423
Joined: Tue May 12, 2015 1:48 pm

Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record

Post by FactorioBot »

orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by orzelek »

Yay found FFF :D
(Was searching from few hours.. )

Ohh better pathfinding. Does that mean that custom units like construction bots will have this enabled by mod?
And we can make a simple mod to enable it for biters?
dee-
Filter Inserter
Filter Inserter
Posts: 416
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by dee- »

That drone looks really cute ^^
And personally I think Biters should be first class citizens, too, especially if the hit is really a mere 5% #equalitymatters
User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Philip017 »

oh my anyone complaining about wanting their money back from it being too short, isn't playing it very well.

as you so eloquently put it, it took 200 hours of planning to get that 1:15:21 speed run. that in and of it's self an quite a accomplishment, congratulations.

as for the biters being able to cross the 1 tile gap, i am sure there will be quite a few on both sides of the fence for this one, so i hope that you make the decision well, but for me i have to say that i appreciate that they can not cross it. either way however when playing with mods, we can over come that with water fill and landfill to make the water gap larger or smaller, but i hope that we don't experience huge lag spikes when we perform these tactics to cross and block uninvited guests.
User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Xterminator »

Great FFF as always!

I always love to hear about better path finding and movement. Personally I think biters should be able to cross anything that the player can.

Just wow in regards to the speed run record. That is mind blowing! I look forward to them getting it done in under 1 hour, and have confidence they can. A whole team made up the top speed runners is insane.
Great job guys!
Image Image Image
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by bobucles »

It's a good thing that planning stages aren't counted as part of the speedrun timing. Otherwise my very first 50 hour run would be in the top running. :lol:

But seriously, that takes not just the dedication of doing the run itself, but the countless hours of practice and training to reach the entry point where they can even begin to plan such an ambitious speed run. Good work!
Hiladdar
Fast Inserter
Fast Inserter
Posts: 214
Joined: Mon May 14, 2018 6:47 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Hiladdar »

Congratulations on the speed run! Shows what prior planning can task specialization can do, in the game as outside the game.

Hiladdar
melind
Inserter
Inserter
Posts: 27
Joined: Fri Apr 27, 2018 8:11 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by melind »

This FFF I really enjoyed, both the new mods/pathfinding and the speedrun bits. (Also grats to Nefrums on getting under 2 hours in Any% !!)

Has anyone in the speedrunning community considered submitting to games done quick? I bet it would be a lot of fun to showcase it.
User avatar
BattleFluffy
Fast Inserter
Fast Inserter
Posts: 200
Joined: Sun Mar 31, 2019 4:58 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by BattleFluffy »

I'm not sure I understand why 5% speed is being lost?

My (perhaps wrong) understanding is like this:
There exists a "map" of traversable tiles - the tiles where bitters can or cannot go - which the pathfinder consults when obtaining a path.
When bitters pathfinding pays attention to these transitions, this "traversable tiles map" looks different, but nevertheless can still be distilled down to effectively a tile-by-tile map of where bitters can and can't go.

What is the technical reason that prevents the distillation of the former into the latter? It seems as though this process would only need to be done at the start of the game, or whenever landfill is placed, not every frame... so I don't understand from where this 5% slowdown comes from.
seludovici
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Jan 06, 2018 6:09 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by seludovici »

Why don't you make the biter tile transition collision thing an optional check mark on the map generator, with it default to check-on for Deathworld.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Klonan »

BattleFluffy wrote: ↑Fri Apr 24, 2020 6:38 pm I'm not sure I understand why 5% speed is being lost?

My (perhaps wrong) understanding is like this:
There exists a "map" of traversable tiles - the tiles where bitters can or cannot go - which the pathfinder consults when obtaining a path.
When bitters pathfinding pays attention to these transitions, this "traversable tiles map" looks different, but nevertheless can still be distilled down to effectively a tile-by-tile map of where bitters can and can't go.

What is the technical reason that prevents the distillation of the former into the latter? It seems as though this process would only need to be done at the start of the game, or whenever landfill is placed, not every frame... so I don't understand from where this 5% slowdown comes from.
We don't store or cache any collision check data, it would be far too much data to store a map of the whole world for every combination of collision mask.

The check is done at runtime in the pathfinder, it gets a position, looks up the tile, looks up the prototype, and checks it if collides with the tile prototypes collision mask.
With the transition logic, it needs to lookup the adjacent tiles to check what transitions are active, and therefore if it collides with the transition or not.
User avatar
BattleFluffy
Fast Inserter
Fast Inserter
Posts: 200
Joined: Sun Mar 31, 2019 4:58 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by BattleFluffy »

I see, thanks for explaining that. :>
So the 5% slowdown is because of the extra time needed to look at those adjacent tiles, to check whether this tile is therefore traversable or not.

What is the reason for storing/reading the data in that way, instead of storing a representation of the world with each tile a boolean either true or false, traversable or not traversable?

I understand it's necessary to look at adjacent tiles in order to know what kind of transition to display, but for bitter pathfinding this seems unnecessary?
programaths
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Feb 22, 2019 6:44 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by programaths »

One reason is that more checks means more UPS usage for the biter pathfinding, another is that we didn't think it was necessary
That's because you deliver!
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Klonan »

BattleFluffy wrote: ↑Fri Apr 24, 2020 7:14 pm I see, thanks for explaining that. :>
So the 5% slowdown is because of the extra time needed to look at those adjacent tiles, to check whether this tile is therefore traversable or not.

What is the reason for storing/reading the data in that way, instead of storing a representation of the world with each tile a boolean either true or false, traversable or not traversable?

I understand it's necessary to look at adjacent tiles in order to know what kind of transition to display, but for bitter pathfinding this seems unnecessary?
A biter can have any size of collision box, and any collision mask, checking for tile collision isn't a simple boolean.
Even then, storing a boolean for each tile on the map would still add up to a lot of extra memory to thrash through, for only a small performance gain.

With normal biters, most of the time isn't even on tile collisions, but entity->entity collisions, which are far more complex and take most of the time.
For instance we can bite through an enemy wall, but won't bite through a friendly wall, so we need to check the force of walls when trying to find a path.
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by posila »

BattleFluffy wrote: ↑Fri Apr 24, 2020 7:14 pmWhat is the reason for storing/reading the data in that way, instead of storing a representation of the world with each tile a boolean either true or false, traversable or not traversable?
Because tile might be traversable for one thing but not traversable for different thing. Depending on collision mask of the tile and of the unit that tries to traverse it. It's true in base game all units have the same collision mask, and if we could assume this is always true things could be made simpler, but in that case Klonan wouldn't be able to make a mod that crashed pathfinder, and we wouldn't have a topic for this Friday :D

There is second part to this ... the transitions make tiles traversable, non-traversable or traversable through one of the corners (entity can "cut" through left-top, right-top, right-bottom, or left-bottom corner), so there is also small bit of logic in checking the entity is still only on the "allowed part" of the tile.
havvy
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Aug 29, 2014 9:49 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by havvy »

Why not make it so that if water is between two tiles like that, it becomes shallow water?
User avatar
zero318
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Apr 13, 2018 2:57 pm
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by zero318 »

Perhaps the pathfinding changes could be enabled for biters on death worlds? Considering that the whole point of the mode is to increase the challenge of the biters, it would make sense for them to be a bit smarter.

That also mitigates some of the UPS concerns since the majority of the players who are building megabases are already not doing so on death worlds.
I make mods! Feedback is appreciated, particularly if I broke something.
EnerJi
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Thu Aug 16, 2018 2:32 am
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by EnerJi »

Slightly OT, are there any plans to update the table of 'things remaining before 1.0' a la this prior FFF:

https://factorio.com/blog/post/fff-282

I find it very interesting to be able to view progress at a high level like that even when a certain area is not the subject of the current FFF.

Separately, can anyone tell me whether the blueprint improvements have landed in 0.18? I was planning to hold off until 0.18 reaches stable, but I could be tempted to upgrade to experimental if blueprints are massively improved. I'm finally at a point where I have lots of robots and can really leverage blueprints, and I really am struggling with how to use them effectively.

I'm sure I could figure them out, eventually, but I almost feel like it's not worth my time given the planned blueprint improvements.
coppercoil
Filter Inserter
Filter Inserter
Posts: 502
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by coppercoil »

Klonan wrote: ↑Fri Apr 24, 2020 7:05 pm We don't store or cache any collision check data, it would be far too much data to store a map of the whole world for every combination of collision mask.
How about some temporary chunk-level cache that is released quickly when it's not used within X ticks?
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.

Post by Oxyd »

coppercoil wrote: ↑Fri Apr 24, 2020 9:00 pm
Klonan wrote: ↑Fri Apr 24, 2020 7:05 pm We don't store or cache any collision check data, it would be far too much data to store a map of the whole world for every combination of collision mask.
How about some temporary chunk-level cache that is released quickly when it's not used within X ticks?
You could view the chunk component contraction used by the pathfinder as a kind of a crude collision check cache. It tells you whether you can go from one chunk to another, and that information is stored and re-used.
Post Reply

Return to β€œNews”