Commit Graph

124 Commits

Author SHA1 Message Date
enne2 2e2c5bbdf6 feat: add LPC-style rat assets, sprite generation scripts, and grid extraction tools 2026-06-27 16:29:46 +02:00
enne2 5f2d09fef4 Fix rat animations and restore map tiles 2026-06-27 15:15:56 +02:00
John Doe bdf5a8d474 Add new start animation asset for game launch 2026-05-22 18:58:09 +02:00
John Doe ac80210ba5 Add guide button to quit game in start menu keybindings 2026-05-09 13:32:57 +02:00
John Doe d9d7a4ac82 Update keybindings and enhance loading screen functionality
- Refactor keybindings for gas spawning across multiple configurations
- Implement new loading screen updates during game initialization
- Add tests to ensure all weapon actions are exposed in keybinding profiles
- Introduce new assets for explosion effects
2026-05-09 13:29:32 +02:00
John Doe 310dc0dca9 Add DAT finale flow, editor, and new soundtrack assets 2026-05-09 12:03:17 +02:00
John Doe f0d056e7f0 Make muOS launcher prefer local venv 2026-05-08 19:45:25 +02:00
John Doe d32d2cd79c Refine start menu difficulty and preview workflow 2026-05-08 18:26:55 +02:00
John Doe f1770b218c Add animated start menu and level music config 2026-05-07 23:18:39 +02:00
John Doe 2367f4fb1c Add menu audio controls and menu music 2026-05-07 20:35:15 +02:00
John Doe a908b50019 Add looping gameplay music 2026-05-07 20:03:20 +02:00
John Doe 5233294b26 Detect muOS board for keybindings 2026-05-07 19:38:05 +02:00
John Doe 486fea38e7 Implement game controller support and add keybindings for gamepad input 2026-05-07 17:50:07 +02:00
John Doe 9421d8d47c Remove 'kill_rat' keybinding from game controls for cleaner input mapping 2026-05-07 17:49:52 +02:00
John Doe 509b3433b8 Refactor rendering logic in MiceMaze and Rat classes for improved clarity and efficiency 2026-04-14 12:15:16 +02:00
John Doe bbafc3bbba Add new PNG assets for Rat character and environmental elements 2026-04-14 11:35:57 +02:00
John Doe b243cf04d3 Add explosion stage 1 PNG assets for all directions
- Added BMP_1_EXPLOSION_DOWN.png to original and preview directories.
- Added BMP_1_EXPLOSION_LEFT.png to original and preview directories.
- Added BMP_1_EXPLOSION_RIGHT.png to original and preview directories.
- Added BMP_1_EXPLOSION_UP.png to original and preview directories.

These assets are part of the explosion animation for the game, enhancing visual effects during gameplay.
2026-04-14 11:24:16 +02:00
John Doe eaafd92dc2 Enhance asset loading by removing unnecessary surface parameter and adding texture variants for grass and flowers 2026-03-28 16:53:22 +01:00
John Doe b60ffd87aa Refactor code structure for improved readability and maintainability 2026-03-28 16:05:08 +01:00
John Doe 02202e4d3d Add new PNG images for clean and preview outputs
- Added `image_clean.png` to the output directory for the clean image representation.
- Added `image_clean_preview.png` for the preview of the clean image.
- Introduced `image_svg_clean.png` for the SVG clean image representation.
2026-03-27 23:40:27 +01:00
John Doe e7c5ebb119 Add Miniforge environment definition 2026-03-27 22:44:58 +01:00
John Doe 9a86a3734f Add comprehensive NumPy tutorial for optimizing collision detection system 2025-10-24 23:07:57 +02:00
John Doe b4224ed3a1 v1.1: Performance optimizations and bug fixes
Major improvements:
- NumPy-based collision system supporting 200+ units (~3ms/frame)
- Spatial hashing with vectorized distance calculations
- 4-pass game loop ensuring correct collision timing
- Blood overlay system with pre-generated stain pool
- Cached render positions and viewport bounds
- Spawn protection preventing rats spawning on weapons

Bug fixes:
- Fixed bombs not killing rats (collision system timing)
- Fixed gas not affecting rats (collision system timing)
- Fixed rats spawning on weapons (added has_weapon_at check)
- Fixed AttributeError with Gas collisions (added isinstance check)
- Fixed blood stain transparency (RGBA + SDL_BLENDMODE_BLEND)
- Reduced point lifetime from 200 to 90 frames (~1.5s)
- Blood layer now clears on game restart

Technical changes:
- Added engine/collision_system.py with CollisionLayer enum
- Updated all units to use collision layers
- Pre-allocate NumPy arrays with capacity management
- Hybrid collision approach (<10 simple, ≥10 vectorized)
- Python 3.13 compatibility
v1.1
2025-10-24 20:04:26 +02:00
John Doe 12836dd2d2 Implement optimized collision detection system using NumPy
- Introduced a hybrid collision detection approach that utilizes NumPy for vectorized operations, improving performance for games with many entities (200+).
- Added a spatial grid for efficient lookups and AABB (Axis-Aligned Bounding Box) collision detection.
- Implemented a new `CollisionSystem` class with methods for registering units, checking collisions, and managing spatial data.
- Created performance tests to benchmark the new collision system against the old O(n²) method, demonstrating significant speed improvements.
- Updated existing code to integrate the new collision detection system and ensure compatibility with game logic.
2025-10-24 19:13:30 +02:00
Matteo Benedetto 47028c95ae Implement main menu, profile list, and profile stats screens; add screen manager and user profile integration 2025-08-24 22:13:00 +02:00
Matteo Benedetto c004edef8f Update asset loading to include transparent color and adjust white flash timing; enhance nuclear bomb scoring and gas unit die method 2025-08-21 19:00:32 +02:00
Matteo Benedetto 59258258c4 Update API URL in UserProfileIntegration constructor 2025-08-21 18:31:09 +02:00
Matteo Benedetto 79369a1dd8 nice 2025-08-21 18:22:39 +02:00
Matteo Benedetto cbb60a19d9 Implement Score API Client and User Profile Integration
- Added ScoreAPIClient for communication with the Mice Game Score API, including methods for user signup, score submission, and leaderboard retrieval.
- Developed a simple profile manager demo to showcase user profile management and API integration.
- Created a test script for the Score API to validate all endpoints and functionality.
- Introduced UserProfileIntegration to manage user profiles, including local storage and API synchronization.
- Added a JSON file for user profiles with sample data for testing and demonstration purposes.
2025-08-21 17:02:41 +02:00
Matteo Benedetto 265af1832d Fix unit position retrieval in Rat class to use correct game state 2025-08-20 16:57:58 +02:00
Matteo Benedetto 17e5abc7df Final 2.0 2025-08-20 16:43:16 +02:00
Matteo Benedetto 0141063baa Add keybindings configuration in JSON and YAML formats; remove obsolete YAML file 2025-08-20 00:48:27 +02:00
Matteo Benedetto 8451ac7913 Refactor keybindings configuration and remove obsolete JSON files 2025-08-19 23:21:37 +02:00
Matteo Benedetto 1269913275 Refactor key handling and add keybindings configuration for game actions 2025-08-19 18:59:06 +02:00
Matteo Benedetto 4099b6f72e Add joystick hat motion handling in KeyLogger 2025-08-19 16:37:04 +02:00
Matteo Benedetto 302d454783 Enhance joystick handling in KeyLogger by adding button release and axis motion events 2025-08-19 16:30:52 +02:00
Matteo Benedetto 3fa678507c Fix window display by enabling window show and presenting the renderer in GameWindow 2025-08-19 16:23:06 +02:00
Matteo Benedetto 5e0f375948 Fix joystick initialization and update button press handling in KeyLogger 2025-08-19 16:19:59 +02:00
Matteo Benedetto f5b910a305 Add joystick button press handling and update message display in KeyLogger 2025-08-19 16:08:31 +02:00
Matteo Benedetto 947d464afd Fix window display initialization in KeyLogger and MiceMaze 2025-08-19 16:04:38 +02:00
Matteo Benedetto 0468b216c0 Display event type in KeyLogger during key events 2025-08-19 15:55:55 +02:00
Matteo Benedetto 06c5c84b06 Initialize SDL2 with joystick, video, and audio options in KeyLogger 2025-08-19 15:45:28 +02:00
Matteo Benedetto 9bc6f161d2 Refactor KeyLogger to use a single FontManager instance for rendering text 2025-08-19 13:29:36 +02:00
Matteo Benedetto 3c5307c0ef Enhance KeyLogger to display key press/release messages on the window 2025-08-19 13:25:12 +02:00
Matteo Benedetto 1ea8db735f Refactor KeyTester to KeyLogger for improved key event logging and SDL2 integration 2025-08-19 13:09:10 +02:00
Matteo Benedetto 79eb8c2de6 Log keycodes to a file on key press events 2025-08-19 12:34:06 +02:00
Matteo Benedetto 30c592e138 Add KeyTester class for key press and release handling 2025-08-18 23:25:17 +02:00
Matteo Benedetto 3bd2d9269f Add Mice! game and associated tools
- Created gameinfo.xml for the Mice! game, detailing its description, release date, developer, and genre.
- Added mice.sh script to activate the conda environment and run the game.
- Implemented colorize_assets.py as a placeholder for future asset colorization functionality.
- Developed convert_audio.py to convert audio files to 8-bit unsigned format at 22100 Hz.
- Introduced maze.py for generating mazes using Depth First Search (DFS) with a graphical interface.
- Created resize_assets.py to resize PNG assets to 18x18 pixels and center them on a 20x20 canvas.
2025-08-18 00:20:40 +02:00
Matteo Benedetto 8a32aad877 OK 2025-08-17 18:49:07 +02:00
Matteo Benedetto a910c8f74a Fix spawn_mine keybinding: change second key from "Control_R" to 2 for consistency 2025-08-14 17:41:23 +02:00