tetris-ai Svelte Themes

Tetris Ai

A Svelte Kit implementation of 2D Tetris game with AI feature, emphasizing a responsive and modern design for cross-platform play.

Tetris-AI

https://github.com/ISmillex/tetris-ai/assets/72645646/1afa461c-b094-4d8e-af67-55e41ae92a33

Table of Contents

  1. Introduction
  2. Features
  3. Road Map
  4. Installation
  5. How It Works
  6. Contributing
  7. License

Introduction

Tetris-Ai is a classic 2D Tetris game written in Svelte Kit, with a focus on implementing an AI that can play the game proficiently. While the current version does not include the AI, the game features a beautiful and responsive design that works seamlessly on both mobile and desktop platforms. You can play the game online here.

Features

  • Classic 2D Tetris gameplay
  • Beautiful and responsive design for mobile and desktop platforms
  • Smooth and intuitive user interface

Road Map

Version 1.0 (Current)

  • Basic Tetris gameplay implementation
  • Responsive design for mobile and desktop

Version 2.0 (Upcoming)

  • AI integration for proficient gameplay
  • Advanced scoring system
  • Multiplayer mode

Installation

Follow these steps to run the game locally:

  1. Clone this repository. git clone https://github.com/ISmillex/tetris-ai.git
  2. Navigate to the project directory. cd tetris-ai
  3. Install the dependencies.npm install
  4. Start the development server. npm run dev -- --host
  5. Open your browser and visit http://localhost:5173 to play the game.

How It Works

Tetris-Ai is built using Svelte Kit, which allows for efficient rendering and smooth UI interactions. The game mechanics follow the classic Tetris rules, where players aim to complete lines by moving and rotating falling Tetrominoes. The time complexity of the game algorithms is optimized for smooth gameplay, ensuring minimal lag and smooth rendering even on lower-end devices. The space complexity is also optimized to efficiently handle the game grid and falling pieces, ensuring a seamless gaming experience. Implementing the AI aims to provide players with a challenging and competitive environment, enhancing the overall gaming experience.

Contributing

To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature
  3. Make your changes and commit them: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes