What the game looks like on starting up.
Game in progress... Who is it going to be?
This is what happens when a player wins...
A few days ago, in preparing for this hackathon, I thought about building a game that's simple, yet intuitive. I thought about tic-tac-toe, where I built a version of it three years ago using Java and both their Swing and AWT toolkits.
What it does
It's a two-player puzzle game where you need to get six tokens in a row. You can place two tokens at a time. One player places orange cubes, while the other player places blue capsules. If you win, particles start flying all over the tokens you got a win from.
How I built it
I used Unity to build the game board, tokens, their particle systems, and user interface. All of the programming was done using C# and the Unity API.
Challenges I ran into
Probably dealing with mouse clicks in the spaces of the board. Initially, I thought of screen-to-camera raycasts, which sound appropriate for a 3D game. Eventually, I found out that it would be much simpler to use OnMouseUp() from the MonoBehavior class, which is an event listener on UI elements and colliders. Knowing that what I'm dealing with are 3D colliders, I think it was very effective in this approach. So I took that instead, coding it in a script, and it actually worked.
Accomplishments that I'm proud of
I now have another simple game to add to my LinkedIn profile and demonstrate to some of my connections, primarily two recruiters from both A Thinking Ape and Electronic Arts.
What I learned
In Unity, colliders on 3D objects can have mouse click listeners instead of having raycasts deal with them upon clicking on the screen!
What's next for MLH Tic-Hac-Noe
I think what's next is probably add some enhancements to it, along with a mode to compete against the opponent, and add some music and sound.