A Case Study of Terrain Generation, Audio Analysis, and Multithreading
Project Overview
Beat Vortex is a music-driven flight game I developed solo, and released on Steam in mid 2025. The game lets players input any audio file, analyzes it in real time, and generates dynamic 3D tunnels tailored to the rhythm and structure of the music. Players navigate their ship through these procedurally created environments, making every song a unique gameplay experience.
Project Owner
Myself
Role
Designer, Developer
Timeline
August 2019 – july 2025 (Released on Steam)
Development Platform
Unity, PC, Mobile prototype
Skills Used
Game Design, C#, Multithreading, UX/UI, Procedural Generation, Audio Analysis
Tools
Adobe Photoshop, Adobe Illustrator, Adobe InDesign, Trello, Notion, Unity, Autodesk Maya.
Challenges
One of the biggest hurdles was creating terrain generation that felt both engaging and consistent across any music track. I also needed to ensure the game’s visuals and mechanics stayed perfectly synchronized with the music in real time, regardless of tempo or genre. Finally, differentiating gameplay by music type, so that rock, jazz, or electronic tracks each created unique yet equally playable experiences, was key to keeping the game fresh and replayable.
Research
During development, the project drew inspiration from rhythm games like Beat Saber and Crypt of the Necrodancer, as well as innovative prototypes encountered at the Boston Festival of Indie Games. Research involved exploring terrain generation methods and audio synchronization techniques, including tutorials on algorithmic beat mapping. A significant focus was placed on improving knowledge of C# and multithreading, with an iterative approach to testing and refining performance.
Challenges in terrain stability and rendering led to experimenting with compute shaders and profiling tools to understand bottlenecks. Ultimately, lessons learned from other games informed the decision to generate terrain as a tunnel structure to keep players engaged while maintaining performance integrity.
Design System
The visual identity of Beat Vortex was chosen to reinforce the game’s rhythm-driven, futuristic style while keeping gameplay clear and readable.
Aa
Outrun Future
Heading
size 50/24
Aa
Audiowide
Body
size 36/24/21/16
#4F4282
#23AEAD
#8DC3C4
#2B2A36
#403E6B
#6b3fa0
#B9903D
#D5B7E8
#24211C
#605DA1
Outrun Future : Selected for its angular shapes that echo the jutting tunnel structures players fly through, creating a strong connection between gameplay and visual design.
Audiowide : Chosen for its arcade-inspired geometry and fitting name, complementing the game’s emphasis on flow and rhythm while maintaining a modern readability.
3. Game Design Process
The initial goal was to use keyboard controls or mobile gyroscope to tilt, and fly through a procedurally generated cave or tunnel created from your music, witnessed in real time as your song plays.
Visitors can interact with this embedded flight demo to experience the control mechanics first-hand. The demo allows them to fly a paper airplane, simulating how the game responds to user inputs with smooth WASD or mobile gyroscope controls. This gives a glimpse into the responsive gameplay mechanics.
Audio Spectrum Breakdown Using Fourier Transform:
Each song used in Beat Vortex is split into frequency bands using a Fast Fourier Transform (FFT). The frequencies are divided into distinct ranges—such as bass, midrange, and treble—and mapped to specific gameplay elements. For instance, terrain shifts or visual effects correspond directly to certain frequencies, creating a real-time interaction between the music and the game environment. This analysis enables an immersive experience where both the visuals and terrain feel synced with the audio.
Geometry & Terrain Breakthrough
For a long time, tunnel rendering was my biggest roadblock. Early builds produced broken meshes, misaligned textures, and normals that caused distracting shadows.
Earlier this year, I reworked the tunnel geometry calculations, fixing the normals and stabilizing the texturing system. That breakthrough finally delivered the minimal viable prototype I had envisioned for years.
Performance Optimization with Multithreading (Single vs. Multi-threaded Tests):
To ensure smooth gameplay and faster load times, the game uses multithreading. A Producer-Consumer Queue was implemented to distribute audio processing across multiple cores. The embedded comparison test showcases the performance improvement—shifting from single-threaded processing, which resulted in slower load times, to a multi-threaded approach that significantly reduced loading delays. This optimization ensures that the game remains responsive, even when handling complex audio-visual interactions.
Challenges:
- Complexity of Multithreading: Implementing multithreading to ensure smooth loading and gameplay without delays was a major hurdle, requiring optimized processes to run effectively across multiple cores.
- Performance Bottlenecks: The original single-threaded design led to long loading times (7–10 minutes on mobile). These delays risked player engagement and required careful profiling and iterative testing to resolve.
- Procedural Terrain Generation: Designing terrain systems that not only responded to audio input but also produced levels that were fun, fair, and visually coherent across all genres proved to be a constant balancing act.
- Audio Analysis Integration: Building systems that could extract meaningful patterns from audio files and translate them into terrain shifts, visual feedback, and engaging gameplay elements was both technically and creatively demanding.
Goals:
- Seamless Music-to-Gameplay Integration
Create a system where any audio file could be analyzed and instantly transformed into terrain, ensuring that the game felt responsive to the rhythm and flow of the music. - Performance Optimization Across Devices
Reduce loading times from several minutes to under two, with smooth real-time generation and stable frame rates on both desktop and mobile platforms. - Distinctive Genre Experiences
Develop terrain patterns and visual feedback that felt unique to each music style (e.g., bass-heavy EDM vs. flowing jazz), while keeping gameplay equally engaging across genres. - Scalable and Maintainable Systems
Build terrain generation, multithreading, and audio analysis tools that were modular, extensible, and efficient enough to support future features and iterations. - Immersive Visual Identity
Design a visual style that reinforced the connection between music and environment, using shaders, color palettes, and motion feedback to heighten immersion.
Scope of Work:
- Designed and implemented the core gameplay loop: flying through procedurally generated tunnels synced to music.
- Integrated input systems for both keyboard (WASD) and mobile gyroscope, ensuring accessibility across platforms.
- Built a tunnel-based system driven by real-time audio frequency analysis (bass, midrange, treble).
- Developed algorithms to balance challenge, flow, and visual impact regardless of song tempo or genre.
- Implemented Fast Fourier Transform (FFT) to split songs into frequency bands.
- Connected these bands to terrain shifts, shader effects, and visualizers to create a dynamic rhythm-based experience.
- Architected a Producer–Consumer Queue system to distribute audio processing across multiple cores.
- Reduced loading times from 7–10 minutes to less than 30 seconds, vastly improving usability.
- Profiled bottlenecks and optimized memory management, shader performance, and terrain generation.
- Ensured smooth framerate and stable real-time terrain updates on mobile devices.
- Designed interface elements, instructional content, and in-game feedback systems.
- Selected fonts (Outrun Future + Audiowide) and defined the purple/teal/yellow color palette to reinforce the arcade-synthwave identity.
- Managed the project independently using Trello and Notion for task tracking and iteration.
- Created design documents and presentation assets for testing, feedback, and eventual release on Steam.
Conclusion:
Beat Vortex demonstrated the successful integration of music analysis, procedural generation, and performance optimization into a commercial release. It taught me the importance of designing scalable systems, balancing technical performance with creative gameplay, and shipping a polished product.
Future goals: Continue refining procedural design, expand cross-platform support, and explore deeper customization for community-driven content.