13 Commits

Author SHA1 Message Date
Kacper Kostka (aider)
eab3a9b790 refactor: Remove floor generation for second chunk at world bottom 2025-04-05 15:12:10 +02:00
Kacper Kostka (aider)
d5f46d94c3 feat: Add stone layer beneath terrain generation 2025-04-05 15:08:40 +02:00
Kacper Kostka (aider)
ec7f8f9522 feat: Spawn tree seeds 3 pixels above surface for better growth 2025-04-05 15:06:49 +02:00
Kacper Kostka (aider)
0b96238226 feat: Implement minimum 5-pixel spacing for tree seed generation 2025-04-05 15:05:51 +02:00
Kacper Kostka (aider)
170b8d0a85 refactor: Reduce tree seed generation frequency and spacing 2025-04-05 15:03:57 +02:00
Kacper Kostka (aider)
4716cbe692 feat: Add natural tree and flower seed generation on grass terrain 2025-04-05 15:02:59 +02:00
Kacper Kostka (aider)
1584600d0b feat: Enhance grass generation with more coverage and variety 2025-04-05 15:00:12 +02:00
Kacper Kostka (aider)
7806b39a51 feat: Enhance terrain generation with more grass and water variety 2025-04-05 14:57:01 +02:00
Kacper Kostka (aider)
076f21f9ca feat: Enhance terrain generation with noisy sand and dynamic grass coverage 2025-04-05 14:54:17 +02:00
Kacper Kostka (aider)
a31f401378 feat: Enhance terrain generation with dynamic chunk spreading and seeded randomness 2025-04-05 14:53:15 +02:00
Kacper Kostka (aider)
c35f6cd448 feat: Add procedural generation for first chunk with sand hills, water, and grass 2025-04-05 14:50:47 +02:00
Kacper Kostka (aider)
8ef18f52ab feat: Add color variations for natural elements and dynamic water colors 2025-04-04 12:22:15 +02:00
Kacper Kostka (aider)
a86acfff3a refactor: Spread game code into modular files for better maintainability
This commit reorganizes the game's source code into multiple files within a `js/` directory, creating a more modular and maintainable structure. The changes include:

- Created separate files for different game components:
  - `constants.js`: Game constants and element types
  - `world.js`: World management functions
  - `terrain.js`: Terrain generation logic
  - `physics.js`: Physics simulation
  - `render.js`: Rendering functions
  - `input.js`: Input handling
  - `main.js`: Main game initialization and loop
  - Element-specific files in `js/elements/`:
    - `basic.js`: Sand, water, dirt behaviors
    - `plants.js`: Grass, seeds, flowers
    - `trees.js`: Tree growth and leaf generation
    - `fire.js`: Fire and lava behaviors

- Updated `index.html` to load modules in the correct order
- Removed the monolithic `script.js`

The modular approach improves code readability, makes future extensions easier, and separates concerns more effectively.
2025-04-04 12:15:30 +02:00