The Smogon / Pokémon Showdown! sprite repository
Go to file
2020-05-01 02:45:21 -04:00
src Add LGPE minisprites 2020-04-29 17:33:49 -04:00
tools tupctime: use modules 2020-05-01 02:44:52 -04:00
util tup-ext: move makecmd here 2020-05-01 02:45:21 -04:00
.editorconfig Deploy DSL, take 3 2020-04-30 21:48:11 -04:00
.gitignore Add PS spritesheet generator tool 2020-04-16 02:08:29 -04:00
pnpm-lock.yaml Deploy DSL, take 3 2020-04-30 21:48:11 -04:00
pnpm-workspace.yaml Deploy refactor 2020-04-30 02:32:40 -04:00
ps.deploy.js Deploy DSL, take 3 2020-04-30 21:48:11 -04:00
README.md Add imagemagick 7 installation instructions 2020-04-30 22:43:07 -04:00
smogon.deploy.js Deploy DSL, take 3 2020-04-30 21:48:11 -04:00
Tupfile.ini Add models & skeleton build 2020-04-12 23:21:02 -04:00
Tupfile.lua ps pad dex/deploy 2020-04-30 07:01:26 -04:00
Tuprules.lua tup-ext: move makecmd here 2020-05-01 02:45:21 -04:00

Pokémon Sprites

The Smogon / Pokémon Showdown! sprite repository.

Installation

This project depends on

Windows

Windows binaries of these dependencies can be found on the download pages of the sites listed above.

Linux

$ sudo apt install nodejs imagemagick advancecomp
$ sudo npm install -g pnpm

Build tup from source:

$ sudo apt install build-essential pkg-config libfuse-dev
$ git clone git://github.com/gittup/tup.git
$ cd tup
$ ./bootstrap.sh
$ sudo cp tup /usr/local/bin/tup
$ sudo cp tup.1 /usr/local/share/man

You may have to build imagemagick from source to get version 7.

$ sudo apt install build-essential pkg-config libltdl-dev libperl-dev libpng-dev
$ wget https://imagemagick.org/download/ImageMagick.tar.gz
$ tar xf ImageMagick.tar.gz
$ cd ImageMagick-*
$ ./configure --with-modules --enable-shared --with-perl
$ sudo make install
$ sudo ldconfig /usr/local/lib

macOS

Using brew on a macOS:

$ brew cask install osxfuse
$ brew install tup imagemagick advancecomp

Building

Install dependencies once with pnpm install. Then, to build:

$ tup

Filename Scheme

Pokemon sprite filenames are in a 1-to-1 correspondence with the Pokemon's name, for ease of processing. Filenames may be directly substituted in shell commands without escaping. This naming scheme means that some of the filenames in src/ are a little awkward looking to humans, but it means that no additional data beyond what is encoded in the filesystem is required to determine the correct name for any given Pokémon.

  • Filenames must conform to the POSIX portable filename character set, [0-9a-zA-Z-._]. To ensure this, we encode filenames according to the following rules. Characters in [0-9a-zA-Z-.] are left as-is. Spaces are converted to an underscore. Other characters are escaped using two underscores and four hex characters, similar to JavaScript Unicode escapes. (example: Flabébé -> Flabe__0301be__0301)

    The following JS functions may be useful:

    function encode(s) {
       return s.replace(/[^0-9a-zA-Z-. ]/g, c => '__' + c.charCodeAt(0).toString(16).padStart(4, '0')).replace(" ", "_");
    }
    
    function decode(s) {
       return s.replace(/__(....)/g, (_, m) => String.fromCharCode(parseInt(m, 16))).replace("_", " ");
    }
    
  • Formes are separated with two dashes from their base. (example: Necrozma--Dawn-Wings)

  • Cosmetic female formes are --Female instead of --F, so that you may distinguish it from Unown.

Gotchas

Tup, like Git, tracks files, not directories. If you readdir() and forget to declare a dependency it won't catch it, like it would for read(). You can work around this by having build tools stat() any filenames they acquire.

License

All code in this repository is licensed under the MIT License.

The sprites themselves are property of Nintendo / Game Freak / The Pokémon Company, though Black & White sprites for Pokémon from later generations were created by artists in the community. The license for these community-created sprites is still being determined and may change in the future, but in the meantime please talk to use first before using them.