Skip to content

bogdanmariusc10/Tank-Wars-2D-Minigame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tank Wars

Source code path: src/lab_m1/tema1

Tank Wars is an exciting 2D action game where players control two tanks engaged in combat. The objective of the game is to destroy the opposing tank using projectiles, which are fired in various directions to hit the target. The tanks are equipped with a cannon that launches projectiles, and the terrain deforms upon impact, adding a dynamic and strategic element to the game. Developed in OpenGL and C++, Tank Wars combines realistic physics, intricate terrain manipulation, and strategic gameplay to provide an engaging experience.

The gameplay centers around two tanks fighting on a terrain that changes dynamically. Each tank is controlled by the player and has the ability to move and rotate its cannon to aim at the opponent. The tanks fire projectiles towards each other with the goal of hitting the opposing tank. Upon hitting the ground, the projectiles create visible craters, deforming the terrain beneath them and altering the environment. This terrain deformation affects future projectile trajectories and introduces an extra layer of strategy, as players must account for the changes in the landscape when firing their cannons.

A key feature of Tank Wars is the terrain deformation system. The terrain is generated at the start of the game using mathematical functions that simulate hills, valleys, and flat ground. As the projectiles hit the surface, the terrain deforms accordingly, forming craters or deep trenches depending on the impact. This deformation can alter the landscape in such a way that it affects the movement of the tanks or the path of future projectiles.

Tank Wars employs realistic projectile physics to enhance gameplay. The projectiles are affected by gravity, which causes them to follow a curved trajectory after being fired. Players must adjust their cannon’s angle to compensate for the gravitational pull and ensure accurate shots. The collision detection system ensures that projectiles interact with the terrain and tanks correctly. When a projectile strikes the terrain, the impact is detected, and the terrain is dynamically altered. This feature is critical because players must consider how the environment is shifting as the game progresses, making each shot and tank movement more strategic.

The tanks in Tank Wars are designed with simple but effective controls. Players can move their tank left or right along the terrain and rotate their cannon up or down to adjust the angle of fire. The objective is to aim and shoot accurately while avoiding the opponent’s attacks. The game also features a health bar for each tank, which decreases when it is hit by a projectile. The player who successfully depletes the opponent’s health bar wins the game.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors