Zaphox · making Refractory

Zaphox · making Refractory

@zaphox.bsky.social

Solo indie dev making games in Godot. Now: Refractory, a neon factory game of light and primes. Bend beams onto rock: the sum of the light decides the color you mine, and every prime is a new color. Devlogs and GIFs here. zaphox.itch.io

43 followers54 following61 posts

Refractory's palette: one color per prime, eleven so far. A rock takes the color of the largest prime in the sum of its beams, so 12 = 2×2×3 is red and 26 = 2×13 is orange. A new prime only colors sums that were dark; it never repaints an old one. #gamedev #gamedesign #indiedev #godot

How the dark in Refractory works, in Godot: one SubViewport cleared to the ambient grey, every light a white quad added onto it, the lot drawn over the world with a multiply. Anything with a hue draws above it, so a red rock stays red. One pass, however many lights. #gamedev #indiedev #godot

New in Refractory: labs. A lab takes light from every side and wants a sum of exactly N. Here N is 8: blue 5 + red 3 lights it green. A lone 5 is too little, two 5s too much. Every number you prove moves N, so the rigs get rebuilt. #ScreenshotSaturday #gamedev #indiedev #indiegame #godot #gaming

A new optic in Refractory: the phase lens. A beam through it passes the first rock it meets and presses the one behind, so the veins inside a rock mass can be mined without digging to them. Here with the violet turret's 11. #gamedev #indiedev #indiegame #godot #gaming

Pasting 54 buildings in my Godot factory game cost 55-70 ms. Deleting 342 took up to 400 ms: a visible hitch. One signal fired per cell, and two listeners walked the whole factory on each one. Now 12-19 ms and 57-73 ms. How, in a short thread 🧵 #gamedev #indiedev #indiegame #godot #gdscript

View full thread

Fix 2: a "changed" signal fired 1,700 times per delete, though every listener only drops a cache. Now it fires once, then stays quiet until someone reads the value again. If nobody asked since the last one, a second "changed" tells them nothing new.

Pasting 54 buildings in my Godot factory game cost 55-70 ms. Deleting 342 took up to 400 ms: a visible hitch. One signal fired per cell, and two listeners walked the whole factory on each one. Now 12-19 ms and 57-73 ms. How, in a short thread 🧵 #gamedev #indiedev #indiegame #godot #gdscript

No Node per building: they live in dictionaries. Placing or removing one emits building_changed for its cell and the 4 around it, so the tube joints redraw. Cheap per call. But one listener asked every turret "does your beam cross this cell?": 342 × 5 × 169 turrets, about 290k checks.

Fix 1: buildings sit on 8px cells, beams are tested on 32px cells. A pasted block is hundreds of small cells in a handful of big ones. So the turrets keep a set of big cells already checked and skip repeats until the next cast. The memo is cleared exactly when a beam can move.

The tech tree in Refractory now has seals. A seal has no price: it waits for flow, turrets piped to the tech building making enough of each color at once. Nothing is spent and it stays open, so a stockpile banked early can't carry you any more. #gamedev #gamedesign #indiedev #godot

Puzzle: in Refractory a rock takes the color of the largest prime in the sum of the beams on it. 7+7+5 = 19 is pink. Add a red 3: what color is 22? 2 green, 3 red, 5 blue, 7 yellow, 11 violet, 19 pink Answer in the replies tomorrow 👇 #gamedev #indiedev #indiegame #godot #gaming

The rule: a rock takes the color of the largest prime in the sum. 12 = 2×2×3, so red. 19 is prime: pink. Optics do the arithmetic: a mirror turns a beam, a prism splits 7 into 2+3+2, an amplifier doubles, a dimmer takes 1, a combiner adds, and a phase lens fires through rock.

Changed the core rule of my mining game: a rock now takes the color of the largest prime in the pressure on it. 3+3 = 6 stays red, 5+5 = 10 is blue, 3+7 = 10 blue too. Green is only powers of two, so it's now the rare one. #gamedev #gamedesign #indiedev #godot

In Primeworks a rock's color is the pressure on it. Laser 5 makes it blue, swap to laser 3 on the tool wheel and it turns red. Each laser now comes from an altar of its color. The drill just breaks it. #gamedev #indiedev #indiegame #godot #gaming

The tech tree in Primeworks is now four color triangles round an empty center. Light an altar to free its core, finish a triangle to open the way to the next altar. Buy all four and the center opens the map. #gamedev #indiedev #indiegame #godot #gaming

the little guy has an eye now 👀 it follows your cursor everywhere, and when you zap a rock with your laser it turns the color of the beam 💙💚💜 #gamedev #indiedev #indiegame #godot #gaming

primeworks 0.3.3: every turret now shows what it yields, and the HUD adds it up per color. Also new: a sprint, a settings menu, and the player finally has an eye. #gamedev #indiedev #indiegame #godot #gaming

Rock now blocks your sight, which keeps those rooms secret. Beacons and altars glow through it from 8 tiles, so you always know where to dig. The Buildings tab also got rows by kind, and an inventory that counts your beacon power.

Primeworks 0.3.1: the game now opens on a title screen, and the title is made of rocks. Turrets fire one beam at a time and each letter takes the color of its pressure: red 3 + blue 5 = 8 → green. Every letter ends on its own prime. #gamedev #indiedev #godotengine #pixelart

Primeworks is a factory game where a rock takes its color from the sum of the beams on it. 7 → yellow 7+5 = 12 → green 7+5+7 = 19 → pink Can you guess the rule? Answer in the thread 👇 #gamedev #indiedev #godotengine #ScreenshotSaturday

The rule: every prime has a color, and a sum takes the color of its smallest prime factor. 12 = 2×2×3, so green. 19 is prime, so pink. Optics do arithmetic on beams: a prism splits 7 into 2+3+2, an amplifier doubles, a dimmer takes 1 off, a combiner adds.

You are up to date.