Skip to content

Feat: Implement Spline-Based Terrain Generation - #46

Draft
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
feature/spline-terrain-generation
Draft

Feat: Implement Spline-Based Terrain Generation#46
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
feature/spline-terrain-generation

Conversation

@google-labs-jules

Copy link
Copy Markdown

This commit refactors the terrain generation system to create smooth, free-flowing hills instead of the previous block-based 'staircase' terrain.

Key changes:

  • Replaced the grid-based floor generation in createFloor with a new system that generates a Phaser.Curves.Spline object to define the terrain's surface.
  • Modified LevelGenerator to consume the spline and create a 'physics chain' of thin, invisible rectangular colliders that approximate the curve for physics interactions.
  • Updated GameScene to render the spline using a Graphics object, providing a smooth visual representation of the hills that matches the new collision surface.
  • Adjusted player spawn logic and structure placement to work with the new spline-based coordinate system.
  • Updated and fixed all relevant Jest tests and mocks to support the new implementation, including updating snapshots.

PR created automatically by Jules for task 4791065621946237862

This commit refactors the terrain generation system to create smooth, free-flowing hills instead of the previous block-based 'staircase' terrain.

Key changes:
- Replaced the grid-based floor generation in `createFloor` with a new system that generates a `Phaser.Curves.Spline` object to define the terrain's surface.
- Modified `LevelGenerator` to consume the spline and create a 'physics chain' of thin, invisible rectangular colliders that approximate the curve for physics interactions.
- Updated `GameScene` to render the spline using a `Graphics` object, providing a smooth visual representation of the hills that matches the new collision surface.
- Adjusted player spawn logic and structure placement to work with the new spline-based coordinate system.
- Updated and fixed all relevant Jest tests and mocks to support the new implementation, including updating snapshots.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll acknowledge your comments with a 👀 emoji and then get to work. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

I will automatically address your feedback. For any comments you don't want me to act on, just include (aside).



For security, I will only act on instructions from the user who triggered this task for this pull request.

@vercel

vercel Bot commented Sep 16, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
disastersword Ready Ready Preview Comment Sep 16, 2025 3:16am

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.

0 participants