Code Bank

A library of Unity script scaffolds for recreating and experimenting with videogame gestures. Each scaffold exposes the variables that matter for feel without requiring you to write code from scratch.

The goal: tune, don't code. You're learning to shape gestures, not learning to program. The scaffolds handle the engineering; you handle the design.

Multi-perspective support: Each scaffold includes variants for 2D, 3D Third-Person, 3D First-Person, and Isometric perspectives where applicable. All scripts use the same InputReader pattern for seamless gamepad and keyboard+mouse support.

Practice - what you do

How to Use

  1. Find the scaffold that matches the gesture you're recreating
  2. Drop it into Unity (drag the prefab or attach the script)
  3. Tune the exposed variables in the Inspector until it feels right
  4. Document what you changed and why - this is the learning

Every variable has a tooltip explaining what it does and what changing it affects.

Available Scaffolds

Setup & Foundations

Scaffold What it does Key components
Input Setup Unified input system for all perspectives InputReader, New Input System, device detection

Movement

Scaffold What it does Key variables
Basic Jump Single jump with tunable arc jumpForce, gravity, fallGravityMultiplier
Variable Jump Jump height based on button hold minJumpForce, maxJumpForce, holdTime
Double Jump Extra jump in mid-air extraJumps, airJumpForce, resetVelocity
Coyote Time Grace period after leaving ledge coyoteTime
Dash Burst movement with recovery dashSpeed, dashDuration, cooldown

Feedback & Feel

Scaffold What it does Key variables
Screen Shake Camera shake on impact intensity, duration, decay
Hitstop Freeze frame on hit hitstopDuration, timeScale
Squash & Stretch Deform sprite based on motion stretchAmount, squashAmount, returnSpeed
Knockback Push away on hit knockbackForce, knockbackUp, hitstunDuration

Timing & Input

Scaffold What it does Key variables
Input Buffer Remember inputs for grace window bufferTime

Scaffolds In Development

Future scaffolds will include:

  • Movement: Ground Movement, Air Control, Wall Jump
  • Feedback: Trail Effect, Landing Impact
  • Camera: Follow Camera, Camera Bounds, Focus Point
  • Timing: Cooldown Timer, Charge Mechanic
  • Combat: Melee Attack, Health System

Starting Points by Exercise

Gesture Recreation (Week 2)

Start with: Basic Jump
Add: Screen Shake for landing feedback

Heritage Translation (Week 3)

Start with: the scaffold closest to your source gesture
Modify: tune until it matches, then deliberately transform one variable set

The 30-Minute Action (Week 5)

Combine: Dash + Screen Shake
Constraint: only tune what's exposed, no new code

Feel Experiment (Week 7)

Pick any scaffold. Change one variable dramatically. Document:

  • What changed in the feel?
  • What didn't change that you expected to?
  • What does this tell you about how the components interact?

Related