Porytiles
|
Overworld tileset compiler for use with the pokeruby
, pokefirered
, and pokeemerald
Pokémon Generation III decompilation projects from pret
. Also compatible with pokeemerald-expansion
from rh-hideout
. Builds Porymap-ready assets from RGBA (or indexed) input assets.
Pokémon Hearth by PurrfectDoodle. Tile art inserted via Porytiles. Used with permission.
Porytiles makes importing from-scratch tilesets (or editing existing tilesets) easier than ever. Think of it this way: Poryscript, another popular community tool, takes a .script
file and generates a corresponding .inc
file. Comparably, Porytiles takes a source folder containing RGBA (or indexed) tile assets and generates a corresponding metatiles.bin
, metatile_attributes.bin
, indexed tiles.png
, indexed anim
folder, and a populated palettes
folder – all as part of your build!
For more info, please see this wiki page which explains what Porytiles can do in more detail.
First, go ahead and follow the release installation instructions in the wiki. You can use Homebrew, or you can download a release binary and install it yourself. Alternatively, intrepid users may choose to build Porytiles from source. Once you've got Porytiles working, try the demo steps located at this wiki page. Everything else you need to know about Porytiles can be found in the wiki. I highly recommend reading the wiki articles in order. If you have further questions, I can be found on the pret
and RH Hideout
discord servers under the name grunt-lucas
.
Porytiles follows a Continuous Delivery model for release cadence. Every commit on the develop
branch gets packaged and published as a nightly release. Due to my development style as well as time constraints, I don't plan on creating versioned releases for Porytiles. I try to keep the commit history clean, so you can quickly see what has changed in each nightly release. Users are encouraged to install via the brew tap (brew works great on WSL, it's straightforward to set up). With Homebrew, you can run two quick commands and always be up to date.
You can use either GCC or Clang, provided your installation is reasonably recent and supports most C++20 (and some C++23) features. Please see this wiki page for more detailed instructions, should you need them.
You'll need zlib
and libpng
installed on your system, specifically the static (.a
) libraries. Consult your system's package manager for details. Porytiles's build system will search the system library paths for libpng.a
and libz.a
. If you'd like to link those libraries dynamically, or if the CMake configuration is having trouble finding them, then you'll need to modify Porytiles1/lib/CMakeLists.txt
appropriately.
You'll also need cmake
version 3.20
or greater.
Set up the CMake build folder:
Then build with:
You can check that everything is working like this:
To run the actual tool:
On macOS, the CMake configuration command typically finds your system clang compiler. If you've installed GCC via Homebrew and would like to use that instead, try this alternative configuration command (assuming you have GCC 15):
If you have a different major version of GCC or you are using an Intel Mac, you may need to tweak this command to match your system.
GitHub user PKGaspi has created a collection of useful scripts here. Of particular interest is this export_layers
script, which allows you to save each sprite layer to a different file. This may be useful, since Porytiles requires each tile layer in a separate PNG file.