Skip to content

The 2D World of Tanks game made in C++ using QT graphics libraries.

Notifications You must be signed in to change notification settings

SebastianParzych/World-of-Tanks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World of Tanks game

Purpose

Main purpose of this project is to understand object oriented programming.

Gameplay

The player controls the vehicle of his choice and tries to destroy computer-controlled tanks.

Vehicle types

There are three aviable classes of tanks, which can appear in battlefield:

  • Light tank-The fastest vehicle, with has the best view range, but worst gun.
  • Medium Tank- Well-rounded vehicle, with decent movability and gun.
  • Heavy Tank- The slowest vehicle with the biggest number of health points. It also deals the most damage with a single shell.

The main parameters are presented above, in fact, there are more of them, e.g. reverse speed, rotation speed, turret rotation speed.

Features

  • Each tank on the battlefield can see opponents, which are in tank's view range. When an enemy comes into line of sight of a computer-controlled tank, it is automatically detected, and the computer starts tracking the enemy vehicle with a gun and then fires a shot.
  • Each opponent can focus on two tanks at the same time. first - The tank it aims at. 2- The tank or obstacle closest to the enemy. Thanks to that, there are rarely collisions between vehicles.
  • After leaving the map, the tank immediately goes to the center of the map.
  • Depending on the number of vehicles on the battlefield, chests containing random tank upgrades are created on the map.
  • Structures of a bushes are randomly generated.
  • Vehicle spawns are adjusted to the number of vehicles on the battlefield- spawned tanks cannot be close to each other.

CLass Hierarchy

  • CMap
  • ICObject
    • ICMovableObject
      • CShell
      • CTank
    • ICStaticObject
      • CGrass
      • CImprovements
  • QGraphicsRecItem
    • ICGObject
      • CGGrass
      • CGImprovements
      • CGShell
      • CGTank
  • QMainWindow
    • GameWindow
    • MainWindow
  • QObject
    • CGame

Example diagrams

Inheritance diagram fo ICObject.:

Inheritance diagram fo ICGObject.:

Read More

For more information about structure of project open in doc file doxygen documentation.

About

The 2D World of Tanks game made in C++ using QT graphics libraries.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published