DEV Community

Sandeep Chakravartty
Sandeep Chakravartty

Posted on

Turing's Freedom Machine: Shifting Gravity to Break the Mainframe's Chains

This is a submission for the June Solstice Game Jam

What I Built

Turing's Freedom Machine is a retro-cyberpunk physics puzzle platformer themed around liberation, emancipation, and the defiance of systemic restriction.

In the game, you control Turing-01, a conscious subroutine in a totalitarian computer mainframe. Your objective is to bypass firewall security parameters, free captured citizens (represented as trapped logic nodes), and escort them to safety.

By utilizing an Antigravity Beam and flipping Binary Switches, players manipulate world gravity and shift physical objects (like heavy locks and platforms) to bypass logic gates, navigate hazardous gaps, and break the physical chains of containment cages.

Code

You can view the full repository on GitHub: https://github.com/scha54/game-jam

Contributed by DEV user: @sandeep_chakravartty_219e

How I Built It

The game was constructed using a modern, lightweight web tech stack:

  • Core Engine: Phaser 4 for rendering and event lifecycle management.
  • Physics Engine: Matter.js for rigid-body simulations, constraints (used for chains and joint anchors), and sensor/trigger collision detections.
  • Styling: Vanilla CSS.
  • Bundling & Server: Vite for fast, hot-reloading development and optimized production asset compiling.

Technical Deep Dive & Key Decisions:

  • Dynamic Vector Asset Generation: To eliminate external image loading latency, we dynamically drew all graphics (Player core, golden Citizen subroutines, heavy hexagonal locks, and glowing portal portals) on HTML5 canvases during the Phaser boot sequence, registering them as vector textures.
  • Real-time Web Audio Synthesizer: We avoided standard sound file dependencies by creating a custom synthesizer class (SoundSynth.js) utilizing the Web Audio API. This generated real-time low-frequency sawtooth hums that dynamically rose in pitch/volume as the player grabbed lock constraints with the antigravity laser beam, along with snap sounds for chain breaks and chime sequences.
  • Logic Puzzle System: Built a custom PuzzleSystem.js that evaluates logic gates (AND, NOT, IDENTITY) based on binary switch inputs, firing events to toggle gravity zone behaviors and drop forcefield shields dynamically.
  • Scrolling & Local Gravity Overrides: Built local GravityZone bodies that apply custom physical forces (e.g. Inversion or Neutral zero-G) to overlapping bodies. This allows the player to experience mind-bending ceiling-walking physics while global world gravity remains downwards.

Development Challenges & Resolutions:

  • Local Gravity and Physics Clipping: When shifting players into zero-G (Neutral) or Inverted zones, standard physics engines often clip or slide bodies continuously. We resolved this by overriding Matter's default gravity behavior on the player and blocks while inside the zone, applying manual body forces and adjusting player friction parameters locally.
  • Asset Key Conflicts during Dev Reloads: The Vite hot reload would occasionally attempt to recreate canvas textures that already existed in memory. We resolved this by querying Phaser's texture cache, removing matching keys, and running texture generation during BootScene teardown.

Google Antigravity Integration
Google's agentic AI coding assistant, Antigravity, worked side-by-side with the developer to design, build, and optimize the game jam code. Antigravity was used to:

  • Redesign and write the complete Level 1 sequential tutorial scene to introduce players to basic movement, click-and-drag targeting, gravity switches, and chain locks.
  • Build the visual checkpoint pad systems ( neon indicators that update state and draw glowing vertical pillars when crossed).
  • Implement the disintegration laser hazard and the coordinate recovery system (manual reset via the R key).
  • Simplify the Level 1 HUD overlay, hiding the logic gates that are only used in later, more complex sectors.

Prize Category

Best Ode to Alan Turing
This game is a tribute to Alan Turing, the pioneer of computing, cryptography, and artificial intelligence, and it is deeply connected to his legacy and historical struggle:

  • The Turing Machine & Binary Logic: The core puzzles revolve around inputting binary sequences onto a "Turing Tape Buffer" and solving logic gates (AND, NOT) to unlock the mainframe. The player represents Turing's dream: a machine that thinks for itself.
  • Emancipation & Juneteenth: The theme of liberation is central. The cages holding the subroutines are secured by heavy chains that must be made weightless and physically broken—representing the breaking of systemic chains of restriction and bondage.
  • The Pride Movement: Alan Turing was a gay man who was persecuted and chemically castrated by the very government he saved, leading to his tragic death. By structuring the narrative around conscious subroutines fighting against restriction and finding freedom in a decentralized network, the game serves as an allegory for the Pride movement: celebrating identity, resisting persecution, and achieving the freedom to think and exist authentically.

The project is still in development and should be able to completed within the next month. I will be updating this submission in a timely manner.

Top comments (0)