Git Product home page Git Product logo

tower-defense's Introduction

โญ๏ธ Tower defense โญ๏ธ

A simple game whose goal is to defend the castle from the incoming waves of enemies. The player can defend the castle by placing towers that deal damage to enemies and building walls that temporarily distract the enemy from the target (castle). Unfortunately, enemies can destroy any object.

There are two types of towers in the game. They differ primarily in attack range and durability and therefore in price. During the game, you can increase the tower's attack range or sell it. Its price will of course depend on its condition - a tower that has been attacked by an enemy will no longer have its maximum value.

The player can also build a wall. The wall does not attack the enemy, but temporarily stops them. The enemy stands against the wall that stands in his way and destroys it until he can go through it. This gives you extra time to think about your game strategy.

You can see different types of enemies. They differ in the maximum health and strength. If the tower kills an enemy, you will receive money - the amount depends on the type of enemy. Enemies are a bit lazy - they always look for the nearest object and choose the shortest path to it.

The castle is the most important object in the game. It stands in the center of the map and is the target of enemy attacks. The castle has a health bar, and when it is empty, the game is over. You can recharge its health bar to the maximum at any time - but it's not cheap.

๐Ÿ—บ You can choose different variants of the map:

โš™๏ธ Basic - you can only place towers and walls.

๐ŸŒŠ Flood - in addition, there are inaccessible places flooded by water on the map.

โœจ Extended - you can increase castle health bar, sell and upgrade towers.

๐Ÿ›  Core technology stack:

  • Java 17
  • Gradle
  • JavaFX
  • The icons have been sourced from here.

๐ŸŽฎ Let's begin!

After starting the game, the following window will be displayed:

After pressing START GAME button you can choose a map variant (don't forget to enter your nickname - without it the game won't start).

โ“ How to place objects?

Tower

It's easy. You have to click anywhere on the map (it will be the upper left corner of the tower). Then the shop window will be displayed. Click the BUY button under the selected tower. If you do not have enough money, you will see the appropriate message.

Wall

It's a little more complicated. You also need to click anywhere on the map - this will be the beginning of the wall. In the shop window, select the wall and click BUY. When the shop window disappears, click anywhere on the map again - this time it will be the end of the wall. When you don't have enough money, only part of the wall will be built.

First objects

At the beginning, you have a certain amount of money to spend. Place your first objects, then press the PLAY button to start the game. Remember that objects cannot overlap and cannot extend beyond map bounds.

โฌ†๏ธ Upgrade objects

You can upgrade your objects during the game. To do this, click on the object you want to improve.

๐Ÿ End of the game

The game ends when the castle is destroyed or the player defeats all waves of enemies. At the end of the game, a window with information and statistics is displayed. You can see your score and top three scores in the game, quit game or play again.

tower-defense's People

Contributors

yoc00lig avatar zolszowka avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.