Skip to content

coslynx/ticstar-3d-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ticstar-3d-tic-tac-toe

Interactive 3D Tic Tac Toe game with online multiplayer capabilities.

Developed with the software and tools below.

React Three Fiber Frontend Languages Backend None GSAP and Framer Motion
git-last-commit GitHub commit activity GitHub top language

๐Ÿ“‘ Table of Contents

  • ๐Ÿ“ Overview
  • ๐Ÿ“ฆ Features
  • ๐Ÿ“‚ Structure
  • ๐Ÿ’ป Installation
  • ๐Ÿ—๏ธ Usage
  • ๐ŸŒ Hosting
  • ๐Ÿ“„ License
  • ๐Ÿ‘ Authors

๐Ÿ“ Overview

The repository contains a Minimum Viable Product (MVP) of a 3D Tic Tac Toe game, named "ticstar-3d-tic-tac-toe". It features an interactive 3D game board rendered using React Three Fiber. The game logic is implemented with TypeScript, providing a visually engaging rendition of the classic game.

๐Ÿ“ฆ Features

Feature Description
โš™๏ธ 3D Rendering Implements 3D game elements (board, pieces) using Three.js and React Three Fiber for an immersive user experience.
๐ŸŽฎ Game Logic Manages game state, move validation, win condition checking, and draw detection using TypeScript.
๐ŸŽจ Animations Includes animations for piece placement and hover effects using GSAP and Framer Motion.
๐Ÿ–ฑ๏ธ User Interaction Allows users to interact with the 3D board via mouse clicks to place pieces.
๐Ÿงฑ Modular Design The codebase follows a modular architecture with separate components for the board, cells, and pieces.
๐Ÿงช Unit Testing Utilizes Jest for comprehensive unit tests of the game logic.
๐ŸŽจ Styling Styles the game interface using Tailwind CSS, providing a visually appealing and responsive design.
๐ŸŒ Cross-Platform Designed to be compatible across different web browsers and devices.
๐Ÿš€ Performance Optimized for performance, leveraging efficient rendering and model loading techniques.

๐Ÿ“‚ Structure

โ””โ”€ src
   โ””โ”€ components
      โ””โ”€ Board.tsx
      โ””โ”€ Cell.tsx
      โ””โ”€ Piece.tsx
   โ””โ”€ utils
      โ””โ”€ gameLogic.ts
   โ””โ”€ App.tsx
   โ””โ”€ main.tsx
โ””โ”€ public
   โ””โ”€ assets
      โ””โ”€ models
         โ””โ”€ board.glb
         โ””โ”€ x.glb
         โ””โ”€ o.glb
โ””โ”€ tests
   โ””โ”€ gameLogic.test.ts
โ””โ”€ .env
โ””โ”€ package.json
โ””โ”€ README.md
โ””โ”€ tsconfig.json
โ””โ”€ tailwind.config.js
โ””โ”€ .prettierrc.js
โ””โ”€ jest.config.js

๐Ÿ’ป Installation

Warning

๐Ÿ”ง Prerequisites

  • Node.js v18+
  • npm 6+

๐Ÿš€ Setup Instructions

  1. Clone the repository:
    git clone https://github.com/coslynx/ticstar-3d-tic-tac-toe.git
    cd ticstar-3d-tic-tac-toe
  2. Install dependencies:
    npm install

๐Ÿ—๏ธ Usage

๐Ÿƒโ€โ™‚๏ธ Running the MVP

  1. Start the development server:

    npm run dev
  2. Access the application:

Tip

โš™๏ธ Configuration

  • 3D asset paths are configured using environment variables in .env.
  • Modify styling by editing the tailwind.config.js file.

๐Ÿ“š Examples

  • ๐ŸŽฎ Playing a move: Click on an empty cell to place an 'X'.
  • ๐Ÿ”„ Animations: Observe the scaling animation when a piece is placed on the board.
  • ๐Ÿ’ก Hover effect: Hover over a cell to see it highlight, indicating it can be selected.

๐ŸŒ Hosting

๐Ÿš€ Deployment Instructions

Deploying to Netlify

  1. Sign up or log in to Netlify.
  2. Connect your GitHub repository to Netlify.
  3. Configure the build settings:
    • Build command: npm run build
    • Publish directory: dist
  4. Deploy the site.

๐Ÿ”‘ Environment Variables

Provide a comprehensive list of all required environment variables, their purposes, and example values:

  • THREE_PUBLIC_PATH: Base URL for accessing 3D assets. Example: /assets/models/

๐Ÿ“œ API Documentation

This MVP does not include a backend, therefore there are no API endpoints. All game logic and rendering are handled client-side.

Note

๐Ÿ“œ License & Attribution

๐Ÿ“„ License

This Minimum Viable Product (MVP) is licensed under the GNU AGPLv3 license.

๐Ÿค– AI-Generated MVP

This MVP was entirely generated using artificial intelligence through CosLynx.com.

No human was directly involved in the coding process of the repository: ticstar-3d-tic-tac-toe

๐Ÿ“ž Contact

For any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:

๐ŸŒ CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!

3D Model Files Required

This project requires the following 3D model files that need to be created manually:

  • public/assets/models/board.glb
  • public/assets/models/x.glb
  • public/assets/models/o.glb

These placeholder files need to be replaced with actual binary 3D model files.