Fake animation - turn

Any other ideas that does not fit to the specific categories.
Post Reply
Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Fake animation - turn

Post by Stratego (dev) » Mon Aug 05, 2019 7:05 pm

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 194 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?

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 05, 2019 7:51 pm

also a tank, not that nice...
Attachments
tiger_turn.png
tiger_turn.png (22.01 KiB) Viewed 191 times

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 05, 2019 7:59 pm

or this
Attachments
tiger_turn2.png
tiger_turn2.png (17.72 KiB) Viewed 185 times

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 05, 2019 10:59 pm

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Tue Aug 06, 2019 6:37 am

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)

Moh556
Posts: 297
Joined: Sun Nov 18, 2018 2:43 pm
Location: Iran

Re: Fake animation - turn

Post by Moh556 » Tue Aug 06, 2019 9:59 am

Can we do this for arrows and ...?
I mean when archers use bow . The arrow came to sky and go dawn again

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Tue Aug 06, 2019 11:22 am

that is a different thing, open new topic if u like

User avatar
DoomsdayDragonfire
Posts: 685
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Fake animation - turn

Post by DoomsdayDragonfire » Tue Aug 06, 2019 6:21 pm

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...
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻

User avatar
Gral.Sturnn
Posts: 1039
Joined: Tue Feb 13, 2018 11:29 pm

Re: Fake animation - turn

Post by Gral.Sturnn » Thu Aug 08, 2019 3:02 am

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
~Gral.Sturnn

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Thu Aug 08, 2019 5:32 am

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.

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Tue Aug 13, 2019 2:11 am

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Tue Aug 13, 2019 5:35 am

no nightmare at all.
and better in memory consumption too.

User avatar
DoomsdayDragonfire
Posts: 685
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Fake animation - turn

Post by DoomsdayDragonfire » 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?
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Tue Aug 13, 2019 1:42 pm

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Tue Aug 13, 2019 2:31 pm

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.

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 9:04 am

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.

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 19, 2019 12:02 pm

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 12:03 pm

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.

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 19, 2019 12:13 pm

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 12:16 pm

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!

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 19, 2019 12:24 pm

Only the seige mantlet doesn't turn.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 12:31 pm

good!
it is fixed too!

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

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 19, 2019 12:35 pm

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.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 12:36 pm

those will be flipped too but will not matter actually :)
tell me if i can update the version.

User avatar
Puss_in_Boots
Posts: 2377
Joined: Fri Apr 21, 2017 1:23 am

Re: Fake animation - turn

Post by Puss_in_Boots » Mon Aug 19, 2019 12:41 pm

Yeah it works well as it is, even the trojan horse flips.
RED, WHITE and BLUE!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 12:48 pm

ok building a new uos 10 - thanks!

Stratego (dev)
Site Admin
Posts: 8814
Joined: Fri Apr 25, 2014 9:28 pm

Re: Fake animation - turn

Post by Stratego (dev) » Mon Aug 19, 2019 2:52 pm

also please keep your eyes on buildings, none of them should "turn" to direction they shoot (like towers) lol :)

Post Reply

Return to “Others”