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

  1. Created a practical teaching tool for AWS services

  2. Implemented AWS best practices in a simple application

  3. Built a scalable serverless architecture

  4. Demonstrated efficient service integration

  5. 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
Share this project:

Updates

Submission history