New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added blank and filled Spinda sprites (groundwork for procedural Spinda spots) #56
Conversation
Thanks for the PR but If you are interested in procedural Spinda, here is some work already done: https://codepen.io/5310/pen/vmXONE?editors=0010
|
I guess it doesn't hurt to have this as templates for the procedural code (code that I wouldn't maintain in pokesprite IMHO). |
The procedural code should live in it's own repo, I agree there. But that's for @5310 to decide |
Whether or not scripts to generated procedural spinda find a place in this repo is definitely something @msikma et al get to decide. Most of the old (and rarely used:) scripts have been removed in the recent refactor after all. Such a script could always exist in its own repository and have this one as a submodule, perhaps. However, I would like to think that the blank and filled bases should have a place in this repo, along with masks for the four spots. More to the point, that old Codepen is very much a made-up algorithm. I sort of assumed that the box-sprites were too small to actually represent the real variety of patterns, so maybe we could cheat some fake variety and get away with it. Later I did take a look at the algorithm the community believes to be correct, and realized it wasn't that difficult to emulate for even pre-LGPE/SWSH-era box-sprites, and especially now, even if a smaller number of the patterns would be visually distinguishable. I still couldn't find a really conclusive write-up of it anywhere except for the thundaga SpindaPainter implementation, so I didn't continue. It's just four static masks randomly rearranged within four bounding boxes. And for each game, these spots are—apparently—hard-coded (although only for the battle-sprites and later textures and not box-sprites:) Even if we don't have the generation code in here, they should be assets, however unusual, considered for inclusion. |
Sorry for not having looked at this yet. I think it would be good to include the empty/full sprites for Spinda in this repo. I'll need to update the Regarding the code to implement the mask, I too think that's best off being in another repo, but if someone implements this we could link to it from the readme file. |
That would be great. This means that we could have the Spinda spots RNGed like in the real games. Another huge feature I'd be welcoming to pokesprite (even if it requires an additional script to use). |
I've just pushed some changes - Spinda sprites for each of the three versions (gen 7, 7x and 8), plus shiny, and changes to the data file. I did a very small change to the sprite you made, but if you prefer I can undo that. |
I've made a little proof of concept to test this: https://msikma.github.io/spinda-spots/ This is similar to the Thundaga Spinda Painter, except that it uses an SVG mask to draw the spots instead of using canvas. I'm not 100% sure yet if it's completely accurate but it looks OK. You can use the Thundaga link to get a personality value to test. The default is |
@msikma This is perfect for reasons I can't say right now. Is there way to fetch the painted sprite from an URL with a given HEX parameter? |
With the parameter being exactly what hex address corresponds to the spot pattern you'd like to display? Might be a way to get this implemented without the need for another script. |
Unfortunately that won't work with this specific test, this just masks the filled sprite on top of the blank one. But I agree that would be a nice way to implement this. I just know I'm not going to host that because then I'll need to do it forever. 😅 edit: oh wait, do you mean to ask if it's possible to preset something other than the default value using a get parameter? I should add that yeah. Anyone who's interested could recreate this in such a way that it outputs actual PNG data. See the Pre-generating the sprites is impossible of course. Seems with the current implementation there are 1234800 possible sprites (since the sprite is quite small, the number is a lot lower than the theoretical 4 billion possibilities as a lot of them look identical). |
You can now link directly to sprites in the test. |
That was fast, m'dude. 👍 |
LGTM 👍 |
🏆 👌 💯 Emojispam aside, I'd like to try making a generator that creates flat PNGs from Personality values and, especially, tries to adjust for some of the perspective differences between the regular Advanced-era battle-sprites and box-sprites. Even if it can't ever be a perfect fit, maybe a bit of shearing could help. @msikma did pretty much all the work anyway! ...But I'm out of town for a little weekend trip (and COVID-19 party, apparently 😷) so it might still take a while |
Awesome. Yeah, as you can tell it's not 100% accurate, but then fortunately since the box sprite is so small there's more room for error anyway. There's also the fact that the battle sprite Spinda looks into a slightly different direction. But in any case it seems this is enough to support a future implementation. So I'm merging this and then if you or anyone else happens to make an implementation we can link to it from the readme. |
Ported from #26.
Original sprites found/made by @5310.