hughrock18
Member
I COMPLETELY understand the concept of using surfaces (or shaders) to overlay one sprite image on top (or below) another.
Is that the only way(s) to do it though? If I want to, for example, overlay a player sprite with an armor sprite (sub images and all), are surfaces/shaders the only ways to do it? The sprite_merge function SOUNDED like it'd do what I wanted at first, but after reading the documentation, it seems like it'd only place the sub images of one sprite at the end of the other.
Is there a better way? I'm not too keen on the thought of looping through each sub image index (up to 8 per sprite at 128x128px) and using surfaces to draw one sprite over another. I'm not as confident with shaders (at least not enough to pull this off. I'm still relatively new to the subject). I thought of using the surface idea to create multiple sprites that would be cleared from memory when no longer used (instead of drawing the surface itself each step). That way, the code would loop through the sub images, making 1 surface at a time and appending it (got to remember how) to the end of a newly created sprite. The only issue I feared with that was the time it'd take for the device to cycle through the many sprites that'd need this. Even if it cycled only once, we're talking about a couple hundred sprites at the end of it all. I could run this once at the beginning of a room and just for the sprites within that room, but each sprite has so many directions and actions they can take... maybe I'm overthinking this. It's a lot to setup for testing on this scale...
Just to be clear. Each sprite has 8 directions, and (up to) 12 actions that they can perform. Leg sprites, body sprites, and head sprites all drawn to move in sync create a body. You can do multiple tasks while walking and running. Seemed easier than redrawing the same stupid leg animations over and over, and requiring a "walking" version and a "running" version of each action. This isn't even taking into account the armor you can equip to your character that would be drawn on to the near-naked leg/body/head sprites.
Anyone have any experience with this? I know I asked this already, but seriously, is there a better way? Any information would be appreciated. Thanks everyone!
Is that the only way(s) to do it though? If I want to, for example, overlay a player sprite with an armor sprite (sub images and all), are surfaces/shaders the only ways to do it? The sprite_merge function SOUNDED like it'd do what I wanted at first, but after reading the documentation, it seems like it'd only place the sub images of one sprite at the end of the other.
Is there a better way? I'm not too keen on the thought of looping through each sub image index (up to 8 per sprite at 128x128px) and using surfaces to draw one sprite over another. I'm not as confident with shaders (at least not enough to pull this off. I'm still relatively new to the subject). I thought of using the surface idea to create multiple sprites that would be cleared from memory when no longer used (instead of drawing the surface itself each step). That way, the code would loop through the sub images, making 1 surface at a time and appending it (got to remember how) to the end of a newly created sprite. The only issue I feared with that was the time it'd take for the device to cycle through the many sprites that'd need this. Even if it cycled only once, we're talking about a couple hundred sprites at the end of it all. I could run this once at the beginning of a room and just for the sprites within that room, but each sprite has so many directions and actions they can take... maybe I'm overthinking this. It's a lot to setup for testing on this scale...
Just to be clear. Each sprite has 8 directions, and (up to) 12 actions that they can perform. Leg sprites, body sprites, and head sprites all drawn to move in sync create a body. You can do multiple tasks while walking and running. Seemed easier than redrawing the same stupid leg animations over and over, and requiring a "walking" version and a "running" version of each action. This isn't even taking into account the armor you can equip to your character that would be drawn on to the near-naked leg/body/head sprites.
Anyone have any experience with this? I know I asked this already, but seriously, is there a better way? Any information would be appreciated. Thanks everyone!