Sliding puzzle in curved space
Play in browser: https://bntre.github.io/Sfera/
Also available on itch.io (.apk and .exe builds): https://bntr.itch.io/sfera
Gameplay demo: https://www.youtube.com/watch?v=TtxH5m7hSvU
This game was written in 2017, mostly at night during parental leave.
It was also my first attempt to write something performance-critical in C# and GPU shaders.
The game uses non-Euclidean 3D space with constant positive curvature (roughly: elliptic geometry / projective 3-space).
The puzzle board has no boundaries - space closes in on itself. Opposite points are identified, so every tile appears twice.
Tiles have small rounded notches aligned with fixed spheres in the solved state.
There are 3 levels. Each level contains 3 missions. Completing 2 missions unlocks the next level.
Windows and Android builds contain sound.
Puzzle states are mapped to harmony in Just Intonation: https://en.wikipedia.org/wiki/Just_intonation
The solved state has the most consonant sound. Every other state produces its own unique harmonic tension.
The original idea was that people with very good pitch perception might solve the puzzle by ear :)
Each level is built on a 2D surface (currently sphere or torus) embedded into curved 3D space.
The surface is divided into tetragonal cells holding the tiles. Cells are additionally subdivided to support smooth sliding motion.
A custom 4D Catmull-Clark subdivision implementation was written for this: https://assetstore.unity.com/packages/tools/modeling/catmull-clark-mesh-subdivision-95479
Tile geometry is computed in the vertex shader (HLSL). Subdivision coordinates are passed into shaders through vertex textures.
The curved space shader was later reimplemented in GLSL: https://github.com/bntre/CurvedSpaceShader




