KonH / TetrisGame

Implementation of classic Tetris game using Unity engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tetris Game

screenshot

Description

Implementation of classic Tetris game using Unity engine.

Player needs to combine falling figures on limited field to create full lines, which add scores. Game is finished when a new figure cannot be placed on field.

You can play it here.

Controls

  • Up - rotate
  • Left/Right - move left/right
  • Down - speed up (move down one unit)

Features

  • Keyboard input
  • Simple 3D graphics
  • Local leaderboard
  • Player/AI mode
  • Animations
  • Sounds

Architecture

  • EntryPoint - composition of presenters and GameLoop
  • Presenter - views to reflect read only game state changes
  • Service - game logic, separated to different classes; uses writable game state; GameLoop as a services composition
  • Settings - required configuration, separated to global and scene settings
  • State - raw game data, separated to writable and read only representations

AI

  • Editor/GeneticTrainer - genetic algorithm trainer to detect better AI parameters
  • Service/GeneticPlayer - AI implementation selecting better movements based on set of parameters
  • Service/GeneticDebugger - AI debug utility to investigate move selection logic using game logs in html format:

ai report

Credits

Assets used:

About

Implementation of classic Tetris game using Unity engine

License:MIT License


Languages

Language:ShaderLab 47.8%Language:C# 43.9%Language:HLSL 8.3%