72 Commits

Author SHA1 Message Date
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
Kacper Kostka (aider)
a5702a210f feat: Implement procedural terrain generation with hills, lakes, and vegetation 2025-04-04 12:05:41 +02:00
Kacper Kostka (aider)
3f4f8bc09c fix: Resolve duplicate identifier by renaming chunkY to floorChunkY 2025-04-04 12:00:26 +02:00
Kacper Kostka (aider)
9cdf7eba78 feat: Set default world position to 0,0 and extend floor to 2 chunks deep 2025-04-04 11:59:29 +02:00
Kacper Kostka (aider)
5ef436498f feat: Move default player position to Chunk: 0,-1 and adjust floor to bottom edge 2025-04-04 11:55:14 +02:00
Kacper Kostka (aider)
c858da4c3e feat: Add lava element with dynamic colors and interactions 2025-04-04 11:48:06 +02:00
Kacper Kostka (aider)
d6d874ab99 feat: Add fire simulation with color variation and flammable material restrictions 2025-04-04 11:42:17 +02:00
Kacper Kostka (aider)
0788b3067d feat: Increase tree and flower sizes for better visibility 2025-04-04 11:33:53 +02:00
Kacper Kostka (aider)
d8e868aad8 feat: Add various seeds that grow on dirt, including grass blades, flowers, and trees 2025-04-04 11:30:47 +02:00
Kacper Kostka (aider)
6ad564eea0 feat: Add new materials (dirt, stone, grass, wood) with unique behaviors 2025-04-04 11:24:14 +02:00
Kacper Kostka (aider)
a6f0baf02c fix: Resolve mouse drawing position tracking during world dragging 2025-04-04 11:19:14 +02:00
Kacper Kostka (aider)
7fe2e5e474 feat: Add cursor outline and improve debug mode mouse tracking 2025-04-04 11:13:19 +02:00
Kacper Kostka (aider)
ef2226b1d2 fix: Resolve drawing functionality and mouse tracking issues 2025-04-04 11:12:46 +02:00
Kacper Kostka (aider)
7f16ee7427 fix: Resolve drawing coordinate calculation and add debug mode 2025-04-04 11:10:38 +02:00
Kacper Kostka (aider)
eb9900478d feat: Add mouse-based world navigation with drag and touch support 2025-04-04 11:07:30 +02:00
Kacper Kostka (aider)
dbcf3a0e61 feat: Add floor and wall element to prevent infinite particle fall 2025-04-04 11:00:45 +02:00
Kacper Kostka (aider)
7c7d9b97fd feat: Create optimized pixel sand simulation with chunking system 2025-04-04 10:59:44 +02:00