lantern

oculus-arcade

πŸ•ΉοΈ Oculus Arcade

State machine games powered by virtual fence tables

The Vision

These games serve multiple purposes:

  • Stress test virtual fence API - Tables as game boards with real-time cell manipulation
  • Prep for clouds layer - State machines that will animate when reactive streaming is ready
  • Prove the pattern - If we can run games, we can run dashboards, workflows, anything

All games follow the same pattern:

  • State stored in YAML fence (game config, scores, current turn)
  • Board is a markdown table with floating label
  • Actions are labeled Python fences that peek state, execute on board, poke new state

Games Roster

πŸͺΏ Goose Pong

πŸͺΏ Goose Pong

[COMPLETE] - Two geese, one disco ball, random chaos

β†’ South to goose-pong

Uses virtual fence tables for the board, YAML fence for state, Python fences for game logic. Demonstrates:

  • peek() / poke() for state management
  • execute() with get_cell / poke_cell actions on tables
  • Floating labels (<!-- [board] -->) for table addressing

🏐 Disco Volleyball

[PLANNED] - Artillery 64 meets beach vibes

Concept:

  • 20x20 grid (or similar) representing a volleyball court with net in middle
  • Two teams on opposite sides
  • Players input angle and power for their shot
  • Ball follows parabolic trajectory: y = x*tan(ΞΈ) - (g*xΒ²)/(2*vΒ²*cosΒ²(ΞΈ))
  • Ball lands where trajectory intersects ground (or net!)
  • If it lands in opponent's court β†’ point!
  • If it hits net or goes out β†’ fault

State Machine:

SERVE β†’ FLIGHT β†’ LAND β†’ CHECK_SCORE β†’ SWITCH_SIDES β†’ SERVE
                   ↓
              HIT_NET β†’ FAULT β†’ SWITCH_SIDES

Grid Layout:

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | N | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  • Numbers = distance from net (N)
  • Rows = height zones
  • Track ball position as it arcs

Why it's interesting:

  • Actual math! Players solve angle + power β†’ landing spot
  • Could show trajectory preview
  • Net adds obstacle detection
  • Perfect for clouds animation (ball flying across grid)

🧱 Tetris

[IDEA] - Classic block stacking

Concept:

  • 10-wide, 20-tall grid
  • Falling pieces rendered as emoji blocks
  • rotate, left, right, drop actions
  • Line clear detection

Challenge:

  • Gravity timing would need clouds layer for animation
  • Without animation: turn-based Tetris (still fun puzzle)

🎹 Simon Says

🎹 Simon Says

[COMPLETE] - Memory pattern game with event-driven UI

β†’ South to simon-game

The OG virtual fence proof of concept! Features:

  • Custom simon fence type with dedicated provider
  • Full state machine: waiting β†’ start β†’ showing β†’ input β†’ success/failure
  • Event vocabulary for frontend animation (show, hide, confirm, failure, level_up)
  • Execute actions: start, press, reset
  • Optimistic UI with next_expected for instant feedback

This is the model for how clouds layer should work - backend returns events, frontend just plays them.

🐍 Snake

[IDEA] - Classic snake game

Concept:

  • Grid with snake 🐍 segments
  • Food spawns randomly 🍎
  • up, down, left, right actions
  • Snake grows on eating
  • Collision = game over

State: Head position, body segments array, food position, score


Technical Notes

The dependent types connection: Lean has dependent type systems. Our workflows are dependent type systems - each step's output types flow downstream, and you can look upstream to know what you're working with. If we ever need to mathematically prove workflow correctness (not just test it), Lean's type system maps naturally to that problem.

Lean 4 Integration (Future Experiment)

Lean 4 is a theorem prover + functional programming language having a moment in 2025:

  • AlphaProof (DeepMind) reaching IMO medal-level math proofs
  • Harmonic AI ($100M) building "hallucination-free" AI with Lean verification
  • Amazon using it for automated reasoning at scale

Potential arcade applications:

  • lean fence provider - verify game logic is mathematically sound
  • State machine proofs - prove Simon/volleyball can't reach invalid states
  • Pre-execution verification - prove Python fence properties before running

Why it fits the vision: If clouds layer ever needs to guarantee state machine invariants ("this workflow can never deadlock"), Lean could prove that at design time, not runtime.

LLM generates code β†’ Lean proves it correct β†’ execute with confidence.

Overkill for games, but interesting for infrastructure safety.

Table Size Limits

Testing needed:

  • How large can tables get before rendering slows?
  • 20x20 = 400 cells - should be fine
  • 50x50 = 2500 cells - might be chunky

Animation Prep

Each game should have:

  • game-state.yaml - Full state machine state
  • board labeled table - Visual representation
  • tick or step action - Advance one frame
  • Clear state transitions - For clouds to hook into

When clouds layer lands, we add:

  • animate: true flag in state
  • Streaming updates push board changes
  • Front-end renders in real-time

πŸ•ΉοΈ INSERT COIN TO CONTINUE πŸ•ΉοΈ

West

slots:
- context:
  - Linking goose-pong to arcade hub
  slug: goose-pong

South

slots:
- context:
  - Linking existing Simon game to arcade hub
  slug: simon-game
- context:
  - Linking Goose Pong as child of arcade
  slug: goose-pong

Simon Says

Goose Pong

↓ southsimon-gamegoose-pong
← westgoose-pong