AWS Logo
Menu
Building Hack-tic-tac: A Python Knowledge Game

Building Hack-tic-tac: A Python Knowledge Game

Discover how I Built Hack-Tac-Toe using React, Phaser, AWS S3, CloudFront, and Amazon Q Developer for the AWS Game Builder Challenge.

Published Dec 23, 2024
Last Modified Dec 26, 2024

Game Overview

When I joined the AWS Game Builder Challenge, I wanted to create a project that combined fun and learning in a unique way. The result was Hack-tic-tac, a Python-powered twist on Tic-Tac-Toe. Instead of just making moves on the grid, players must demonstrate their Python knowledge to progress.
This project allowed me to explore how AWS services can simplify game hosting and deployment, making development smoother and faster.

Game Concept and Mechanics

The Concept

Hack-tic-tac combines the timeless appeal of Tic-Tac-Toe with Python quizzes. Players test their Python understanding by answering multiple-choice questions to earn their moves.

Gameplay Mechanics

  • Players compete against a computer opponent with basic AI.
  • Each turn begins with a Python-related question.
  • A correct answer earns the player their move; incorrect answers result in a hint that helps them learn the concept better and direct thyem to the correct answer.
  • Topics range from Beginner Python syntax to Advanced-level concepts.
  • The game ends when a player achieves three in a row or the grid is full.

Key Features

  • An interactive and responsive UI powered by Phaser.
  • Python questions designed to test understanding across various levels of difficulty.
  • Optimized hosting for smooth and fast gameplay.

AWS Services Used

AWS Amplify

Amplify simplified the CI/CD process, enabling seamless deployment from GitHub. This allowed for rapid iteration and ensured the game was always up-to-date during development.

Amazon S3 and CloudFront

S3 provided reliable storage for the game’s static assets, while CloudFront delivered content with minimal latency, ensuring a seamless user experience.

Amazon Q Developer

Provided valuable development assistance, helping me overcome initial knowledge gaps in React.js and Phaser. This tool played a key role in optimizing workflows and expediting development.

Development Journey

Challenges Faced

  1. Maintaining Engagement:
    Balancing the educational aspect with the fun gameplay required careful design of the questions and mechanics.
  2. AWS Configurations:
    Setting up S3 and CloudFront with the right permissions and ensuring the Amplify pipeline worked flawlessly took some trial and error.
  3. Learning New Tools:
    Having to learn React and Phaser while simultaneously developing the game was a significant challenge, but it ultimately enhanced my technical skills.
  4. User Experience Design:
    Ensuring a smooth user interface and intuitive gameplay mechanics was a process of trial and error, requiring frequent tweaks and testing.

Lessons Learned

  • Efficiency in Development: Breaking down the project into achievable milestones helped ensure progress .
  • The Power of AWS: Amplify and CloudFront proved invaluable for hosting and deploying the game efficiently.
  • Balancing Complexity: Designing engaging gameplay mechanics while ensuring they remained approachable taught me a lot about simplicity and user experience.
  • Continuous Learning: I had to learn React and Phaser prior to development, which was a challenging but rewarding experience that expanded my skills.
  • Leveraging Amazon Q Developer:
    Amazon Q Developer proved invaluable in streamlining the development process. Its ability to automatically suggest solutions, provide optimized code snippets, and troubleshoot common errors significantly accelerated my progress. For someone with no prior experience in React and Phaser, Q Developer acted as a knowledgeable assistant, helping bridge the gap and enabling me to focus on game design and mechanics without getting stuck on technical roadblocks.

Accomplishments That We're Proud Of

  1. Fully Functional Game Development:
    Successfully designed and developed a complete game within the hackathon's tight timeline, integrating engaging challenges and smooth mechanics.
  2. Learning New Skills:
    Despite having no prior knowledge of React.js and Phaser, I managed to learn and apply these technologies effectively, creating a fully functional and polished game.
  3. AWS Service Integration:
    Seamlessly hosted the game using AWS S3, CloudFront, and Amplify, ensuring scalability, low latency, and a professional deployment setup.
  4. Intuitive Gameplay Design:
    Designed challenges that effectively test players' understanding of Python concepts while maintaining an engaging and fun user experience.
  5. Streamlined Development with Amazon Q Developer:
    Leveraged Amazon Q Developer to accelerate development and optimize solutions, overcoming hurdles efficiently without previous experience in some key technologies.

What’s Next for Hack-tic-tac

Hack-tic-tac is just the beginning! Here’s what’s planned:
  • Dynamic Questions: Implementing a question pool for greater variety.
  • Smarter AI: Enhancing the computer opponent for a more competitive game.
  • Multiplayer Mode: Allowing players to challenge friends online.
  • Mobile Optimization: Making the game fully responsive for mobile devices.

HOW IT WORKS :

MAIN PAGE
  • The player will first see instructions then choose to start the game
  • The players will choose the level of difficulty between beginner to Advanced
GAME
  • Once they have chosen they will choose the colour between orange and blue
  • Then they will be able to see the grid
  • They will make the first move then the computer will then make a move
CHALLENGE
  • They will then get a challenge to solve to unlock the next move
  • If the answer is incorrect they will get a hint to help them understand the concept better
  • If correct they will then make another move
  • The pattern continues until either The player or computer have 3 blocks either diagonal, vertical or horizontal Matching.
  • If no one wins then it is a draw

Get Involved

Your feedback and suggestions are welcome to help shape the game’s future development.
Let’s connect on AWS Community and discuss how to create engaging games using AWS services.

Thank you for reading and happy gaming!
 

Comments