Currently Online

Latest Posts

Topic: idle animation

chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-04-23, 21:17

ixprefect wrote:

Regarding animation control: Walking speed cannot be adjusted at the moment. Sequences of animations can be scripted inside the bob programs. E.g. when you have a lumberjack, it contains a program that describes how the lumberjack goes to a tree and cuts it etc. In this program, you can of course also specify multiple animations directly after one another.

I'll look more closely at the lumberjack for examples. By "bob programs" are you referring to their corresponding conf file or something else? And is it something a graphician (i.e. non-coder) could/should experiment with?


I see little people.

Top Quote
ixprefect

Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-04-24, 13:00

Yes, I'm referring to the conf file. For example, in the barbarians' lumberjack's conf file, you find a program called [chop]. Feel free to experiment with that, change animations, etc.

Of course, there is a limited set of commands available (which should be documented somewhere, though I don't remember the link). To extend them, changes to the source code are needed, but e.g. changing some animations around is not a problem.


Top Quote
Kiscsirke
Avatar
Joined: 2009-12-16, 13:40
Posts: 42
Ranking
Pry about Widelands
Location: Budapest, Hungary
Posted at: 2010-04-24, 19:55

Okay, I uploaded a MNG branch up to launchpad. It has working MNG decoding, and I converted most of the barbarian tribe's files to mngs. I'd be happy if you guys tested whether it

  • works on Linux (and Mac) as well (I think it should, but who knows?), and
  • how much speed increase you get on loading.

Note that you should test with games with only barbarians, because only they are converted so far. (For me the speed increase is significant, at least 3x as fast).

Dwarik: If you'd like to try to bring the code into shape, you are welcome to do so, but be aware that it's pretty undocumented and ugly so far, it's more like a proof-of-concept. But nowadays I won't have the time to work on it, so any help is welcome face-smile.png

Sooo you can find it here.

Edited: 2010-04-24, 21:59

Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-04-25, 18:58

ixprefect wrote: Yes, I'm referring to the conf file. For example, in the barbarians' lumberjack's conf file, you find a program called [chop]. Feel free to experiment with that, change animations, etc.

I think I'm beginning to understand the current capabilities with the conf file. I pushed a branch with multiple animations for the barbarian farmer. You can find it at https://code.launchpad.net/~chuckw20/widelands/Add_new_barbarian_farmer_worker

Of course, there is a limited set of commands available (which should be documented somewhere, though I don't remember the link).

I would LOVE to get my hands on any doc about the conf file. Heck, I'll even search the source code if I knew where to start to look. face-smile.png

To extend them, changes to the source code are needed, but e.g. changing some animations around is not a problem.

dwarik: I'd like to discuss what features may require source code changes. I'll try to lay out my "wish list" and will post it here in a couple days or sooner if that's okay with you.


I see little people.

Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-04-25, 20:14

Kiscsirke:

Kiscsirke wrote: Okay, I uploaded a MNG branch up to launchpad...

I downloaded your branch and compiled it for linux.
From fresh boots each time, the mng files loaded in 2/3's the amount of time that the png files needed to load.

Edited: 2010-04-25, 20:14

I see little people.

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-25, 21:14

Nice job Kiscsirke!!

I tried too: ./widelands --editor did not start. I tried with a map with only me as barbarians. Best of three: trunk 4.3s (100%), your branch 3.2s (74,4%). So there is a speedup, but not a complete ownage one.


Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-04-26, 20:52

Dwarik: Here is my list of animation-related features that would be desirable:

  1. A true "work" program for the builder worker that would allow playing a different animation depending on whether the builder has material on hand to work with. -

    Currently the idle cycle is being used as a work cycle and when a true idle condition arises, the builder graphic vanishes. I've tried providing this "idle" activity by animating the builder within the constructionsite's idle cycle graphics, but this continues to play when the builder starts working again yielding what appears to be two builders where there was once only one.

  2. A second walk program for the hunter in order to run a different animation when he is actively pursuing an animal. -

    With only one walk cycle currently, the same animation must be used for normal walking on the roads to his hut and for stalking during a cross-country hunt. (This feature might also be employed for soldiers to differentiate between road travel and attacking an enemy.)

  3. In connection with #2, an ability to control rate of travel ideally from a parameter in the worker/bob conf file. -

    For example, a wounded soldier might not travel as quickly as a healthy one. An ox might not travel at the same rate as a fox, etc.

  4. With the hunter and fisher, the ability to play different animations depending on their orientation to the target. -

    Currently the hunter and fisher can only face one direction which is not always "facing" their target (animal/fishing hole). This yields some rather curious activity like stabbing at thin air and catching fish on dry land.

  5. Speaking of stabbing at air, terminate the animal's walk cycle when the hunter's work (kill) cycle is triggered in order to avoid the animal walking away and then turning into meat at some distance from the hunter.

  6. An ability to play different animations for wounded soldiers v.s. healthy ones, like limping on a return/retreat or charging with weapons drawn.

  7. For the carriers in particular, an ability to play various animations in random sequences. -

    So they don't end up looking like copy cats of one another or worse, synchronized like a drill team. This randomization might also be employed with animating flags, trees, etc.

If any of these features can already be exploited, please forgive my ignorance and let me know how I can put them to use.

I welcome your comments and any additional features that might come to mind.


I see little people.

Top Quote
Dwarik

Topic Opener
Joined: 2009-05-11, 17:50
Posts: 42
Ranking
Pry about Widelands
Posted at: 2010-04-27, 20:56

i think many of these goals can be archieved if we allow animation programs/alternate animations and a way to trigger them (set up checks when to go to the next program)

the alternate/idle ones will be easy

the changing animation depending on target location (rather than walking direction) might get trickier

i'll update the blueprint with some of these ideas


Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-27, 22:10

We once discussed that resources (coal, iron, fish, gold, granit) should be properties of the triangles, not the fields. This would allow to have directed fishing animations (for example). Eric already implemented some stuff for this: on load the resources are somewhat averaged, but they are not yet true properties of the triangles. Might be worth considering if we should implement this prior to the blueprint; I guess it should not be too difficult.


Top Quote