Comments (16)
Hey there, I've put it on low prio for now but I should get back to it. I started the project but only worked on it for a little bit.
The project was a simple sprite generator using Spritesmith, which generates images and CSS, with some options like toggling shiny sprites, different forms, items, etc. I'll work on it some more soon and update this issue when something is up to look at.
from pokesprite.
Nearly done with it. Going to finish it up and put it on npm this week.
from pokesprite.
So I said this would be ready this weekend. It's not quite there yet. I'm making good progress though. There's just a few loose ends to tie up, and I still need to write at least some rudimentary documentation.
Here's the still in-progress repo: https://github.com/msikma/pokesprite-gen
Some tests:
CSS is also being generated already, but I haven't decided on a final API yet. The styles are pretty big but at least they gzip well, unlike the images.
from pokesprite.
Oh yes, on that note, if you have recommendations for the CSS classes, let me know.
Right now each item requires the class name pokesprite
, plus a type (pokemon
, or an inventory type such as pokeball
, or a misc type like ribbon
), plus finally a name. A red apricorn is pokesprite apricorn red
, a shiny Aegislash is pokesprite pokemon shiny aegislash
. Forms are indicated as per their filename, like pokesprite pokemon alcremie-salted-cream-berry
.
from pokesprite.
Wanted to let you know I've started work on this. I actually had done a little bit of preliminary work before (per my previous comment) but it really doesn't need to be that complicated, so I'm just going to write a script that generates the spritesheets with only the core needed functionality.
from pokesprite.
Nearly there.
from pokesprite.
I also would like an early NPM release :)
Done! See the pokesprite-spritesheet package. It's released as 0.1.0 for now.
I'm gonna start working on the adjustments now.
from pokesprite.
I was looking for this
from pokesprite.
Looking forward to it :)
from pokesprite.
I looked through the CSS file you provided and think the way you picked it is optimal (in terms of development), I haven't checked the full source code but maybe allow the prefix to be changed/toggled to a shorter version? I think the naming itself is very good, the only things left might be optimization like crushing the files (maybe as part of the generator?) or shorter names somehow.
At least for me I'm happy with the outcome
from pokesprite.
You're right about higher level optimizations, although fortunately there's a lot of options these days for things like scoping and crushing for plain CSS files. When using a build program like Webpack you could do something like this:
import React, { Component } from 'react'
import pokesprite from 'pokesprite-spritesheet/pokemon.css'
class MyObj extends Component {
render() {
return <span className={pokesprite['pikachu-alola-cap']} />
}
}
And then you could configure it to output minified or scoped classes. I'll make a demo of that as part of the docs.
The pokesprite-gen cli tool has some configuration options too, like --cls-basename
which is set to 'pokesprite' by default but can be changed to something shorter or turned off. I'm kinda assuming that most people will not be manually writing HTML using the literal classnames, but I'm also not really sure if that's true.
I'll add the ability to render CSS that uses pokedex numbers rather than names, too, that probably makes things easier.
from pokesprite.
Been really busy this week, so I'm planning to get the last few things done this weekend.
edit: well, it's weekend, and it's still not done. 😄
However, I've done some more fixes though and the only thing left to do is write the code that generates the overview, and a usage example, plus some basic documentation. I've modified the CSS to include class names for forms that are aliases (without including duplicate sprites).
There's one question on the misc sprites, because some of them are high resolution (the Gen 8 ribbons and marks). I'm thinking they're best off in a separate sprite with their styles set so they're the same physical size as the Gen 7 and below ribbons (40x40). I still need to check if that's the most optimal way to do it.
The WIP code is here: https://github.com/msikma/pokesprite-gen
from pokesprite.
I've built a first version of the spritesheet project with overview: https://msikma.github.io/pokesprite-spritesheet/ (repo: https://github.com/msikma/pokesprite-spritesheet/)
It's not on npm yet, but I think I'll change the version number (right now it follows the main project) since I want the interface to be stable first.
from pokesprite.
Glad to hear! I think this issue can be closed? I will open an issue in your new repository if I have any
from pokesprite.
I did a few last minor fixes and added some documentation, which was the last work to do.
Still I'm not 100% sure about one thing, which is forwards compatibility. Right now when you ask for pokesprite venusaur
you get the Gen 8 sprite. What if there's a future update that changes this sprite, or even the size? Should they be accessible through pokesprite gen-9 venusaur
, and everything else is locked in to Gen 8 by default?
This is even more true of the misc sprites, like the ribbons. Right now only the smaller pre-Gen 8 ribbons are accessible through CSS because the newer ones are basically too large to efficiently make a spritesheet of (see "limitations"). But I'm planning to make them accessible using just pure CSS too, just through individual image files instead. For the misc sprites there's even more difference between generations.
So I'm thinking of doing a bit more reworking to do the following:
- Force the user to pick a
gen-7
orgen-8
etc. class - Have multiple gens accessible in multiple files (
pokesprite-misc-gen-7.css
,pokesprite-misc-gen-8.css
, although probably more likeassets/gen8/pokesprite-misc.css
)
Note that browsers won't actually download the image files referenced in the CSS files until they're used, and most people can probably make do with just including assets/gen8/pokesprite-pokemon.css
and ignore the rest.
Any thoughts on this? Also I'd be perfectly willing to at least send the current version to npm, as 0.1.0, so that people can at least begin working with it, and do all this stuff for 1.0.0.
from pokesprite.
Regarding the forwards compatibility, I think it's fine to just use the most current version, so when gen 9 releases you just use those and leave the rest as options. Forcing them would provide more transparency but I assume (purely based on my opinion) that most people will use current gen anyway except some sites that still use 32x32 images. But those wouldn't really profit from this repository except someone provides smaller versions of new sprites.
For misc stuff, I think a split version is the best (personally prefer the latter type).
I also would like an early NPM release :)
from pokesprite.
Related Issues (20)
- Images for Badges? HOT 1
- PokemonSay using PokeSprite HOT 1
- Genesect Gen8 sprite inconsistency / missing Appletun-Gmax / contribution question(s) HOT 5
- Pokémon BDSP - New Icons HOT 7
- Custom female Wobbuffet sprites. HOT 1
- Pokémon LA - New Graphics HOT 5
- Pokemon PLA Sprites for Spreadsheet HOT 2
- Missing Galarian Sprites HOT 3
- Shiny Tentacruel sprite colors HOT 3
- Pixel Sprites for Hisui Balls dumped from HOME HOT 1
- [REQUEST] Origin Marks under Misc HOT 4
- shiny/decidueye-hisui same color as decidueye-hisui HOT 2
- Add Sprite for Uncloaked Burmy
- Add Generation 1/2 Icon Sprites
- 2x Single wrong pixel gen8 HOT 1
- Twinkling Star Ribbon is still missing HOT 1
- [Request] PoGo? HOT 3
- Yakkun zukan sprites HOT 2
- Add sprites from Pokemon Scarlet and Violet HOT 17
- Major updates to Pokésprite HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokesprite.