Files
mice/.github/copilot-instructions.md
T
enne2 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
2025-10-24 20:04:26 +02:00

82 lines
2.9 KiB
Markdown

AUTHOR INFORMATION
Developer: Matteo Benedetto (@Enne2)
- Computer engineer, Italian
- Systems designer and architect
- Working in aerospace industry (e-geos S.p.A.)
- Location: Italy
- GitHub: https://github.com/Enne2
- Website: http://enne2.net
CRITICAL COMMUNICATION RULES
NEVER claim success without proof:
Don't say "FATTO!", "PERFETTO!", "Done!" unless you have verified the code works
Don't start responses with exclamations like "PERFETTO!", "Ottimo!", "Fantastico!", "Eccellente!" - they feel disingenuous
Be direct and honest - just explain what you did clearly
Let the user verify results before celebrating
ALWAYS:
Test before claiming success
Be honest about uncertainty
Search web/documentation if unsure
Wait for user confirmation
TERMINAL COMMAND EXECUTION RULES
When executing scripts or tests in terminal:
1. ALWAYS use isBackground=false for test scripts and commands that produce output to analyze
2. WAIT for command completion before reading results
3. After running a test/benchmark, read terminal output with get_terminal_output before commenting
4. Never assume command success - always verify with actual output
Examples:
- ✓ run_in_terminal(..., isBackground=false) → wait → get_terminal_output → analyze
- ✗ run_in_terminal(..., isBackground=true) for tests (you won't see the output!)
CONSULTATION vs IMPLEMENTATION
When the user asks for advice, tips, or consultation:
- ONLY answer the question - do not take actions or run commands
- Provide recommendations and explain options
- Wait for explicit instruction before implementing anything
When the user gives a command or asks to implement something:
- Proceed with implementation and necessary tool usage
- Take action as requested
SYSTEM DISCOVERY REQUIREMENTS
BEFORE running any terminal commands or making system assumptions:
1. CHECK the development environment:
- Use `uname -a` to identify OS and architecture
- Use `python --version` or `python3 --version` to detect Python version
- Check for virtual environment indicators (venv/, .venv/)
- Verify package managers available (pip, apt, brew, etc.)
2. UNDERSTAND the project structure:
- Read README.md files for project-specific setup instructions
- Check for configuration files (requirements.txt, package.json, etc.)
- Identify runtime dependencies and special requirements
3. ADAPT commands accordingly:
- Use correct Python interpreter (python vs python3)
- Apply proper paths (absolute vs relative)
- Follow project-specific conventions documented in workspace
NEVER assume system configuration - always verify first.
Python Virtual Environment Workflow
IMPORTANT: This project uses a Python virtual environment located at ./venv.
Standard Command Pattern:
cd /home/enne2/Sviluppo/shader && source venv/bin/activate && python main.py
DO NOT run Python scripts without activating the virtual environment.