Skip to content

Samples ​

The Quantum Forge Unity package includes several sample projects demonstrating different aspects of quantum mechanics in games. Install them from the Unity Package Manager window.

Actions ​

Demonstrates the full catalog of quantum operations available in Quantum Forge.

What you'll learn:

  • How to apply Hadamard, Cycle, Shift, Clock, and other gates
  • Using the ProbabilityTracker to visualize state changes
  • Wiring quantum actions to UI buttons via Unity Events
  • Fractional gates for partial rotations

Platformer ​

A simple platformer that uses quantum mechanics for level design.

What you'll learn:

  • QuantumProperty on GameObjects for quantum platforms
  • Measurement to determine platform states
  • Entanglement between platforms: stepping on one affects another
  • Integrating quantum state with physics (Rigidbody)

Roshambo ​

A quantum version of rock-paper-scissors using a 3-element Basis.

What you'll learn:

  • Creating a custom Basis with named values (rock, paper, scissors)
  • Superposition across 3 states (not just 2)
  • Player-controlled measurement timing
  • Quantum advantage: the ability to "be all three at once" until measured

Installing Samples ​

  1. Open the Package Manager (Window > Package Manager)
  2. Select Quantum Forge from the list
  3. Expand the Samples section
  4. Click Import next to the sample you want

Samples are copied to Assets/Samples/Quantum Forge/{version}/.

Building Your Own ​

Use the samples as starting points. The key pattern for any quantum game in Unity:

  1. Define a Basis: what states can your quantum objects have?
  2. Add QuantumProperty: attach to any GameObject
  3. Choose your gates: which operations make sense for your gameplay?
  4. Add Trackers: visualize the quantum state for debugging and UI
  5. Measure at dramatic moments: measurement is the "reveal", so save it for impact

See Advanced Topics for entanglement patterns and performance tips.

Powered by Quantum Forge