This is a submission for the Alibaba Cloud Challenge: Build a Web Game.*
What I Built
RoboSorter is an educational web game that combines environmental awareness with fast-paced gameplay. Players take control of recycling robots who must quickly sort falling waste items into the correct recycling bins before they hit the ground. As levels progress, AI-powered robots join your workforce, helping with sorting but also introducing the challenge of managing a growing robot team.
The game features multiple robot characters with unique abilities and sorting specialties. As players advance, they unlock new robots and face increasingly challenging waste streams requiring careful resource management and strategic decision-making.
Demo
Play RoboSorter here: https://robosorter-game.alibabacloud.com
Alibaba Cloud Services Implementation
I strategically implemented several Alibaba Cloud services to create a robust and scalable game infrastructure:
Elastic Compute Service (ECS)
- Why I chose it: ECS provided a reliable, scalable hosting solution for my game server with excellent performance.
- How I used it: I deployed a lightweight Node.js server on an ECS instance (Burstable t6 instance) to handle real-time game sessions, player authentications, and leaderboard functionality.
-
Benefits:
- Quick scaling during high-traffic periods
- Built-in monitoring tools for performance tracking
- Simple deployment using Alibaba Cloud CLI
-
Challenges:
- Initial configuration required learning about security groups and networking
- Needed to optimize the Node.js server for resource efficiency
Object Storage Service (OSS)
- Why I chose it: All game assets including images, sounds, and level data needed reliable, fast delivery to players worldwide.
-
How I used it:
- Created a dedicated bucket for game assets
- Organized assets in folders by type (graphics, audio, config)
- Set appropriate access controls for public read access
-
Benefits:
- Extremely fast asset loading with minimal latency
- Cost-effective storage solution
- Easy versioning for game updates
-
Challenges:
- Needed to implement proper CORS configuration for browser compatibility
Content Delivery Network (CDN)
- Why I chose it: To ensure smooth gameplay experiences for users regardless of location.
-
How I used it:
- Connected the OSS bucket to Alibaba Cloud CDN
- Set up proper cache rules for different asset types
- Implemented HTML5 preloading for critical assets
-
Benefits:
- Significantly reduced loading times worldwide
- Lower bandwidth costs from the origin server
- Better handling of traffic spikes
-
Challenges:
- Needed to carefully manage cache expiration for updated assets
ApsaraDB for RDS
- Why I chose it: A reliable database was needed for player profiles, high scores, and game statistics.
-
How I used it:
- Set up a MySQL instance for storing persistent game data
- Created optimized tables for leaderboards and player progress
- Implemented connection pooling for efficiency
-
Benefits:
- Automated backups for data safety
- High performance for leaderboard queries
- Easy scaling as the player base grows
-
Challenges:
- Required careful database design to balance performance and cost
Platform for AI (PAI)
- Why I chose it: To implement a unique game feature where AI robots learn from player behavior.
-
How I used it:
- Created a simple machine learning model that learns optimal sorting strategies
- Used player data to train AI assistants that help with sorting
- Integrated the AI via API calls from the game client
-
Benefits:
- Created a unique gameplay mechanic where robots seem to learn
- Added depth to the game progression system
- Provided a technical showcase of Alibaba Cloud's AI capabilities
-
Challenges:
- Balancing AI complexity with real-time performance
- Designing a model that could work with limited training data
Game Development Highlights
Robot Character System
I created a diverse cast of robot characters, each with unique abilities and personalities:
- SortBot: The basic starter robot that handles general sorting
- SpeedBot: Moves quickly but has limited carrying capacity
- HeavyBot: Slow but can handle multiple items at once
- AnalyzerBot: Can identify hard-to-classify materials
- LeaderBot: Boosts efficiency of nearby robots
The robots were designed with distinct visual styles and animations that reflect their personalities and functions. Players develop strategies around which robots to deploy based on the mix of waste items in each level.
Educational Value
Beyond just being fun, RoboSorter teaches players about proper recycling practices. Each material has specific handling requirements, and the game includes brief facts about recycling when new materials are introduced. This subtle educational component adds depth to the game while promoting environmental awareness.
Responsive Controls
I implemented adaptive controls that work seamlessly across devices:
- On desktop: Keyboard controls with optional mouse support
- On mobile: Intuitive touch controls with gesture recognition
- On tablets: A hybrid system taking advantage of the larger screen
The interface automatically adjusts based on the detected device, ensuring all players have an optimal experience.
Progressive Web App (PWA)
RoboSorter is built as a PWA, allowing players to install it on their devices and play offline. This enhances accessibility while reducing data usage for players with limited connectivity.
Dynamic Audio System
The game features a procedurally generated soundtrack that adapts to gameplay intensity. As levels progress and more robots join, the music becomes more complex and energetic, enhancing the sense of progression.
This project challenged me to learn about Alibaba Cloud services while creating an engaging, educational game experience. The combination of cloud infrastructure and creative game design resulted in a project I'm proud to submit for this challenge. I look forward to continued development and potentially adding multiplayer functionality in the future.