|
Development Forum |
 |
| Layering sprites in an agent? | |
|
 Chaotic Spriter
mea
  

|
3/4/2014 | |
I'm not a coder, so I don't know if it is possible or how difficult it is, but since I am helping with the sprites for a project, the coder & I thought it would be best to ask first before I make sprites for something that might be not be possible or might be too difficult to code.
Is it possible to have a food agent with multiple layers for one piece of food? Basically the agent will have a lot of possible variations at one stage, & is intended to be a two bite meal. Rather than editing all those variations into new sprites with a bite out of them, how hard would it be to code a bite mark sprite to appear on top of them?
|
 Sanely Insane
RisenAngel
     Manager

|
3/4/2014 | |
It sounds like what you're trying to accomplish is to make a compound agent with an inert "piece," which is quite possible. Have the agent spawn as it would as a simple agent (but use new: comp instead of new: simp), and then use the pat: dull command in the eat script to add the image for the bite mark.
However, this comes with a caveat: For the usual sort of bite mark (that is, viewed from the side with a good chunk of the food now missing), this won't work as I believe there is no way to "hide" visible parts in this manner. If you want to go that route, then your only option is to make "bitten" versions of all those variations.
~ The Realm ~
Risen Angel's Creatures Blog
|
 Peppery One
Papriko
    
|
3/4/2014 | |
Or you make the base already bitten and then use the pat: dull parts to cover up the bite marks. Then, when getting eaten, you gradually remove them again.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Chaotic Spriter
mea
  

|
3/4/2014 | |
I'm going with a slightly different style with the bite mark this time. The bite mark will be seen more from the front this time, so it won't cut away the edges of the food sprite, so that's not a worry this time.
Is it also possible to use that same method to make a special in-between sprite for different stages? For example -to make the 'almost ripe' sprite that would come between the last of the 'growing' sprites & the 'ripe' sprite, & to make the 'starting to decay' sprite that would be between the 'ripe' sprite & the 'decaying' sprite. Since there are so many 'ripe' variations, we are wanting to have the growth & decaying sprites to be the same & shared by all the variations. |
 Peppery One
Papriko
    
|
3/4/2014 | |
Not sure what you mean right now. Maybe transparency helps? But that is somewhat resource-intensive and would make it DS-only, since C3 is too old for that.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Chaotic Spriter
mea
  

|
3/4/2014 | |
Sorry, I didn't mean to make things confusing.
I'll try to explain it again, this time with with example sprites. (The sprites are just something I made quickly for this explanation, & so I wouldn't give away the surprise of the agent being worked on.)
Can the compound agent with an inert piece method be used to make an in-between or transition sprite between two different sprites/stages?
2nd to the last sprite in the growth stage - 
The 1st sprite of the ripe stage - 
The sprite i want to layer on top of the 1st ripe sprite - 
Can the sprite be layered on top of the sprite for the final sprite of the growth stage? |
 Peppery One
Papriko
    
|
3/4/2014 | |
When you mean it as shading, then yes. When you try to make the blue part actually get the C-shape of the green one, then the answer is sadly no.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Prodigal Sock
Ghosthande
    

|
3/5/2014 | 2 |
Going with your original question--that the actual shape of the food item won't change when it is bitten--then yes it is completely possible.
It's also worth mentioning that even inert compound parts can have their pose changed, which makes them quite a bit more useful than if they were literally just static. This means you can have multiple frames for the same overlay... say, if each one has fewer visible pixels, like how C3 agents fade when they rot, the base sprite would be revealed gradually and it would appear that the fruit is ripening into a certain color. No need to create and delete multiple overlays, necessarily, since you can just change the pose of the same one as many times as you needed.
 |
 Chaotic Spriter
mea
  

|
3/6/2014 | |
That is almost exactly what I had in mind Ghosthande. Thank you everyone for your answers & help. |