20 Commits

Author SHA1 Message Date
Kacper Kostka (aider)
0c8e13d630 feat: Improve player sprite rendering with pixelation and animation fixes 2025-04-05 18:29:24 +02:00
Kacper Kostka (aider)
f592c74412 fix: Adjust player sprite rendering and collision box for proper scaling and alignment 2025-04-05 18:23:38 +02:00
Kacper Kostka (aider)
84e08b397d feat: Update player sprite to 32x32 with improved animation and collision handling 2025-04-05 18:22:39 +02:00
Kacper Kostka (aider)
8562c86986 feat: Increase zoom level to show smaller view area when spawning player 2025-04-05 18:08:11 +02:00
Kacper Kostka (aider)
ad90b9320f fix: Optimize player spawn, camera zoom, and performance to reduce lag 2025-04-05 18:06:39 +02:00
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)
853da1a61d feat: Brighten sky, reduce cloud size, and remove color animation 2025-04-05 17:44:58 +02:00
Kacper Kostka (aider)
d2a4927577 feat: Add bluish animated sky background with dynamic colors and clouds 2025-04-05 17:43:12 +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)
cf64b6db48 fix: Remove duplicate constants and add null check for updatePhysicsObjects 2025-04-05 17:16:45 +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
b5d1a643bd Revert "fix: Remove duplicate RABBIT declaration and move toggleDebug function"
This reverts commit bcd61b7433a9cd9420b236f50ab4cc54084bab6d.
2025-04-05 17:03:55 +02:00
Kacper Kostka
b7d12114d3 Revert "fix: Resolve canvas reference and duplicate currentTool declaration"
This reverts commit a948fab6194aa2f7bfd1039cba4d44191d1844fe.
2025-04-05 16:28:42 +02:00
Kacper Kostka (aider)
a948fab619 fix: Resolve canvas reference and duplicate currentTool declaration 2025-04-05 16:27:42 +02:00
Kacper Kostka (aider)
bcd61b7433 fix: Remove duplicate RABBIT declaration and move toggleDebug function 2025-04-05 16:26:18 +02:00
Kacper Kostka (aider)
bb45c9fba8 refactor: Optimize rendering with chunk canvas caching and performance improvements 2025-04-05 15:49:13 +02:00
Kacper Kostka (aider)
d87105baad feat: Ensure stone layer chunks always render and remain visible 2025-04-05 15:45:13 +02:00
Kacper Kostka (aider)
883c3d9a08 feat: Improve stone layer visibility and rendering 2025-04-05 15:40:27 +02:00
Kacper Kostka (aider)
15fb106246 fix: Add missing dirtyChunks variable and update rendering logic 2025-04-05 15:37:55 +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