Plants vs. Zombies for PlayStation 2
Plants vs. Zombies for PlayStation 2 (and beyond)
This project, hosted by OptiJuegos as pvz-ps2, is a specialized fork of the Plants vs. Zombies (PvZ) GOTY decompilation originally handled by Patoke. The primary goal is to liberate the game from its Windows-only origins and bring it to various platforms, including consoles.
Project Lineage
The development flow of this project can be visualized as follows:
🛠 Technical Objectives
The core mission is to replace legacy, platform-specific dependencies with modern, cross-platform alternatives.
- Graphics: The old renderer is being swapped for a combination of
SDLandOpenGL. - Logic: Windows-centric code is being rewritten to be cross-platform.
- Audio: DirectSound, BASS, and FMod are replaced by
SDL Mixer X.- Note: A custom fork of SDL Mixer X is used to enable MO3 format support via
libopenmpt.
- Note: A custom fork of SDL Mixer X is used to enable MO3 format support via
- Optimization: Implementing
main.paksupport and optimizing memory footprints for console hardware.
Platform Compatibility Matrix
| Platform | Data Path | Status | Notes |
|---|---|---|---|
| Windows | Same as exe | ✅ Works | Uses SDL2 |
| Linux | Same as exe | ✅ Works | Uses SDL2 |
| Haiku | Same as exe | ⚠️ Partial | No music support |
| Nintendo Switch | sdmc:/switch/PlantsvsZombies | ✅ Works | Real HW & Citron |
| Nintendo 3DS | sdmc:/3ds/PlantsvsZombies | 🛠 In Dev | Memory limits on Old 3DS |
| Nintendo Wii U | N/A | Planned for future |
📦 Requirements & Setup
To run the game, you must possess the original assets from PvZ Game of the Year Edition.
Disclaimer: This project does not support or condone piracy. It provides the executable for a fan-made decompilation; you must purchase the original game to obtain the necessary files.
Asset Installation
- Locate your
main.pakand thepropertiesfolder. - Place these in the same directory as the executable (or the specific data paths listed in the table above).
- Alternative: You may use a
.pakextractor to use raw files instead of the compressed archive.
Pro Tip: Using main.pak is highly recommended to prevent crashes and reduce loading times.
🚀 The "re-plants-vs-zombies" Vision
This effort is part of a larger goal to modernize the SexyAppFramework (circa 2005). The original engine is outdated, lacks modern C++ conventions, and relies on legacy DirectDraw and Direct3D7 backends.
The project aims to:
- Implement modern C++ standards.
- Utilize the
GLFWcross-platform wrapper. - Expand upon the 0.9.9 decompilation to create the ultimate version for players and modders.
Development Roadmap
Current Focus:
- Basic x64 support (Partial)
- Transition renderer to GLFW (WIP)
- Remove all Windows-only code (WIP)
- Integrate full GOTY functionality:
- Achievements (Partial)
- Zombatar
Future Aspirations:
- Develop a user-friendly Modding API.
- Externalize data parsing for:
- Zombies
- Plants
- Maps
- Implement custom sequence scripting.
💻 Installation & Building
For Visual Studio Users
- Install Visual Studio Community.
- Open the folder containing
CMakeSettings.json. - Wait for the cache to generate and trigger the build.
For Other Environments (VS Code, MSYS2, etc.)
Ensure you have CMake and Ninja installed, then execute:
# Generate build files
cmake -G Ninja -B cmake-build
# Compile the project
cmake --build cmake-build
Once finished, the executable will be located in the SexyAppFramework/Debug or Release folder. Move this file into your original game root folder to play.
🤝 Contributing
When submitting code, please adhere to the SexyAppFramework coding philosophy.
As noted in the documentation:
"The framework differs from many other APIs in that some class properties are not wrapped in accessor methods, but rather are made to be accessed directly."
Performance Logic
The project focuses on memory efficiency, aiming for a state where:
(Placeholder for project icon)