Friday Facts #419 - Display Panel & Inserter pickup fixes

Posted by Earendel, Klonan, Twinsen on 2024-07-12

Hello,
Welcome to our facts for the week.

Sign posts or bulletin boards are a common sight in videos games, probably not far behind the ubiquitous wooden crate or explosive barrel. They are a nice clean understandable way to communicate with the player, and it was something we wanted to see in Factorio for a long time...


Display Panel - DesignEarendel

The full functionality of the new display entity will be fully explained further below. For the design, all we need to know is that it is an entity that can display any icon of your choice (item, recipe, virtual signal).

The first version I saw was a signpost added by Klonan. It was a nice placeholder, and the general concept of the display entity as a signpost was something to consider. In theory a signpost could work, but there are a few detracting factors:

  1. A signpost is primarily a 2D structure, and by that I mean it is tall and flat but doesn't have much depth. If the signpost's supporting post is in the middle of the tile, then as a tallish entity, that pushes the display area up and outside of the tile that the entity occupies.
  2. If the signpost is moved forwards so that the display keeps more within the entity tile, then as a mostly 2D structure, it looks like most of the tile behind it is unoccupied and it looks weird when lined up with other things.
  3. The display surface ends up as a vertical rectangle, but the icons that appear on the display are icons that are designed to be seen in a GUI or horizontal plane like the ground or a transport belt. This would make all the icons look more out of place and fight against Factorio's apparent camera projection.

If any version of a signpost was going to work, then it would probably need to be more like one of those temporary road signs that sits on the ground and leans back on some triangular supporting struts. The bigger problem is that neither of these options has the right aesthetic.

First design - Display plate

My first design was a quick mockup of something that would fix a lot of these problems. It would be a broad, blocky, mostly horizontal display surface that would work more naturally with the icons we have. It's more akin to a metal display plaque that you might see in an old industrial museum or war memorial. The next problem is that if the icon were drawn on the surface, then really it should be squashed in the vertical axis a bit because of the camera direction. To avoid this I tipped the surface forward slightly to face the camera. A lot of display plates are angled towards the expected head position of a standing reader, so this looked reasonable.

The final thing was that the icons tended to look best and be clear on a dark grey background so that was added too. That's about as far as I got with that idea. It wasn't intended to be a proper design and wasn't done at the usual 4x resolution of concept art. Even so, it worked better than the signpost, so it was put into the game for a few months. It even managed to sneak its way into a few FFFs.

Second design - More circuits

When the time came to do the proper design some of the requirements had changed. It was no longer just a static display, it had circuit connectivity to change the icon and more. It was also unlocked later as part of the circuit network system, along with all the combinators, the power switch, and the programmable speaker. As such, the new display entity should look like part of that level of technology.

The new design is based on a combinator-style base. All of the combinators are different, so the base of the display is also "the same but different" in a consistent sort of way.

For the display face itself, I went with a CRT (Cathode Ray Tube). This sort of curved display surface is ideal for the aesthetic of that part of the tech tree. A screen of this sort is normally angled forward, but if you look at a lot of old NASA displays, a lot of them were angled quite heavily upward. Presumably this is so they can be seen well from a sitting or standing position. For reasons mentioned earlier, it's best for our icons if the display surface is closer to facing the camera which is a 45 degree angle. The CRT screen is angled up to about 40 degrees so it's nearly facing the screen, but you can still see some of the interesting details from the top.

The first iteration of the new design was based on the whole structure rotating without changing it's form per direction. This made the screen move around based on the entity orientation which is more consistent for the shape of the object, but it wasn't great to have the icon and text be shifted to the left or right so that had to change.

The 2nd iteration keeps the screen steady through all the rotations. This means that the shape of the structure is different for each rotation, and it was a bit of a struggle to keep the circuit connection points in reasonable places, but it worked out.

We could have locked it to just 1 rotation, but having rotatable circuit connections is pretty important because this is one of the few display-focussed entities in the game, and having wires covering the icon is not what you want. Rotating the entity to change the circuit connection positions helps keep the screen clear. Even if you rotate it as part of a larger combinator bank, they all rotate together and stop the wires from tangling. (Also, even the constant combinator has 4 rotations so it would be weird if the display panel only had 1).

This design is pretty new, so we'll need to test it more before calling it final. There's no 3D model yet, that will be made if we decide that we're happy with this version.


Display Panel - FunctionalityKlonan

The Display panel at its most core and simplest is just a way to show messages to players, so that was the natural first feature.

Showing messages

In the Display Panel GUI, players can type a message to be shown. By default the message is only visible when the Display panel is hovered by the player.

Sometimes though we want the information to be visible at all times, so we added an option to set the text to always show (in alt-mode).

For short messages it is okay, but we can't just spam whole paragraphs on the players screen all the time. So we made it that only the first line of text will show, and the full message appears only when hovered.

Showing icons

Next it felt natural that we allow setting an icon to show. It doesn't really need any explanation, you pick an icon and its drawn on the entity.

Except we took it a step further, with the 'Show in Chart' option, which takes the usage of the Display panel to the next level.

Clicking the icon on the map opens the sign post for easy editing.

This is quite similar to the custom tag system, but doesn't need any manual management when you add or remove part of your factory. And of course, kovarex made it work with the new parametrised blueprints, so stamping down a standard design will have the display panel with the correct icon with perfect alignment.

Connecting to circuit network

Connecting the Display panel to the circuit network opens a whole can of worms. Initially we didn't know how to do it, entering text with circuit network isn't something that can be done.

So we decided on a simple system:

  • You specify a list of messages, each with its own condition.
  • The list is evaluated top to bottom (you can drag to rearrange them).
  • The first message that passes it's condition is shown.

We also added the functionality of using the 'Any signal' as a wildcard for setting the icon, so you can make dynamic combinator displays.

A combinator bank selects a recipe for all the crushers and the display panel shows the current output.

We used the Display panels quite a bit in our office LAN parties, they are great in multiplayer where communication is key.
Display panels will be coming for free as part of the base game 2.0 update.


Inserter pickup fixesTwinsen

When playing with the new fastest transport belts, I noticed a problem. In some situations, even the fastest inserters were not able to pick up items from belts. They would just about reach it but miss it. A similar problem that was always in the game is burner inserters not being able to reliably pick up items from express transport belts, a problem which I personally found annoying and with no gameplay benefit.


Fast inserters not able to pick up from underground green transport belt.
Video at 0.5x speed.


Burner inserters not able to pick up from express transport belt.
Video at 0.5x speed.

Looking at them in slow motion, especially in the burner inserter example, it looks like the hand reaches the items just fine, so it should just pick it up if it's close enough. Implementing some simple snapping should fix both issues. As usual, it was not that simple.

Inserters have 2 independent movement speeds:

  • Rotation speed - How fast the arm spins on its base.
  • Extension speed - How fast the hand extends and retracts.

After some debugging, it turned out that the extension speed was just too slow: the arm would rotate to the correct angle but the hand would take it's sweet time to reach the correct length. So buffing this value for the inserters helped. I also improved the snapping logic, so inserters will snap better to the item when it's close enough.

With the changes, both issues are fixed. Inserters are now more consistent, less prone to frustrating failures, and also gives them a small buff when taking from transport belts.


As always, display your thoughts at the usual places.