epicsoli.blogg.se

Game maker palette swap for individual sprite
Game maker palette swap for individual sprite











game maker palette swap for individual sprite
  1. GAME MAKER PALETTE SWAP FOR INDIVIDUAL SPRITE HOW TO
  2. GAME MAKER PALETTE SWAP FOR INDIVIDUAL SPRITE SKIN

Solution #3 is possible with shaders that were just introduced in Solarus v1.6. The hero has a lot of them, so you'd have a ton of sprites to make in the end. That makes 15 complete sprite sets you'd have to create, and you'd need to account for all the poses as well, including the use of various items. Let's say you had 5 possible subcomponents (hat, face, shirt, pants, boots) with 3 variants for each. This is especially complicated for the hero. I'd only recommend using this method if you were only swapping out the outfit in its entirety and not dealing with subcomponents. Solution #1 could work, but as you said, all the possible permutations quickly become complicated. That way you wouldn't have the alignment issues. 16x16 if that's the size of your hero) with transparent pixels where not used (and the sprites would all have the same origin). As for rendering correctly, it would probably be easiest to make all the pieces the same size (e.g.

game maker palette swap for individual sprite

I'd say that #2 is the best approach for this. Maybe by kicking around a few ideas, we can come up with some actual scripts.

GAME MAKER PALETTE SWAP FOR INDIVIDUAL SPRITE HOW TO

I realize that I'm not actually providing any scripts here, but I'm curious as to whether other creators have come up against this challenge yet, and what their thoughts might be on how to approach the issue. If you do it right, it could look fairly convincing, and allow you to set a bunch of custom color values on a limited set of generic body pieces, assuming you combine this with Solution #2Īnyway, this is where my train of thought is right now. Maybe you actually just have transparent hair styles, for example, and various hair-shaped colored backgrounds could be dynamically rendered behind them. I'm not sure how proven this idea is, but maybe we can reduce the amount of unique body components sprites you have to draw by using the GPU to render color values as parts of sprites. Solution 3: use hardware acceleration to color parts of sprites for you This would take some trial-and-error to get to render correctly. The other weird thing is that a "hero" would basically be an object consisting of several sub-objects held together a certain way. The tradeoff is that you'll also have to track the custom body pieces that the player set, and keep them. This still creates a lot of components to graft together, and it could still lead to janky-looking animations, but it could ultimately reduce some work with creating art assets. Suddenly your green-girl-haired elf head can be placed on top of a suit of armor, without the need to explicitly build out every permutation of the player's sprite. This is probably less crazy than option 1, in the sense that you're just splitting up pieces and making the game engine re-assemble them on-the-fly. Solution 2: split body parts into components It's really jarring for the player to try to pick up a rock, only to have your blue cape turn into a red one, because you're using a fallback animation. But it's labor-intensive, and a headache if you have to incorporate potentially many animations. If you have the time and energy, this is probably fine. Solution 1: Paint a lot of different versions of the same character How do you approach this? I have a few thoughts.

game maker palette swap for individual sprite

Maybe you can even swap out different outfits throughout the game as well, for either cosmetic or plot-specific reasons.

GAME MAKER PALETTE SWAP FOR INDIVIDUAL SPRITE SKIN

Problem: Let's say that you're making an RPG where the main character can be customized - this can include articles of clothing, but also skin tone, hair, gender, faces. I'm not overtly familiar with Lua yet, so I'll try instead to talk instead in loose conceptual terms. One thing that I've been musing about for a while involves different methods of rendering a custom player character.













Game maker palette swap for individual sprite