Page 1 of 1

Fake animation - turn IMPLEMENTED

Posted: Mon Aug 05, 2019 7:05 pm
by Stratego (dev)
i received many reqquests to unit to at least turn to their target - and maybe on moving direction by flipping the image.

i thought a "generated" way so we dont need to draw anything from the i can say thousands of unit images in all alternatives.

here is a way where the logic can flip automatically the image :
unit_teuton_turn.png
unit_teuton_turn.png (4.42 KiB) Viewed 3387 times
it has its drawback, if an unit is not symmetrical than would look not so nice changing hands of weilding a sword :)

but as on trebuchet or a tank would look better as that is symmetric.

any ideas?

Re: Fake animation - turn

Posted: Mon Aug 05, 2019 7:51 pm
by Stratego (dev)
also a tank, not that nice...

Re: Fake animation - turn

Posted: Mon Aug 05, 2019 7:59 pm
by Stratego (dev)
or this

Re: Fake animation - turn

Posted: Mon Aug 05, 2019 10:59 pm
by Puss_in_Boots
Oh like how Paper Mario - Super Paper Mario characters and enemies flip around? That'd be cool, my second idea on forum since I joined has resurrected in a new form.

Just make sure this doesn't happen to buildings(with exception of shielded ranged), it'd be weird.

I like the 2nd tank animation better, less space taking.

Also in mapeditor, it should probably play the animation and flip a placed unit whenever it is tapped on while the same unit is selected.

Re: Fake animation - turn

Posted: Tue Aug 06, 2019 6:37 am
by Stratego (dev)
yes, almost like mario, but i would not make a phase when the whole body is 1 pixel width when looking forward so i made only 2 other phases in angle of about 45degree (not rotation,, i used perspective tool)

Re: Fake animation - turn

Posted: Tue Aug 06, 2019 9:59 am
by Moh556
Can we do this for arrows and ...?
I mean when archers use bow . The arrow came to sky and go dawn again

Re: Fake animation - turn

Posted: Tue Aug 06, 2019 11:22 am
by Stratego (dev)
that is a different thing, open new topic if u like

Re: Fake animation - turn

Posted: Tue Aug 06, 2019 6:21 pm
by Dagravian
The one with teotonic knight looks nice... The ones with tiger looks ackward... I don't mind the unit being mirrored. But i think the 1-2px stage should not be skipped on the animation...

Re: Fake animation - turn

Posted: Thu Aug 08, 2019 3:02 am
by Gral.Sturnn
We would only need 2 sprutes per unit, just flip the normal one and the addition of an arrow to indicate the direction of the unit

Re: Fake animation - turn

Posted: Thu Aug 08, 2019 5:32 am
by Stratego (dev)
i dont understand the arrow thing.

this topic is about the idea that we only have 1 sprite (as we don on the thousands of units) and manipulating that one only. no one will make a next image for that housand sprites.

Re: Fake animation - turn

Posted: Tue Aug 13, 2019 2:11 am
by Puss_in_Boots
It doesn't take much time to mirror all images on an image manipulating software, but it'd be a coding nightmare than to just code for all images to flip left/right accordingly. It'd also save space as that wouldn't require a duplicate image if it's the same sprite anyways but mirrored.

Re: Fake animation - turn

Posted: Tue Aug 13, 2019 5:35 am
by Stratego (dev)
no nightmare at all.
and better in memory consumption too.

Re: Fake animation - turn

Posted: Tue Aug 13, 2019 1:02 pm
by Dagravian
I got a new question... Does that will affect units with animated imgs? I mean, the generator will flip all frames of the animation or just a single (first) one?

Re: Fake animation - turn

Posted: Tue Aug 13, 2019 1:42 pm
by Puss_in_Boots
I meant inserting 2nd img name for all JSONs in game by hand would be the nightmare. Instead of just a simple image mirror logic.

Re: Fake animation - turn

Posted: Tue Aug 13, 2019 2:31 pm
by Stratego (dev)
DoomsdayDragonfire wrote: Tue Aug 13, 2019 1:02 pm I got a new question... Does that will affect units with animated imgs? I mean, the generator will flip all frames of the animation or just a single (first) one?
if i can than it will animate while flipping.

if that is hard than only the first.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 9:04 am
by Stratego (dev)
ok, the first version of the logic is in AOS.
it is without animation, but it turns to the direction of attack or movement or any other action.

uos 10

please test it, and tell me if i missed to turn any unit images needed to flip to work in right direction.

in AOS all units are looking to right by default, so pelase make images this way from now.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:02 pm
by Puss_in_Boots
Right away I can tell that units flip left instead of keeping their last img when going up or down only.

But other than that, my mind was blown to see them flip when they moved or attacked to their left as I had never seen it before in this game.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:03 pm
by Stratego (dev)
Right away I can tell that units flip left instead of keeping their last img when going up or down only.
i see, on totally vertical actions it should not flip anywhere - ok i go fix it.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:13 pm
by Puss_in_Boots
So the units that I caught facing left were:
-Fire Archer
-Huntress
-Dogmatix

*And every seige weapon that isn't a battering ram or ballista.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:16 pm
by Stratego (dev)
yes they are already set to be lefty, or are they moving wrong-opposite way now?

update: fire archer and huntress and dogmatix was worng, fixed -thanks!

but i think all siege is ok - arent they? if not tell me one that is not good - thanks!

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:24 pm
by Puss_in_Boots
Only the seige mantlet doesn't turn.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:31 pm
by Stratego (dev)
good!
it is fixed too!

if u say that is all -> i build a new one uploading to server - thanks!

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:35 pm
by Puss_in_Boots
Forward facing unit imgs aren't going to flip right? For example there is janissary unit that doesn't turn, but it doesn't seem to face right or left either.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:36 pm
by Stratego (dev)
those will be flipped too but will not matter actually :)
tell me if i can update the version.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:41 pm
by Puss_in_Boots
Yeah it works well as it is, even the trojan horse flips.

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 12:48 pm
by Stratego (dev)
ok building a new uos 10 - thanks!

Re: Fake animation - turn

Posted: Mon Aug 19, 2019 2:52 pm
by Stratego (dev)
also please keep your eyes on buildings, none of them should "turn" to direction they shoot (like towers) lol :)