Git Product home page Git Product logo

pokesprite's Introduction

pokesprite

Inspired by msikma/pokesprite, this repo is a simplified version that generates a spritesheet and stylesheet that are meant to be used for PokedexTracker.

I mainly added various sprites from gen 8 and 9, including various fan-made sprites in order to make (almost?) everything fit in a 32x32 grid like how it was in the 3ds gens, removed all shiny sprites and various variants and also some small changes like making the sprite names 4 digits.


Credits for the small sprites:

Ezerart: Most Gen 9 sprites

Larryturbo: Most Gen 8

GhostaboArt: electrode-h, wooper-paldea

MrGalleom: Arcanine-h, Slowbro-g, Slowking-g, Glastrier, Spectrier, Zarude, Melmetal, Kleavor

Pikafan200, multidiegodani and MBCmechachu: Other hisuian sprites


It currently consists of 6 scripts:

  • rename - This renames icons from msikma/pokesprite to names that can be used by the other scripts. Only use this one if you're copying sprites from that repo. Read the comment at the top of the file for more info.
  • chop - This takes in a JSON file explaining the details of an existing spritesheet, and it chops it up into individual images.
  • scale - This takes any images in the images directory that are greater than the threshold (default 100px) in either dimension (height or width) and either scales it by the provided factor (default 0.5) or to the set dimensions passed in. This script will modify the images in place.
  • trim - This takes all images in the images directory and trims any excess transparency from it. This is so that we can center the sprites based on content (non-transparent pixels) and control the padding through CSS.
  • spritesheet - This takes all the images in the images directory and stitches them together into a single image.
  • scss - This uses the images in the images directory to generate a .scss file that lists classes with the correct positions so the spritesheet can be used.
  • copy - This takes the final outputs (the spritesheet and the .scss file) and copies them into their appropriate location in pokedextracker/pokedextracker.com. It assumes that this repo and that repo are both cloned in the same parent directory. If that is not the case, this script will err.

To run any of them, it's a simple task command:

task rename
task chop -- data.json
task scale
task trim
task spritesheet
task scss
task copy

Setup

Task

Instead of make, this project uses task. It seems to be a bit cleaner for some specific things that we want to do.

You can find instructions on how to install it here.

Go

To have everything working as expected, you need to have a module-aware version of Go installed (v1.11 or greater) and pngcrush.

To install Go, you can do it any way you prefer. We recommend using goenv so that you can use the correct version of Go for different projects depending on .go-version files. In its current state, the v2 beta of goenv can't be installed through brew normally, so you need to fetch from HEAD using the following command:

brew install --HEAD goenv

Note: If you already have a v1 version of goenv installed, you need to uninstall it first.

Once installed, you can go into this projects directory and run the following to install the correct version of Go:

goenv install

pngcrush

pngcrush is required for the spritesheet command. To install it, you can just run the following command:

task setup

pokesprite's People

Contributors

robinjoseph08 avatar galleom avatar ami avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.