Birdoggydog's Builds

Making theme-styled signs that sit on their props in Godot

Signs are now real plates with pictograms in six themed looks. The men's room plate hangs by its door, and the vat's label wraps around its drum.

The signs in the game were dark boxes with glowing words on them, and I didn’t like them. Now a sign is a plate of real size with a pictogram, a border and screws, in the look of the place it’s in. The Men’s Room plate is on the wall beside its door, and the Juice Injector’s label is wrapped around the vat.

44 seconds: the Men’s Room door before and after, the plate close up, the vat’s label, a lift sign, and the same plate in each theme.

Why did the men’s room sign look wrong?

I said the signs on the men’s room and the vat were “just random black boxes with words on them”, and I wanted them to fit the theme and sit more naturally on the props. The men’s room box was 1.5 by 0.46 m, in the middle of both faces of the door at 2.15 m, which is two to four times the size of a real door sign. A room sign goes on the wall at the latch side of the door.

A rusty green door seen close up with a wide black box across it reading MEN'S ROOM in glowing white letters.

Before: a dark box with glowing words on the door’s leaf.

A corridor wall of gray steel panels with a small black plate holding a white standing figure and the words MEN'S ROOM, with a cyan edge. The green door is to its right.

After, from 3 m in the corridor: a small plate with a man pictogram on the wall, 1.45 m up.

How is a sign face made?

A face is drawn once at runtime. A Control draws the words, the pictogram and the border inside a SubViewport at 2000 pixels per meter, with 3D off and update set to once. Two frames after it’s drawn, the picture is copied out into an ImageTexture with mipmaps, so the plate doesn’t shimmer from across a room, and the viewport is freed. Faces are cached by their words, pictogram, theme and size, so a corridor of the same plate only draws once. In the headless tests nothing is drawn, and the material is just the field color.

The pictograms are shapes on a unit grid, drawn after the AIGA symbol signs. I didn’t import any symbol files. There are four so far, a man, a woman, both together and a lift, and picking one from the words is a match statement.

Each theme is a dictionary of colors, thickness, corner and screws. The plant’s look is white plastic engraved in black with two stainless screws. Steampunk is cream on cobalt enamel with brass screws, fantasy is gilt on wine on a 22 mm oak board with iron nails, and meat is a brand on pink skin with no fastener. Eldritch is incised, with a border that doesn’t close and violet letters that glow a little. Cyberpunk is black acrylic with a cyan line and a lit edge. A plate in a worn room loses its last screw and hangs 4 degrees crooked.

The plate itself is a box as thick as its theme wants, with a quad for the face 0.4 mm in front of it and small domed screw heads at the corners. The font is picked in one function, so I can give each theme its own font later by changing that one place.

How does the game place a room’s sign?

A room’s plate goes on the wall beside the latch-side jamb. Its middle is 1.45 m up and its near edge is 0.15 m from the frame, on the outside only. The game works out the outside from the dungeon plan, as the side the route from the entrance comes from. If the square on the latch side is open, or the square in front of it is rock, the plate moves to the other wall. The men’s room plate is 0.20 by 0.28 m, and the lift signs are 0.9 by 0.24 m.

How do you wrap a label onto a vat?

The old label was a flat card 1.45 m wide, 1.33 m from the vat’s middle. The vat’s radius is about 1.2 m, so the card’s edges stood about 0.19 m off the surface. I thought about a Decal, but a decal stretches by 1 over the cosine of the angle to the surface, and it would also print onto anything standing in front of the vat.

So the label is a curved mesh, 1.1 by 0.42 m. I sample it in 48 columns and 5 rows. For each column I take an angle across the arc, then for each row I cast a ray at the triangles of the vat’s first level of detail and keep the outermost hit. Each vertex goes 2 mm out from there, and the UVs follow arc length, so the letters aren’t stretched. Because it’s measured on the facets, it follows a faceted drum too.

A white cylindrical vat with black bands and a red stripe, with a black label with cyan border and the words JUICE INJECTOR following the curve of the drum.

The Juice Injector’s label laid on the drum, 2 mm off it.

What’s left?

The signs made by the world kit, the vat bay and the dungeon content aren’t on the kit yet, and a room’s state only affects the screw count and tilt for now. Both are on the work list. The test for the kit checks 36 things and they all pass. The work touched 23 files.

A grid of eight film frames. They show the men's room door before and after, a close plate with a white figure, a curved vat label, a lift sign and the plate in blue, pink and black.

Contact sheet of the film, ending with the same plate in the meat and cyberpunk looks.