Tic-Tac-Toe

Neon Tic-Tac-Toe Multiplayer 🎮

A real-time, ultra-fast, cross-platform multiplayer Tic-Tac-Toe web application. Built with low-latency rendering and professional decoupled architecture ensuring a premium gaming experience mapped perfectly to cloud statistics.

Designed and Licensed by Loganathan.

Gameplay Screenshot


⚡ Core Features & Concepts

🏎️ Low Latency WebSockets

Instead of relying on standard HTTP polling, the entire gameplay engine leverages Socket.io. Connections are continuously held open leveraging raw RAM matrices. Moves instantly translate to the backend where validation checks return in miliseconds avoiding slow payload serialization guaranteeing esports-level responsiveness.

☁️ Persistent Cloud Profiles

Every player registers a local caching profile referencing their name and age. This natively injects into MongoDB MongoDB Atlas. While playing, victorious matches automatically sync and calculate Victories on your global profile ensuring your stats persist across all devices.

🛡️ Decoupled Secure Architecture

The Frontend operates completely independently from the Backend.


👥 Advanced Matchmaking Systems

1. Private Hosting (2-Player Strict Cap)

Creating a match instantly issues a highly-secure 4-Character Alphanumeric Code.

2. Random Lobby Broadcasting

When clicking Play Random, the engine bypasses traditional queuing!

3. Manual 2-Player (Local Co-op)

Share a singular device without sacrificing stats!


💻 Tech Stack

Frontend UI:

Backend API:


⚙️ Installation & Setup (Cross-Platform)

Given the highly professional detached environment, you must spin up both elements securely.

Step 1: Configure the Environment

Inside your terminal navigate to the project directory and install the necessary frameworks:

npm install express socket.io cors mongoose dotenv

Create a .env file in the root directory mapping your cloud credentials:

MONGODB_URI=your_mongodb_atlas_connection_string
PORT=3000
FRONTEND_URL=http://127.0.0.1:5500

Ensure your FRONTEND_URL accurately targets whatever local address you are hosting the UI from.

Step 2: Initialize the Backend Server

node server.js

Your CLI should return Server running on http://localhost:3000 & MongoDB Connected.

Step 3: Initialize the Frontend Render

Since this is completely detached, do not view it through the Node string.

  1. Open the project inside VS Code.
  2. Ensure you have the Live Server plugin installed.
  3. Right-click the public/index.html file and select Open with Live Server.
  4. The game will automatically render and dynamically bind to your actively running Node instance!

⚖️ License

This project architecture, layout, design, and code repository are strictly the intellectual property of Loganathan. All rights reserved. Do not distribute without explicit authorization.