Skip to content

feat: Add Procedural Terrain Generator - #11000

Open
Yogender-verma wants to merge 1 commit into
dhairyagothi:Mainfrom
Yogender-verma:a7
Open

Yogender-verma wants to merge 1 commit into
dhairyagothi:Mainfrom
Yogender-verma:a7

Conversation

@Yogender-verma

Copy link
Copy Markdown
Contributor

📝 Pull Request Description

Related Issue

Closes #10988

Summary

Added a new advanced HTML/CSS/JS project: Procedural Terrain Generator. This multi-page application serves as a robust introduction to procedural generation. It utilizes a custom vanilla JavaScript implementation of Simplex Noise to generate infinite 2D island terrains. Users can manipulate complex mathematical parameters (Scale, Octaves, Persistence, Lacunarity) via UI sliders and watch the engine render the biome color map instantly to an HTML5 Canvas.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New project addition
  • 🚀 New feature or UI/UX enhancement
  • ♻️ Code refactoring / clean-up
  • 📝 Documentation update
  • ⚙️ GitHub Workflow automation or DX improvements

🛠️ Changes Made

  • Created a new project folder: Added ./public/Procedural_Terrain_Generator/.
  • Multi-Page Dashboard Architecture: Built index.html (Landing & Mathematics Tutorial), generator.html (Main Canvas Workspace), and settings.html (Biome Color Configuration).
  • Custom Noise Engine (script.js):
    • Implemented a fast 2D Simplex Noise algorithm from scratch to generate the foundational smooth gradients.
    • Added a seeded Pseudo-Random Number Generator (Mulberry32) so users can type string Seeds (e.g., "HelloWorld") to generate reproducible worlds.
  • Fractal Brownian Motion (fBm): Layered multiple octaves of noise based on user-controlled Persistence and Lacunarity variables to generate realistic, jagged details over the smooth hills.
  • Island Falloff Mapping: Applied a circular gradient falloff equation to the final heightmap to force the edges of the canvas to be deep ocean, ensuring the generated terrain always forms an island.
  • High-Performance Canvas Rendering: Iterated directly over a raw ImageData Uint8ClampedArray pixel buffer to set RGBA values, allowing instant generation of 360,000 pixels without lag.
  • Updated Manifest: Appended the project metadata to projects.json (Project Update style.css #252).

🧪 Testing and Verification

Local Validation

  • I have run node scripts/validateProjects.js locally and it passed with zero errors.

Browser Compatibility Check

  • Tested and verified in Google Chrome
  • Tested and verified in Mozilla Firefox
  • Tested and verified in Safari / Microsoft Edge

Responsive & Accessibility Checks

  • Verified responsive layout on Mobile viewports (using DevTools)
  • Verified responsive layout on Tablet viewports
  • Keyboard navigation and focus outlines checked
  • Semantic HTML and ARIA labels checked

🤝 Contributor Checklist

  • My code follows the code style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation / README files accordingly.
  • My changes generate no new warnings or console errors.
  • There are no unrelated changes or formatter noise in this PR.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@Yogender-verma is attempting to deploy a commit to the Dhairya Gothi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@dhairyagothi dhairyagothi added gssoc:approved Approved by admin level:advanced Advanced difficulty task type:refactor Refactoring/improvement labels Aug 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved by admin level:advanced Advanced difficulty task type:refactor Refactoring/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Procedural Terrain Generator

2 participants