Inspiration

I have always loved games - not just playing it, but how do people make it . Back in my early teens , I saw games in movies and wanted to make one but i has always been a though . But now in the second semester of college, coding is unavoidable. I started to code but i was kind of boring and overwhelming it times to only get text or numbers as output after long long of coding and debugging . I wanted something that actually shows something. That's when i decided to finally build a game and this hackathon gave me a push.

What it does

XO Game is a simple tic-tac-toe game built using Python and Pygame. It lets two players place X and O on a board using left and right mouse clicks. The game includes a start screen, a gameplay board, background music, sound effects, and a game-over screen with animations for when all moves are completed.

How I built it

I used Python and Pygame to build the game. The structure is simple: Front page with a start button Gameplay screen where X and O are placed with left/right clicks Game-over screen after all moves

Challenges I ran into

Understanding the game loop: Unlike humans, the screen doesn’t remember anything—it redraws everything every frame. At first, I didn’t understand why my Xs and Os disappeared. Timing transitions and animations correctly Keeping track of moves and clicks Organizing code without messing the game Debugging was frustrating, but also rewarding. Every time something worked, it felt like actual magic.

Accomplishments that I'm proud of

Even if this is my first time coding a game Built a fully interactive game from scratch using only the basics Added sound effects and background music to enhance the experience Successfully managed game states and animations Learned to connect small programming concepts into a working project

What I learned

I realized I’ve always known the basics—loops, increments, conditions—but I never really knew how to put them together. This project taught me that: You can make a game from pure basics Coding is about connecting simple ideas I also learned how games actually work: Mouse clicks act as events that control everything Loops redraw the screen every frame (the screen forgets everything if you don’t tell it to remember) So coding at its core is a way of thinking, like a computer

What's next for XO GAME

Add win/draw detection to automatically determine the winner Improve animations and UI to make it more interactive Convert the game to a mobile-friendly version in the future

Built With

Share this project:

Updates