Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

wszqkzqk/PvZ-Portable

Games

Cross-platform C++20 recreation of Plants vs. Zombies GOTY that runs with your own legally purchased game assets.

909
210
C++
LGPL-3.0
9 months old

What it is

PvZ-Portable is a community clean-room reimplementation of Plants vs. Zombies: Game of the Year Edition in C++20, aimed at bringing the classic game to modern desktops, mobile devices, consoles, and the browser. It replaces the original fixed-resolution, architecture-dependent code with SDL3 + OpenGL ES 2.0 rendering, modern C++20 foundations, cross-platform TLV save files, and a deterministic replay system. It is not a redistribution of the game: the repository contains no PopCap/EA assets, and players must supply main.pak and the properties/ folder from a legal copy of the GOTY edition.

Quick start

  1. Get the required assets: main.pak and the properties/ folder from a purchased GOTY copy (Steam or EA). GOTY 1.2.0.1073 English is the recommended base; other official editions work but may show minor text differences. For non-1.2.0.1073 assets, generate overrides with python3 scripts/make-compat-overrides.py "/path/to/main.pak".
  2. Download a native build for your platform from Releases, or open the WebAssembly player in a browser if you do not want to install anything.
  3. On desktop, place main.pak and properties/ next to the pvz-portable executable and launch it. Saves and caches go to the OS application-data directory under io.github.wszqkzqk/PvZPortable.
  4. On Android, install the arm64-v8a APK, import a ZIP or directory containing the assets on first launch, then tap Start Game. On iOS, sideload the unsigned IPA, then copy the assets into the app Documents directory via the Files app.

Saving and tooling

The portable .v4 mid-level save format is architecture-independent and can be moved across Windows, Linux, macOS, Android, iOS, web, and Switch. Legacy .dat saves load as a fallback and migrate to .v4. The bundled scripts/pvzp-v4-converter.py supports info, export, and import to inspect or edit .v4 saves as YAML. Command-line flags include -resdir, -savedir, -record, and -play for deterministic .dmo recordings.

Constraints

You must own the original game assets; without them the game cannot start. The project targets C++20 and requires CMake 3.12+, Ninja, SDL3 (>= 3.2.12), SDL3_mixer, libopenmpt, libpng, libjpeg-turbo, and zlib when building from source. Android requires 7.0+, iOS/iPadOS 16.4+ (arm64), and free Apple ID sideloads expire after 7 days. Big-endian support is implemented by design but untested on physical hardware. Haiku support is partial (no music). Nintendo Switch works on real hardware, while Kenji-NX crashes on boot. The license is LGPL-3.0-or-later for the code only; game assets remain PopCap/EA property.

HotRepo's take

On the November 13, 2026 C++ daily list, the project sat at 3rd place with 896 stars and 206 forks, gaining 7 stars that day. For a game reimplementation in C++, that is a strong position, but it is a single snapshot; the data does not support claims about longer-term momentum. What stands out technically is the combination of WebAssembly play, multi-architecture saves, and a clean separation between engine and assets — the parts most likely to matter to people who already own the game and want to run it on modern hardware.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News