[Solved]Bring hero back?

Started by Zefk, May 01, 2017, 04:38:40 AM

Previous topic - Next topic
May 01, 2017, 04:38:40 AM Last Edit: May 02, 2017, 05:24:09 AM by Zefk
I am wondering if there is a way to being the hero behind other entities without changing the layer. The reason is for my push and pull animation.

I tried hero:bring_to_back(), but the documentation does mention that the hero is not affected by this.

Animation looks funny:
Changing the length of her arms and legs would make her look like she is doing some sort of monkey dance. The only way this could work is if I make the excuse that she has telekinesis psychic powers.


Hero needs to be sent to back:




What I want it to look like, but it has a bug: (In this case...I chopped the heroines legs off.)



I would need to cancel the push/pull animation for everything, but the block. What would be the best way to disable push and pull for everything, but the block entity?

Quote from: Zefk on May 01, 2017, 04:38:40 AM
I am wondering if there is a way to being the hero behind other entities without changing the layer. The reason is for my push and pull animation.

I tried hero:bring_to_back(), but the documentation does mention that the hero is not affected by this.

Animation looks funny:
Changing the length of her arms and legs would make her look like she is doing some sort of monkey dance. The only way this could work is if I make the excuse that she has telekinesis psychic powers.


Hero needs to be sent to back:




What I want it to look like, but it has a bug: (In this case...I chopped the heroines legs off.)



I would need to cancel the push/pull animation for everything, but the block. What would be the best way to disable push and pull for everything, but the block entity?

Hmm... maybe for entities/heroes/etc. drawing order should be determined by tile position? So that entities in tiles with lower Y get drawn first, giving the effect that you wish.

May 01, 2017, 06:27:29 PM #2 Last Edit: May 01, 2017, 06:36:44 PM by Zefk
QuoteHmm... maybe for entities/heroes/etc. drawing order should be determined by tile position? So that entities in tiles with lower Y get drawn first, giving the effect that you wish.

Maybe the hero should have a Z order function. Kinda like how the custom entity has a y order function or maybe the hero should only be able to push and pull on blocks.

1. One way at the moment to solve this problem is by making a funny looking push/pull animation. That would be done by pushing her legs up and extending the arms.

2. The second way would be by having another block entity follow the block entity on a different layer. I do not know the kind of weird effects this will have.

IMO, the best solution is to adapt the art to these engine limitations (related to bounding boxes and traversable properties), and hence these limitations have to be taken into account during the creation of the art. Some of these limitations may just be the way Solarus works (or maybe not, only Chris knows this), so maybe sometimes there is no other solution than re-drawing.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

Could you cut off the tops of the bookshelves and draw the tops on a higher layer? That way the hero would naturally be behind them without having to change the layer of the hero.

QuoteIMO, the best solution is to adapt the art to these engine limitations (related to bounding boxes and traversable properties), and hence these limitations have to be taken into account during the creation of the art. Some of these limitations may just be the way Solarus works (or maybe not, only Chris knows this), so maybe sometimes there is no other solution than re-drawing.

The animation just looks funny when trying to adapt the art to this limitation. I setup a few animations before posting, but it would just look better if I was able to bring the hero behind the block entity.

QuoteCould you cut off the tops of the bookshelves and draw the tops on a higher layer? That way the hero would naturally be behind them without having to change the layer of the hero.

That is a good idea, but I will just go with one of the funny animations I created...


I agree with llamazing. Actually I was refering to the blocks case: in this case, just modify the origin point of the hero sprites. I guess that there is no need to modify the art to solve this issues.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

May 02, 2017, 05:23:30 AM #7 Last Edit: May 02, 2017, 05:26:13 AM by Zefk
I just released v2 of my sprite. In case anyone wants to see the new push and pull animation.



I guess this post is not an issue anymore, but it would nice to be able to "bring the hero back" in the future.