Skip to content

MostafaBoostan/Plant_vs_Zombies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

133 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PvZ-Qt-Arena: Multiplayer Strategy Game

A customized, multiplayer implementation of the famous "Plants vs. Zombies" game developed in C++ using the Qt Framework. [cite_start]This project features a real-time Client-Server architecture, allowing two players to compete against each other in a tactical grid-based battle[cite: 186, 187, 189].

๐Ÿš€ Overview

Unlike the classic single-player experience, this project focuses on PvP (Player vs. Player) strategy. One player controls the Plants (Defenders) and the other controls the Zombies (Attackers). [cite_start]The game is played over a network using TCP/IP Sockets[cite: 189, 207].

๐Ÿ›  Tech Stack & Concepts

  • [cite_start]Language: C++ (OOP, STL, Polymorphism)[cite: 186, 187].
  • [cite_start]Framework: Qt (Qt Widgets, Qt Network, Qt Thread)[cite: 187].
  • [cite_start]Architecture: Client-Server Model (Socket Programming)[cite: 204].
  • [cite_start]Data Management: File handling for user accounts and match history[cite: 191].

โœจ Key Features

๐Ÿ” Authentication System

  • [cite_start]Sign Up/Login: Secure user registration with hashed passwords (SHA-256 recommended)[cite: 194, 199].
  • [cite_start]Account Recovery: "Forgot Password" functionality using phone number verification[cite: 195].
  • [cite_start]Profile Management: Edit user details (Name, Phone, Address)[cite: 213].

๐ŸŽฎ Gameplay Mechanics

  • Multiplayer Engine: Players connect via the Server IP. [cite_start]Roles (Plant/Zombie) are assigned randomly for the first round[cite: 211, 220].
  • Rounds: The game consists of 2 rounds. [cite_start]Roles swap after the first round[cite: 221].
  • The Grid: A $6 \times 12$ battlefield. [cite_start]The left side belongs to Plants, and the right side acts as the spawn point for Zombies[cite: 223, 224, 312].
  • Economy:
    • Sun (Plants): Spawns every 5 seconds. [cite_start]Used to plant defenses[cite: 234].
    • Brains (Zombies): Spawns every 5 seconds. [cite_start]Used to deploy zombies[cite: 228].
  • Win Conditions:
    • [cite_start]Zombies Win: If a zombie reaches the opponent's home (leftmost column) within 3:30 minutes[cite: 230].
    • [cite_start]Plants Win: If the timer runs out and the home is secure[cite: 236].

โš”๏ธ Characters & Units

Plants:

  • [cite_start]Peashooter & Two-Peashooter: Standard ranged attackers[cite: 287, 289].
  • [cite_start]Walnut: High-health defensive barrier[cite: 291].
  • [cite_start]Plum Mine: Explodes on contact, damaging a $3 \times 3$ area[cite: 301, 316].
  • [cite_start]Jalapeno: Destroys an entire row of zombies instantly[cite: 307].
  • [cite_start]Boomerang: Piercing damage to all enemies in a row[cite: 309].

Zombies:

  • [cite_start]Regular Zombie: Basic unit[cite: 248].
  • [cite_start]BucketHead: High resistance[cite: 254].
  • [cite_start]Tall Zombie: Fast mover, can jump over Walnuts[cite: 264, 269].
  • [cite_start]Astronaut: Speeds up when health is low[cite: 271, 276].
  • [cite_start]PurpleHair: Extremely powerful and resilient[cite: 277].

๐Ÿ“œ Match History

[cite_start]Players can view a detailed log of their past matches, including opponent username, date, played roles, and round results[cite: 218].

๐Ÿ“ฆ Installation & Usage

  1. Server: Run the server application first. [cite_start]It will display the host IP Address[cite: 208].
  2. [cite_start]Client: Run the game client (includes an Installer)[cite: 326].
  3. [cite_start]Connect: Enter the Server IP in the client to start the match[cite: 211].

[cite_start]Developed as the final project for the Advanced Programming course, Spring 2024. [cite: 188, 339]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages