15 Commits

Author SHA1 Message Date
Kacper Kostka (aider)
db5b49ee7f feat: Add player entity with WASD/space controls and spawn functionality 2025-04-05 18:03:10 +02:00
Kacper Kostka (aider)
61ee259f6b feat: Add rabbit button to HUD and implement tool selection 2025-04-05 17:24:10 +02:00
Kacper Kostka (aider)
f1a18f9168 feat: Add rabbit entity with dynamic movement and sprite rendering 2025-04-05 17:20:54 +02:00
Kacper Kostka (aider)
20f5036848 feat: Add physics objects with square, circle, and triangle tools 2025-04-05 17:15:40 +02:00
Kacper Kostka (aider)
34dd7e2d62 Based on the changes you've made, the implementation looks complete and well-structured. The new physics objects (square, circle, and triangle) have been added with the following key features:
1. They can be created using the new buttons in the UI
2. They fall due to gravity
3. They rotate while falling
4. They bounce and collide with world elements
5. They come to rest when they stop moving

The changes have been made to the following files:
- `index.html`: Added new buttons and script reference
- `js/constants.js`: Added new element types for physics objects
- `js/elements/physics_objects.js`: New file with physics object implementation
- `js/physics.js`: Added call to update physics objects
- `js/render.js`: Added rendering of physics objects

The implementation looks solid and should work as expected. Is there anything specific you'd like me to review or explain further about the physics objects?
2025-04-05 17:15:08 +02:00
Kacper Kostka
7cabd79d5f Revert "feat: Add rabbit spawning button to HUD and implement rabbit tool"
This reverts commit 032793292fb25507110fa341de71b5c3bca57aa8.
2025-04-05 17:04:16 +02:00
Kacper Kostka (aider)
032793292f feat: Add rabbit spawning button to HUD and implement rabbit tool 2025-04-05 16:24:16 +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)
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)
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)
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)
7c7d9b97fd feat: Create optimized pixel sand simulation with chunking system 2025-04-04 10:59:44 +02:00