A thought on flags, idle animations, and game performance

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

A thought on flags, idle animations, and game performance

Post by Darth Fool »

All, here is a thought that occured to me after looking at some of the really cool idle animations that are getting into the game. Basically, we have flags that are waving constantly, and idle unit animations that happen periodically. It occured to me that some performance or aesthetic value might be gained by having the flags operate the same way that idle animations work. Each flag would activate an idle animation at random intervals instead of waving constantly. I am not sure that this would actually make any real performance difference, but it might look better than the constant wind that seems to effect only village flags. Thoughts?
Dragon Master
Posts: 1012
Joined: February 11th, 2006, 1:04 am
Location: Somewhere

Post by Dragon Master »

Actually sounds more realistic and can speed things up a bit. I second it.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

I like the idea. But if used, we would need a base frame for the flag that wouldn't look extremely starched if displayed for more than a few milliseconds.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Post by Eleazar »

A flag that is supposed to hang down (like the undead one i recently did) naturally has a recognisiable non-blowing position. But i'm pretty sure a "normal" flag would look fake if it stopped moving for a while in any position but hanging straight down. Needless to say such a flag is a lousy recognition symbol, unless the wind died only for only perhaps 2 or at most 3 seconds at a time. I don't know if such brief periods of inactivity would have a performance advantage.

It would probably look nice if there was a variety to the flapping speed of a flag, but they can't just stop.

If we have performance issues, it's time to add another option, to turn off these extra animations. OAAB* I'm confident a normal-style non-flapping flag would be more convincing than one that would flap and then freeze for a while, unless it freezes in a completely windless pose—at which time there would be very few flag pixels showing.


* Options Aren't Always Bad
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
User avatar
Zhukov
Art Contributor
Posts: 1685
Joined: November 9th, 2005, 5:48 am
Location: Australia

Post by Zhukov »

I like it. The constant flag movement has often been something of an eyesore for me.
Tux2B
Posts: 1217
Joined: March 29th, 2005, 8:18 pm
Location: Toulouse (South of France)
Contact:

Post by Tux2B »

I don't even notice the flag movements anymore, actually.
In my opinion, having those new flag animations working as standing animations is a good idea, as long as you can turn it of as an option (like you can turn turbo off or on), because it can be an eyesore for some poeple who wouldn't be able to concentrate well enough. Moving flags is one thing : but when you see one of the units moving, it catches your attention much more efficiently.
"There are two kind of campaign strategies : the good and the bad ones. The good ones almost always fail because of unforeseen consequences that make the bad ones succeed." -- Napoleon
User avatar
Dragonking
Inactive Developer
Posts: 591
Joined: November 6th, 2004, 10:45 am
Location: Poland

Post by Dragonking »

Tux2B wrote:I don't even notice the flag movements anymore, actually.
Honestly, same here.
This is a block of text that can be added to posts you make. There is a 255 character limit
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Post by Jetrel »

I'm ambivalent about this - I don't really care either way.

• the flags do look better/more recognizable in a permanent "fully unfurled" state
• a fully realistic depiction would look better
• this isn't going to realize a "fully realistic depiction," but would be a step in that direction


In order to implement this properly, we'd need "limp" frames for flags, for when the wind dies down. Suffice it to say; I'm not jumping up and down as a volunteer to do that, although someone else is very welcome to try.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Must we not get the graphics engine rewritten (to use OpenGL or whatever) in the first place before we can add for example standing animations? That really should solve all performance problems, but of course we could add an option for disabling the flag animations in the meanwhile.

I'm not very keen on having the flags wave only now and then and staying static for half (or more) of the time, since I have a hard time imagining how it could look natural at all.

EDIT: Of course we could just have more animations for the flags to get them wave in more random patterns, too.
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Post by Jetrel »

zookeeper wrote:Must we not get the graphics engine rewritten (to use OpenGL or whatever) in the first place before we can add for example standing animations? That really should solve all performance problems, but of course we could add an option for disabling the flag animations in the meanwhile.
Yeah, openGL would work wonders - Allacrost uses it, and has patently obscene frame rates compared to ours. Of course, the trick is in how you use it, but that can be dealt with when the time comes.
zookeeper wrote:I'm not very keen on having the flags wave only now and then and staying static for half (or more) of the time, since I have a hard time imagining how it could look natural at all.
Well, that's what real flags do. I don't know if finland is like the dakotas, where the wind never stops blowing, but most places in the world, like my home, tend to have either very breezy/intermittent wind, or no wind at all.

Coastal europe (spain, north and west france, britain, and scandinavia) might be a bit unusual WRT wind, because they have the jet stream.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Jetryl wrote:
zookeeper wrote:I'm not very keen on having the flags wave only now and then and staying static for half (or more) of the time, since I have a hard time imagining how it could look natural at all.
Well, that's what real flags do. I don't know if finland is like the dakotas, where the wind never stops blowing, but most places in the world, like my home, tend to have either very breezy/intermittent wind, or no wind at all.

Coastal europe (spain, north and west france, britain, and scandinavia) might be a bit unusual WRT wind, because they have the jet stream.
I meant that if the flag waves for a few seconds, goes limp for another few seconds, starts waving again, goes limp, etc...it's definitely not like any wind I've ever seen. Sure, there are sudden gusts and breezes that can last a few seconds that wave the flag more and then pass for a moment, but the flag should keep waving at least a bit all the time. For a cycle where the wind stops blowing completely and then starts again would probably require at least minutes, instead of seconds. So any flag animation where the wind stops completely every 5-10 seconds is bound to look pretty unnatural (unless the wind is very soft to begin with, barely moving the flag at all).
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Post by Eleazar »

OK, i'm going off topic a bit:
The idle animations are kinda neat, but i'd like to see them deactivated during combat. Sometimes a unit doing an idle action looks like he's exercising leadership, and othertimes it's just distracting.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Eleazar wrote:The idle animations are kinda neat, but i'd like to see them deactivated during combat. Sometimes a unit doing an idle action looks like he's exercising leadership, and othertimes it's just distracting.
Sounds like a good idea. If an idle animation has started just before the combat, then IMHO it shouldn't be stopped (since it would be simply cut off), but any new ones shouldn't be triggered during combat (at least not within a radius of, say, 2 hexes from the fight, but it'd probably be simpler to just block all).
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

hmmm

not very easy to do...

the problem is that animations only know about what they are doing, not about others....

I might add "state" to the animation filter and then add the proper line so idle anims are not done if neighbour is attacking, defending or leading, but a two hex radius would be tricky and an "all block" would involve dirty hacks I don't want to do.

well, it's added to my todo list...
Fight key loggers: write some perl using vim
torangan
Retired Developer
Posts: 1365
Joined: March 27th, 2004, 12:25 am
Location: Germany

Post by torangan »

Well, you could implement a graph which represents all hexes and for each one add a field which records what animations are taking place there. This would allow you implement the range check with a limited depth DFS/BFS and the concept might be usefull for other types of surrounding hex checks as well.
WesCamp-i18n - Translations for User Campaigns:
http://www.wesnoth.org/wiki/WesCamp

Translators for all languages required: contact me. No geek skills required!
Post Reply