Skip to content

feat: add procedural map generation example with MapBuilder library#20

Open
cryptochris8 wants to merge 1 commit intohytopiagg:mainfrom
cryptochris8:examples/procedural-map-generation
Open

feat: add procedural map generation example with MapBuilder library#20
cryptochris8 wants to merge 1 commit intohytopiagg:mainfrom
cryptochris8:examples/procedural-map-generation

Conversation

@cryptochris8
Copy link
Copy Markdown

Summary

Adds a complete procedural map generation example demonstrating how to create voxel maps programmatically using a reusable MapBuilder library.

Includes:

  • MapBuilder library with building primitives: fillBox, fillCircle, buildWall, buildStairs, buildPillar, buildHollowBox, and more
  • Block texture registry with 181+ validated texture URIs from @hytopia.com/assets
  • Sumo Arena generator — circular geometry, tiered amphitheater seating, water moat, pagoda, domed roof
  • Floating Islands generator — terrain profiling, procedural trees, ore deposits, bridges, waterfalls
  • Server entry point that loads generated maps by environment variable
  • README with full API documentation and tutorial for creating custom generators

Based on the MapTopia project. The MapBuilder library eliminates boilerplate when creating procedural maps and validates textures at build time to prevent client crashes from invalid URIs.

Test plan

  • Run npm install && npm run build:sumo — generates outputs/sumo-arena.json
  • Run npm run build:islands — generates outputs/floating-islands.json
  • Run npm run dev:sumo — server starts and loads sumo arena map
  • Verify MapBuilder texture validation warns on unknown texture URIs
  • Follow README tutorial to create a custom generator

🤖 Generated with Claude Code

Adds a complete procedural map generation example demonstrating how to
create voxel maps programmatically for Hytopia games.

Includes:
- MapBuilder library with building primitives (fillBox, fillCircle,
  buildWall, buildStairs, buildPillar, buildHollowBox, etc.)
- Block texture registry with 181+ validated texture URIs
- Sumo Arena generator (circular geometry, tiered seating, domed roof)
- Floating Islands generator (terrain profiling, trees, bridges, ores)
- Server entry point that loads generated maps by name
- README with API documentation and tutorial

Based on the MapTopia project (github.com/chrisreeves/MapTopia).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant