Multiple classes

Hello all, despite learning so much I am still no doubt a noob. SO I have a shop in my game that lets players buy upgrades, When buying, Is texture swapping is the best choice for my game? The problem is this creates a lot of synarios. For eg, if I have helmet, chest guard and shield I must create textures for the same character for all possible out comes. Is there any way to shortcut these issues. I have a a feeling the answer is no for what I need. Right well thanks for letting me vent on you all lol.
 
Ok, a 3d artist by trade but I think the best way to approach this is to create the armour your need replicating the sprites your character has and just overlay it. If I am wrong, come at me bro... messin, love you all
 

TailBit

Member
I would guess it is the same general idea as drawing gear on top of a character .. but I don't really meddle with textures and 3D, so correct me if there is a better way:

- create a surface, set it as draw target
- draw your character sprite that you use as texture onto the surface
- draw his gear replacements over the correct positions
- turn surface into sprite that you will use as new texture
- clear surface as draw target, delete surface

Just make sure you get rid of all memory leaks pitfalls .. because this is prone to it ^^;;
 

Yal

šŸ§ *penguin noises*
GMC Elder
One idea is to make a "skeletal animation" style system where you have one sprite for each limb in each armor set, and then can combine them as you please. (This mega-engine uses this for most characters). The drawback of this approach is that you easily end up in cheap mobile game-looking territory, with very unnatural animations.
1616937544835.png
 
Top