Toy Update, Part 4

Abstract

Problem: How does a veteran game developer iterate on a hobby space game project, balancing community feedback with personal enjoyment?

Approach: Tim Cain walks through several nights' worth of changes to his toy space game, covering shield shader rework, target locking, camera systems, and an upgrade mechanic — all driven by viewer comments and late-night coding sessions.

Findings: Community feedback directly shaped the shield color gradient redesign. New features like camera photons and long-range scanning emerged from playful experimentation. The upgrade system draws from Vampire Survivors' randomized progression. Tim stops when hobby coding starts feeling like work.

Key insight: A personal rule for hobby projects: when it starts feeling like work, stop. The joy of hobby game dev comes from following inspiration — math at 3 AM is fine, but UI coding "does not spark joy."

Source: https://www.youtube.com/watch?v=YYSDWFfXzlg

1. Shield Gradient Rework

Tim read through viewer comments from the previous video and found conflicting opinions on the shield color gradient. The main changes:

  • Removed blue from the gradient — many people said it didn't belong
  • Reversed the color direction: dim red → orange → yellow → white (failure)
  • People had pointed out that red intuitively means "low energy," not "taking damage," so the reversal made more sense

He also wanted shields to fade over time after being hit, but discovered the fade wasn't working because of how his shader was structured.

1.1. The Shader Fix

The shield color was a 4-component vector (RGBA), but it piped into the fragment node as only a 3-component vector (RGB). The alpha channel was separate because the Fresnel effect controlled it — computing higher opacity near edges and transparency in the middle.

The fix: pipe the Fresnel output through a multiply node with a new exposed property called "Shield Alpha." This let the fade-over-time value multiply with the Fresnel alpha, giving proper control over shield transparency.

The result: shields now go from dim red to bright white as they take more damage, then fade out over time.

2. Target Lock System

Ships are hard to see when flying around debris and planets, so Tim added target locking:

  • Right-click locks onto the nearest ship to your cursor
  • The locked target gets HUD brackets drawn around it
  • Required projecting the ship's 3D position onto 2D screen space — math Tim enjoyed doing at 3 AM
  • Brackets disappear when the target goes behind you

3. Camera Photon

A new torpedo type called a "Camera Photon" — when fired, it attaches a camera to the projectile and pops up a small UI element showing what the photon sees as it flies.

This produced a funny bug: Tim forgot to check that only the player's photons should activate the camera. Every time an NPC fired at him, the camera would switch to the NPC's photon view — showing Tim's own ship getting hit from the enemy's perspective.

4. Long-Range Scan Camera

While experimenting with cameras, Tim added a long-range scanning interface:

  • A very distant trailing camera positioned far behind the player's ship
  • A giant green sphere (using the shield shader effect) around the player ship, visible only to this long-range camera
  • Provides a zoomed-out strategic view of the surrounding area

5. Rear View Camera

Tim also demonstrated a rear view (aft view) camera — toggling to a camera facing out the back of the ship with all HUD elements turned off. He noted that while he doesn't personally use it much, many space games include it.

6. Upgrade System (Vampire Survivors-Inspired)

The upgrade system works through cargo collection:

  • Picking up cargo pieces fills a cargo meter
  • When full, the game randomly selects a few upgrades from those the player is eligible for
  • You don't get to upgrade everything you want — the randomness represents not controlling what parts you pick up
  • Directly inspired by Vampire Survivors' randomized upgrade selection

7. On Hobby Projects and Motivation

Tim was candid about his relationship with the toy project:

  • He can do shader math at 3 AM without issue, but UI coding "does not spark joy" (quoting Marie Kondo)
  • He has a personal rule: when working on his toy game starts feeling like work, he stops
  • He acknowledged he might stop working on the toy for a while and wouldn't necessarily do weekly updates
  • Many UI improvements viewers requested (thinner line elements, transparency) remain undone because they feel like work rather than fun

This reflects a broader philosophy: hobby projects should be driven by inspiration and enjoyment, not obligation.

8. References