How yugt/membrane-ball works
Membrane Breakout 3D is a physics-based game with a browser demo and a separate Pygame prototype. In the browser workflow, the player opens the demo, moves the membrane and rotates the camera, and the game updates the ball, collisions, bricks, and visual feedback. The Python prototype implements a parallel simulation using its own physics module. Energy displays and numerical verification expose the coupled ball–membrane behavior. The excerpts show the core physics and portions of each game loop; some browser wiring and Python gameplay details are not fully sampled, so uncertain links are omitted.
Main entry points: game.js Game loop · index.html Demo page · game.py Pygame game loop · physics.py Membrane physics
Components 16
Browser game
- Demo page
game_web/index.html - Game loop
game_web/game.js - Membrane solver
game_web/game.js - Gameplay and collisions
game_web/game.js - 3D view and HUD
game_web/game.js - Bounce audio
game_web/game.js
Python prototype
- Pygame game loop
game_python/game.py - Membrane physics
game_python/physics.py - Energy display
game_python/game.py
Physics verification
- Energy verifier
verify_energy.py - Stage verifier
verify_physics_stage5.py - Prototype verifier
game_python/verify_physics.py
Other components
- Player
- Web browser
- Three.js CDN
- Python player
Connections 14
- Player → Web browser: opens demo
- Web browser → Demo page: loads
- Demo page → Game loop: loads game
- Player → Game loop: controls paddle
- Game loop → Membrane solver: updates physics
- Game loop → Gameplay and collisions: updates gameplay
- Game loop → 3D view and HUD: updates display
- Game loop → Bounce audio: plays bounces
- Demo page → Three.js CDN: loads dependency
- Python player → Pygame game loop: plays prototype
- Pygame game loop → Membrane physics: uses physics
- Pygame game loop → Energy display: updates display
- Energy verifier → Stage verifier
- Prototype verifier → Membrane physics: uses physics