Friday Facts #344 - Tile transition collisions & Team Steelaxe speedrun record.
Author: Klonan,
published 4 years ago,
[i][url=https://factorio.com/blog/post/fff-344]Read this post on our website.[/url][/i]
[h1]Tile transition collisions (Klonan)[/h1]
We first mentioned a change to our tile transition logic back in [url=https://factorio.com/blog/post/fff-199]FFF-199[/url], and not long after in [url=https://factorio.com/blog/post/fff-214]FFF-214[/url]. These two posts focused more on the visual side, and how it makes the game terrain look so much better.
In short, the tile transition logic overlays an additional sprite over adjacent tiles, so that where the two tiles meet has a much more natural look.
[img]https://clan.cloudflare.steamstatic.com/images//12002589/eb55ed03307282a8dac19d7dc99e6abe3e363aac.png[/img]
[i]Tile transitions on.[/i]
[img]https://clan.cloudflare.steamstatic.com/images//12002589/ed6f1eb4855004a16526f78aa72986119bf6ea9d.png[/img]
[i]Tile transitions off.[/i]
So while the looks were taken care of, we also had to deal with the 'feel' of the tiles. The easiest example of this is the 1x1 landfill 'stepping stones'. It really looks like you should be able to walk/drive across the 1 tile of water. So we added in an additional layer of collision checks, which will consider the transitions when performing the logic of what can go where.
https://cdn.factorio.com/assets/img/blog/fff-344-stepping-stones.mp4
Now some of the cheesier among you will know that biters don't know how to get across these 1 tile gaps. That is because simply we never enabled the biters to use this collision check logic. One reason is that more checks means more UPS usage for the biter pathfinding, another is that we didn't think it was necessary. However it was available in the engine, and any mod could enable it if they want. That is exactly what I did with my [url=https://mods.factorio.com/mod/Mining_Drones]Mining drones[/url] mod. Initially this seemed to work, and I thought it might make them walk around lakes a bit more naturally (like the player character does).
However quickly I noticed that people were reporting on the forum that the game was crashing with the mod installed. I quickly reverted the change to my mod and we started looking into it. It turns out that the new abstract pathfinder we added for better unit pathfinding ([url=https://factorio.com/blog/post/fff-317]FFF-317[/url]) was not set up to consider units using this tile transition collision logic. This same crash was happening sometimes without any mods installed, but the case was more difficult to reproduce, so this is a nice situation where mods help us work on issues in the base game.
Recently I have been working on another unit heavy mod, [url=https://mods.factorio.com/mod/Transport_Drones]Transport drones[/url], and the principle design behind the mod heavily relies on the tile collision logic (the units don't even collide with entities). It turned out to be a really nice test of our new pathfinder, but also highlighted some of the issues that not considering the tile transitions can bring.
https://cdn.factorio.com/assets/img/blog/fff-344-drone-zig-before.mp4
[i]By not considering the tile transitions, the drone takes an awkward path along the diagonal road.[/i]
This week Oxyd finished his work on an upgrade to the pathfinder, so we can enable the tile transition collision logic with units. The change is immediately noticeable with the above example.
https://cdn.factorio.com/assets/img/blog/fff-344-drone-zig-after.mp4
[i]By considering the tile transitions, the drones path much more naturally.[/i]
With the logic now in place, we are debating whether to enable it for biters or not. We probably won't, it is only a minor change and would have a non-zero performance impact (a rough test puts the worst case at about 5%), but then again it is a fun way to surprise those who thought the 1 tile of water would stop the biters attacking, and it kinda makes sense they can walk over it just as the player can. Well we will see if there are any issues with it in the modded cases before any further consideration.
As a bonus fact (this is Factorio facts after all), I spent a bit of time benchmarking some late game Transport drone based factories ([url=https://cdn.factorio.com/assets/img/blog/fff-344-late-game-base.png]screenshot[/url]), and found a few nice performance gains.
[h1]This game is too short, I want my money back! (Bilka)[/h1]
This Wednesday, Team Steelaxe set a new Any% multiplayer speedrun world record at 1 hour, 15 minutes and 21 seconds. This is the fastest anyone has ever launched a rocket in an unmodded Factorio game.
[previewyoutube=X7LH9EvjQV0;full][/previewyoutube]
I am part of [url=https://discord.gg/antielitz]Team Steelaxe[/url], so I want to take the opportunity to explain how we managed to beat the game this quickly. In general, it is all about planning and preparation, we estimate that we have put a combined 200 hours into planning just for this speedrun. The Any% speedrunning category allows to change all map generation settings, including disabling enemies. Multiplayer subcategories allow for up to eight players. Planning begins with picking a map seed. Since there are many possible maps to choose from, we let a script [url=https://github.com/Zulan/factorio-seedfinder-017]generate[/url] maps and automatically filter out the ones without enough ore in the starting area, and then handpick from there. With the map picked, it is possible to start planning the base. This begins with setting a target time to finish the game and calculating the amount of science and number of assemblers required from there. We then come together and arrange a base on the chosen map, which will serve as a reference for the factory built in the actual run. It should be noted that the category rules do not allow blueprint imports, so instead we usually have the planning save file open in another window or use screenshots during the run.
[img]https://clan.cloudflare.steamstatic.com/images//12002589/7f8eeb19da01475421dd9e66fbea40b1a9de63e4.png[/img]
[i]Part of the spreadsheet that contains every player’s responsibilities.[/i]
Another big part of the planning is also to create a spreadsheet of everyone’s tasks and when they should be done. We distribute the tasks so that two players build smelting, two build mining, one player builds the power plant and only three people build the factory itself. This strict divide means people only ever take and craft the material that they need, so ideally we don’t have to fight over resources. Furthermore, the task list allows us to optimize by shuffling tasks around, so that no time is wasted by anyone. One example of this is that only two people ever chop wood for power poles, the rest get the wood from them and do not have to waste time on finding trees. The task distribution also means that every player has a very different perspective of the speedrun, so here are some more:[list][*]Zulan is doing [url=https://www.twitch.tv/videos/601094836]mining[/url].[*]I (Bilka) am doing [url=https://www.twitch.tv/videos/601185270]smelting[/url].[*]AntiElitz is another [url=https://www.twitch.tv/videos/601180086]base builder[/url].[/list]
With the complete plan prepared, we do runs and iterate on the planning, taking into account what worked well and what did not. The speedrun above is the result of a few of those planning iterations combined with some improvisation to compensate for mistakes in execution. It may not always sound like it during the run, but we are all friends and when someone makes a mistake, others jump in to help out, so the linked run is the result of good teamwork. Without everyone working together like that, we would not have been able to reach our target time of 1 hour and 15 minutes.
In the future, we hope to be able to launch a rocket in less than an hour, you can watch our next attempts on Sunday at 20:30 CEST on [url=http://www.multitwitch.tv/antielitz/nefrums/bilka2/vow_zulan/xenocyber]Twitch[/url]. You can find over 20 active speedrunners, resources such as save games and replays, or even try running yourself, at [url=https://www.speedrun.com/factorio]Speedrun.com/Factorio[/url].