Skip to content

Latest commit

 

History

History
156 lines (108 loc) · 9.68 KB

README.md

File metadata and controls

156 lines (108 loc) · 9.68 KB

Tropical Tac Toe

Summary

Tropical Tac Toe is a small video game project made in the span of around 4 days. I developed this project to hone my Unity development skills and demonstrate my learning progress to others.

This project covers numerous aspects of video game development such as artificial intelligence (AI), settings & audio management, controller support, and local co-operative play.

You can download the game from the Releases section or itch.io.

Game Menus

Figure 1: The main menu features a tic tac toe board with buttons that integrate into the design.

Figure 2: Players can adjust display and audio settings.

Figure 3: Multiple game modes are included with easily readable buttons.

Figure 4: A quit prompt is used to prevent accidental game closes with controllers.

Settings.Menu.mp4

Video 1: Players can adjust display and audio settings trivially.

Features

Co-Op Play

Players can play against other friends by using the local cooperative game mode. This mode swaps turns between players and allows two players to play on the same computer.

Figure 5: Text elements are used to indicate the current player's turn.

Main.Menu.And.Local.Co-op.mp4

Video 2: Players can alternate turns in the local co-op game mode.

Player vs. Bot

Players can select between several bot personalities that have different skillsets. The bots are progressively more challenging since their performance is dictated by several factors:

  • Mistake Chance - Chance for a bot to make a mistake and choose the wrong move.
  • Randomness Chance - Chance for the bot to randomly select a move instead.
  • Lookahead Depth - Determines how far the bot will plan into the future.
  • Reaction Time - Bots will react with a delay similar to their skill level. Easier bots are simulated to take longer to "think" while challenging bots will make their decisions almost instantly.

Figure 6: Bot information is shown to ensure that players understand the difficulty changes between bot profiles.

Players of all skill levels will be able to enjoy the experience by having bots with different traits.

Figure 7: Bot profile appearances are designed to be different than player profiles.

Figure 8: Bot names are displayed on the game over screen if the player loses.

Bot.Selection.mp4

Video 3: Multiple bots are included to suit all skill levels.

Challenging.Bot.mp4

Video 4: The highest level bot still has a chance of making mistakes, but it is more likely to win or scratch the game.

Special Effects

Figure 9: A transition effect is used to display win lines so that players know when the game ends.

Figure 10: A confetti explosion effect is used when the player wins.

Lessons Learned

Minimax Algorithm

In this project, I learned how to implement the Minimax algorithm to find the best moves for the AI bots.

Initially, the algorithm was too perfect and would have been almost impossible for players to compete against. This would not have been an fun experience since players should have the opportunity to win even against challenging opponents.

Therefore, after implementing strategies to add variation to the AI's decisions, such as the max depth and mistake chance gameplay elements, the game became more engaging as a result.

Text Effects

I also learned how to implement a wavy text effect on TextMeshPro text elements by modifying the vertices of each character and mapping the characters to the sine wave. The effect complements the tropical theme of the project, so it resulted in a nice visual effect.

User Interface Design

This project also gave me the opportunity to polish my user interface design skills. I continously iterated over numerous designs until I achieved the final version.

Future Considerations

Peer-to-Peer Multiplayer

I did consider adding an additional game mode so that players could play online with other players. However, after researching the various multiplayer frameworks such as Unity Relay and Mirror, I decided against implementing multiplayer.

I did not want to incur any server costs while developing this small project, so I decided not to pursue this path at this time.

However, in the future, I could add multiplayer support since the data that needs to be synched between both clients is:

  • Current Player's Turn (integer value)
  • Current Player's Move (integer value (0 to 8))
  • Player Names (two string values)

This would result in minimal server bandwidth since the data only needs to be shared once a turn ends, so a traditional server structure could be useful.

I was considering using Unity Relay or Mirror for peer-to-peer networking, but Unity Relay relies on both players connecting to Unity's servers and I did not want to use their server resources for a small demo application.

(Additionally, I am not planning on monetizing this project, so incurring server costs would not be very wise!)

I will be interested in learning more about Unity Relay in the future, but hopefully with a more relevant project that can take advantage of the service fully.

Customizable Bots

Another idea that I could implement in the future is customizable bot profiles. Currently, there are 5 bot profiles, but I could add additional user interface sliders to allow players to customize the bot traits directly.

Additional Game Modes

I could also introduce new game modes such as larger tic tac toe boards and powerup skills. However, this would require developing a system to dynamically generate tic tac toe boards.

Conclusion

Developing Tropical Tac Toe has taught me a few new skills and allowed me to design, develop, and complete a project in a short time frame.

This project has helped me slightly overcome my struggles with overambition and allowed me to develop a fully featured project that I hope others will enjoy/find informative.

Credits

Game Design & Development

Dunnatello

Third Party

Music

"Verano Sensual" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License http://creativecommons.org/licenses/by/4.0/

"Arroz con Pollo" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License http://creativecommons.org/licenses/by/4.0/

"Beachfront Celebration" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License http://creativecommons.org/licenses/by/4.0/

More music by this artist can be found here.

Sounds

rocketpancake - Mission Successful
Leszek_Szary - Game Over
eqylizer - Button Hover Click
Christopherderp - Video Game Menu Button Click
BeezleFM - Item Sound

Game Assets

Free

mob-sakai - mob-sakai/ParticleEffectForUGUI
Catlands Games - 9 Free Backgrounds

Paid

Archanor VFX - Super Confetti FX

Font

Montserrat