Technologies Used
CrazyDelivery: Game and Hardware Integration
Project Overview
CrazyDelivery is a unique embedded systems project that combines hardware design, firmware programming, and game development. The project features a custom-built game controller with sensors and buttons, interfaced with a 2D delivery game developed using Qt/QML framework.
Project Type: Embedded Systems + Game Development
Duration: 2025
Team Size: 5 Members
Status: Completed and Demonstrated
Key Features
Game Features
- 2D Top-Down Gameplay: Navigate through city streets to deliver packages
- Physics Engine: Realistic vehicle movement and collision detection
- Dynamic Obstacles: Traffic, pedestrians, and time challenges
- Score System: Points based on speed, accuracy, and safety
- Multiple Levels: Progressive difficulty with different city layouts
- Real-Time Feedback: Visual and audio cues for player actions
Hardware Features
- Custom PCB Design: Professional 4-layer PCB designed in Altium Designer
- Accelerometer Control: Tilt-based steering mechanism
- Physical Buttons: Gas, brake, and special action buttons
- LED Indicators: Visual feedback for game state
- Buzzer: Audio alerts for collisions and achievements
- USB Interface: Reliable serial communication with game
System Architecture
The project consists of two main components working together:
Hardware Components
- Microcontroller: Arduino Mega 2560
- Sensors: MPU6050 (Accelerometer + Gyroscope), Push Buttons, Potentiometer
- Outputs: RGB LEDs, Piezo Buzzer, Status Display (OLED)
- Power Management: 5V Regulator, Battery Connector, USB Power
- Communication: USB Serial (115200 baud)
Software Components
- Game Engine: Built with Qt/QML
- Physics System: Collision detection and realistic movement
- Input Handler: Serial port manager and controller parser
- Game Logic: Level manager, score system, AI traffic
- Arduino Firmware: Sensor reading, data processing, serial protocol
Technical Highlights
PCB Design Process
Design Specifications:
- 4-layer PCB for better signal integrity
- Dimensions: 150mm x 100mm
- Component placement optimized for ergonomics
- Separate power and ground planes
- ESD protection on USB interface
Altium Designer Workflow:
- Schematic capture with component selection
- Footprint creation for custom components
- PCB layout with design rule checks
- 3D visualization for mechanical fit
- Gerber file generation for manufacturing
Arduino Firmware Development
The firmware handles sensor reading, data processing, and serial communication. Key features include:
- Sensor fusion for smooth steering control
- Complementary filter combining accelerometer and gyroscope
- Calibration routine on startup
- Moving average filter for noise reduction
- Robust packet protocol with checksums
Game Engine (Qt/QML)
The game engine implements:
- Real-time physics simulation
- Collision detection system
- Vehicle dynamics (acceleration, friction, steering)
- Serial communication handler
- Game state management
Challenges and Solutions
Challenge: Sensor Noise and Drift
Problem: Raw accelerometer data was noisy and drifted over time.
Solution:
- Implemented complementary filter combining accelerometer and gyroscope
- Added calibration routine on startup
- Applied moving average filter for smoothing
- Result: Stable, responsive steering control
Challenge: Serial Communication Reliability
Problem: Packet loss and corruption during high-speed gameplay.
Solution:
- Designed robust packet protocol with checksums
- Implemented circular buffer for data handling
- Added packet acknowledgment system
- Result: 99.8% packet success rate
Challenge: PCB Manufacturing Issues
Problem: First prototype had cold solder joints and trace breaks.
Solution:
- Increased trace width for power lines
- Added test points for debugging
- Improved component spacing
- Used professional PCB assembly service
- Result: Fully functional second revision
Challenge: Game Performance
Problem: Frame rate drops during complex collision detection.
Solution:
- Implemented spatial partitioning (quad-tree)
- Optimized rendering with sprite batching
- Used Qt's hardware acceleration
- Result: Consistent 60 FPS gameplay
Gameplay Mechanics
Controls
- Tilt Left/Right: Steer the delivery vehicle
- Button (Green): Accelerate
- Button (Red): Brake
- Button (Blue): Horn (clear pedestrians)
- Button (Yellow): Special boost (limited uses)
Objectives
- Deliver packages to marked locations
- Avoid traffic and obstacles
- Complete deliveries within time limit
- Maintain vehicle health
- Achieve high scores
Difficulty Progression
- Level 1: Tutorial with simple routes
- Levels 2-3: Increased traffic density
- Levels 4-5: Time pressure and complex navigation
- Level 6+: Night mode with reduced visibility
Results and Impact
Project Outcomes
- Fully functional game controller with custom PCB
- Engaging 2D game with 8 playable levels
- Smooth integration between hardware and software
- Successful demonstration at university showcase
- Grade: A+ (95/100)
Technical Achievements
- Designed and manufactured professional PCB
- Implemented real-time embedded system
- Developed complete game engine from scratch
- Achieved low-latency (less than 10ms) input response
- Created robust serial communication protocol
Skills Developed
- Hardware Design: PCB layout, component selection, manufacturing process
- Embedded Programming: Arduino, sensor interfacing, real-time systems
- Game Development: Physics engines, collision detection, game loops
- C++ Mastery: Qt framework, object-oriented design, memory management
- System Integration: Hardware-software interface, protocol design
What I Learned
Embedded Systems
- PCB design principles and best practices
- Sensor fusion and signal processing
- Real-time constraints and timing analysis
- Hardware debugging techniques
Software Engineering
- Qt/QML framework for cross-platform development
- Game engine architecture and design patterns
- Performance optimization techniques
- Serial communication protocols
Project Management
- Team collaboration and task distribution
- Iterative development and testing
- Documentation and version control
- Presentation and demonstration skills
Future Enhancements
Potential improvements for the project:
- Wireless Bluetooth controller
- Haptic feedback (vibration motors)
- Multiplayer mode with multiple controllers
- Advanced AI for traffic simulation
- Mobile version of the game
- VR integration for immersive experience
Conclusion
CrazyDelivery stands out as one of my most comprehensive projects, combining hardware engineering with software development. The experience of designing a PCB from scratch, programming embedded firmware, and creating a complete game engine provided invaluable hands-on learning.
This project demonstrates my ability to work across the full stack of embedded systems development, from low-level hardware to high-level application software. It also showcases my problem-solving skills in integrating diverse technologies into a cohesive, functional product.
Key Takeaway: The intersection of hardware and software creates unique challenges and opportunities. Success requires understanding both domains deeply and designing robust interfaces between them.
This project was developed as part of the Embedded Systems course at Université de Sherbrooke and received recognition at the annual engineering showcase.