Tic-Tac-Toe
← Back to Overview

Tic-Tac-Toe

A first multi-player attempt.

🎯 About This Game

This project implements the simplistic tic-tac-toe game. We use it as a test bed for the multiplayer framework. The main workflow will also be the same in the coming larger games.

📖 Rules of Tic-Tac-Toe

Tic-Tac-Toe is a quick and simplistic two-person game, played by placing stones on a 3x3 game field. The player who gets a straight row of three stones wins.

Setup:At the beginning, you create or join a playing room. The room name must be agreed upon by other communication means (e.g., Discord).

Gameplay: Players take turns placing stone on the board. When the game is over, it automatically restarts now with the other player.

Winning: The game ends when the board is full, or one player gets three stones in a row.

🎮 How to Play

Starting the Game: At the beginning, you are either joining or creating a room. When you create a room, you decide if you allow spectators.

Making Moves: The headline indicates whose turn it is to make a decision. Click on an empty slot.

Game End: When the game ends, the winner is shown at the top of the screen. After 5 seconds, it automatically restarts.

⚙️ Technical Details

The game is built entirely in Rust using the Macroquad framework and compiled to WebAssembly. The network part uses dedicated technology:

  • Websockets: The communication is done over websockets to be able to establish connections in all environments.
  • Client Hosted Server: The game host is also running in a browser on the client side.
  • Tokio / Axum Relay Server: Beside the web server, we host a dedicated server based on Tokio/Axum to establish communication between different browsers.