Inspiration
The inspiration for this project came from combining classic game mechanics with modern cloud architecture. I wanted to create a simple yet engaging game that demonstrates the power of serverless computing and AWS services while providing a fun user experience. The number guessing game is a perfect example of how traditional games can be enhanced with cloud features like persistent scoring, real-time notifications, and global leaderboards
What it does
- The Number Guessing Game is a serverless application that:
- Generates a random number between 1-100
- Players try to guess the number
- Provides "higher" or "lower" hints after each guess
- Tracks number of attempts
- Maintains a leaderboard of best scores
- Sends notifications for exceptional performances (5 or fewer attempts)
- Stores all game data securely in the cloud
How I built it
Used AWS services to create a serverless architecture:
- Core AWS Services:
- AWS Lambda: Runs the game logic
- DynamoDB: Stores player scores
- API Gateway: Handles API requests
- SNS: Sends high score notifications
- CloudWatch: Monitors game metrics
Challenges I ran into:
JSON Serialization: DynamoDB returned Decimal types that wouldn't convert to JSON Fixed by creating a custom JSON encoder Game State: Had to track game progress between requests Solved by passing gameId and attempts in each request Error Handling: Needed to handle various AWS service errors Implemented try-catch blocks with proper error messages
Accomplishments that we're proud of
Created a practical teaching tool for AWS services
Implemented AWS best practices in a simple application
Built a scalable serverless architecture
Demonstrated efficient service integration
Created reusable code patterns for future projects
What we learned
Development Skills:
Streamlined service integration
Efficient error handling patterns
Clean code architecture
Documentation best practices
Problem Solving:
Simplified state management
Optimized service communication
Enhanced user experience
Efficient resource utilization
What's next for Number Guessing Game
- Add cost optimization
- Can be made Interactive game using a web framework, i mainly focused on backend
- Implement CI/CD pipeline
- Add monitoring dashboard
- Include AWS Well-Architected practices
- Create learning path documentation
Built With
- amazon-cloudwatch
- amazon-dynamodb
- amazon-q
- amazon-sns
- amazon-web-services
- apigateway
- lambda
- python
Log in or sign up for Devpost to join the conversation.