A Kotlin Multiplatform project showcasing terrain generation using Perlin Noise and Fractal Brownian Motion algorithms.
Mobile View | Desktop View |
---|---|
- Interactive Parameter Adjustment: Manipulate grid size, amplitude, frequency, and octaves to see how they affect terrain formation.
- Perlin Noise and Fractal Brownian Motion: Experience use of procedural generation algorithms in terrain generation.
- Cross-Platform Compatibility: Run the demo on Android, Linux, Windows, and MacOS.
- Image Export: Save the generated terrain as an image to your device.
- Kotlin Multiplatform
- Jetpack Compose
- Perlin Noise Algorithm
- Fractal Brownian Motion Algorithm
Prerequisites:
- Android Studio (for Android development)
- JDK (for desktop development)
Installation:
- Clone this repository:
git clone https://github.com/kotlinc0der/terrain-generator.git
- Open the project in Android Studio.
- Build and run the project on your desired platform.
Usage:
- Launch the application.
- Use the sliders to adjust the parameters:
- Grid Size: Controls the resolution of the terrain.
- Amplitude: Affects the height variation of the terrain.
- Frequency: Determines the level of detail in the terrain.
- Octaves: Adds layers of detail to the terrain using Fractal Brownian Motion.
- Click the "Generate Terrain" button to create a new terrain based on the current parameters.
- Click the "Save Image" button to export the generated terrain as an image.
- iOS Support: Extend the project to support iOS devices.
- Additional Algorithms: Implement other terrain generation algorithms for greater variety.
Contributions are welcome! Feel free to open issues or submit pull requests.