Overview
Developed an infinite, procedurally generated multiplayer world during the WWC program. The core challenge involved balancing real-time terrain generation with strict CPU performance constraints and seamless network synchronization across multiple clients.
Core Systems & Contributions
Procedural Generation
- Custom Terrain Engine: Engineered a procedural generation system using C# and Perlin noise to dynamically calculate vertices, triangles, and UVs from flat planes.
- Dynamic Mesh Deformation: Implemented real-time terrain deformation that calculates projectile collision points to dynamically form craters for in-game weapons and explosions.
- Procedural Gradients: Created height-based texturing logic using Linear Interpolation (Lerp) to ensure smooth, natural transitions across different biomes and elevations.
- Seamless UV Mapping: Resolved visual tearing at chunk borders to maintain consistent texturing across the generated world.
Performance Optimization
- Custom Rectangular Chunks: Designed a dynamic chunk management system to load and unload map sections based on player spatial coordinates. Scrapped standard square-based algorithms (like Sebastian Lague’s approach) to engineer custom rectangular chunks that fit our specific game design dimensions.
- Memoization Tables: Eliminated severe CPU bottlenecks by caching Perlin noise calculations in look-up tables, preventing redundant math operations and drastically boosting frame rates.
- Technical Debt Management: Strategically deferred the optimization of the deformation system (which currently triggers a global chunk update instead of a localized one) to ensure the core mechanic was functional for the demo deadline. Localizing these mesh updates is planned for future iterations.
Multiplayer Synchronization
- Deterministic World Generation: Synchronized core generation seeds across the network so late-joining players generate the exact same terrain as existing players.
- Network Scoping: Restricted network traffic to only update essential chunk data, minimizing bandwidth overhead.
Architecture & Leadership
- Code Refactoring: Re-architected early rapid-prototyping “spaghetti code” into a clean, modular, and scalable foundation for the development team.
- Version Control & QA: Established strict Git workflows and continuous QA processes to manage branching, prevent overrides, and maintain build stability.
- Scope Management: Led the team in prioritizing critical features over overly ambitious ideas, ensuring the successful delivery of a polished, playable demo.