Skip to content

Latest commit

ย 

History

History
98 lines (71 loc) ยท 3.44 KB

File metadata and controls

98 lines (71 loc) ยท 3.44 KB

Cute Tower Defense ๐Ÿฐ๐Ÿฐ

English | ไธญๆ–‡

License Node.js Socket.IO

Cute Tower Defense is a real-time 1v1 competitive tower defense game where strategy meets cuteness! Defend your base with adorable towers while sending waves of charming monsters to overwhelm your opponent.

Note: This project is a web-based multiplayer game built with Node.js and HTML5 Canvas.

๐ŸŽฎ Features

  • Real-Time 1v1 Multiplayer: Battle against another player in real-time.
  • Cute Art Style: Enjoy a vibrant, "Q-version" aesthetic with cute animals and colorful towers.
  • Strategic Gameplay: Balance your resources between building defenses and launching attacks.
  • Diverse Units:
    • Towers: ๐Ÿน Basic, ๐Ÿ”ซ Rapid Fire, โ„๏ธ Slow/Ice, ๐Ÿ”ฅ Inferno.
    • Monsters: ๐Ÿฐ Fast Bunny, ๐Ÿผ Tank Panda, ๐Ÿ‘น Titan.
  • Interactive UI: Easy-to-use drag-and-drop or click-to-place interface.

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/tower-defense-game.git
    cd tower-defense-game
  2. Install dependencies:

    npm install
  3. Start the server:

    npm start
  4. Play the game: Open your browser and navigate to http://localhost:3001. Tip: Open two browser windows to simulate a match locally!

๐Ÿ•น๏ธ How to Play

  1. Objective: Reduce your opponent's health to 0 while keeping yours above 0.
  2. Resources (๐Ÿ’Ž): You earn resources over time and by defeating monsters. Use them wisely!
  3. Defend: Select towers from the bottom-left panel and place them on your map to stop incoming monsters.
  4. Attack: Select monsters from the bottom-right panel to spawn them on your opponent's map.
  5. Win: The first player to lose all 20 โค๏ธ Hearts loses the game.

๐Ÿ› ๏ธ Technology Stack

  • Backend: Node.js, Express
  • Real-time Communication: Socket.IO
  • Frontend: HTML5 Canvas, Vanilla JavaScript, CSS3
  • Design: Custom game engine with entity-component-like structure.

๐Ÿ“‚ Project Structure

tower-defense-game/
โ”œโ”€โ”€ public/             # Frontend assets and code
โ”‚   โ”œโ”€โ”€ assets/         # Images and sounds
โ”‚   โ”œโ”€โ”€ js/             # Game logic (Entities, Game Loop, Main)
โ”‚   โ”œโ”€โ”€ index.html      # Entry point
โ”‚   โ””โ”€โ”€ style.css       # Styling
โ”œโ”€โ”€ server/             # Backend code
โ”‚   โ””โ”€โ”€ index.js        # Express server & Socket.IO logic
โ”œโ”€โ”€ plan.md             # Game design document
โ””โ”€โ”€ package.json        # Project dependencies

๐Ÿค Contributing

Contributions are welcome! If you have ideas for new towers, monsters, or features, feel free to fork the repository and submit a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

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


Made with โค๏ธ by Pzy2000