Latest Posts

Topic: idle animation

Dwarik

Topic Opener
Joined: 2009-05-11, 17:50
Posts: 42
Ranking
Pry about Widelands
Posted at: 2010-04-02, 23:59

https://blueprints.launchpad.net/widelands/+spec/idle-animation

please discuss especially what should be discussed is 1) what kind of file formats do we want in the (long) future to support face graphics (png snapshots or something else) 2) what kind of format do we want our carrier/conf file to have. how do we want to express different animations. this includes a possible overhaul for how walking directions are represented 3) ties in with my points 1 and 2 but how do we want to choose our animations, just cycle through them. certain intervalls, full programs (like production programs) etc etc


Top Quote
samithdisal
Avatar
Joined: 2010-03-08, 15:46
Posts: 66
Ranking
Likes to be here
Location: Sri Lanka
Posted at: 2010-04-03, 06:19

I put some ideas face-smile.png


NoOb KiWwaTa NoOb Ma NeWeI

Top Quote
death

Joined: 2009-04-13, 13:09
Posts: 40
Ranking
Pry about Widelands
Posted at: 2010-04-03, 11:47

Png works well for now, but lots of tiny files are resource hungry to read however its hard to find a suitable animated format... most animated formats don't do alpha too well or are otherwise limited. Mng might fit but its selection of creation/editing tools is limited. Perhaps using a simple zip container with the pngs(both the animation and the PC mask) and a manifest file, that would provide frame rate, presence of PC and hotspot would be most convenient.

As for multiple optional idle actions, this feature shoudn't be limited to carriers and should work for all idleing things. Idle actions might have other things than just animations associated with them, like sounds. One thing I see limiting on the current [idlefx] definition you have proposed is that all idle animations will need to share the frame rate.I dont know what it means to the plan, but just first thoughts I had.


Top Quote
samithdisal
Avatar
Joined: 2010-03-08, 15:46
Posts: 66
Ranking
Likes to be here
Location: Sri Lanka
Posted at: 2010-04-03, 11:53

MNG is a good solution but then i think a huge reimplementation of the graphics engine is needed.

For tools: we can use gimp or imagemagic to export ;)

Edited: 2010-04-03, 11:55

NoOb KiWwaTa NoOb Ma NeWeI

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-03, 12:50

there was already an attempt to implement MNG into widelands. I think it failed for some reasons. Also, I'd still like to see a proof of concept: are mng faster to load? are mng really smaller than a number of corresponding pngs?. I'd think reading MNGs is the toughest thing, as soon as stuff is in memory, things will be the same as they are now.

To the blueprint: The idle animations should just be eye candy, they should not alter the current functionality. That is it is the carrier must always jump back into pick things up on flags mode. That said, I'd think it would be the most flexible (and likely the easiest solution) to implement this as worker programs. Very little code must be changed for this, only a "pick next program randomly" action needs to be implemented: There is the master program idle, that just let's the carrier stand around that calls some smaller programs randomly that will show another animation. As soon as the carrier is needed, he jumps directly to the walking animation.

For implementation I'd suggest sticking to the current conf files and animation format. Maybe one future day we might implement those workers program as Lua scripts, but that is a way from here ;). For the moment, an overhaul of the conf files into a new custom conf file format is unwise, imho.


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

MNG inplementation hasn't failed, it's just it needs more work then I can currently afford. That said, It is in a semi-workable state, If I concentrated on it, I could probably make it be able to run some timing tests by the end of this week-end (especially since Monday's a national holyday here, so my week-end's longer :). But the code is still very hack-y, would fail on the code-checks sooooo badly, and so I wouldn't want anyone else to have to work with it yet.

But there's also issues with the encoder which I want to rewrite somewhat, to get some new features, and also I'm a bit torn between using libMNG or not, or maybe trying to make changes to libMNG (it's interface is, to say the least, ugly, and the package isn't maintained, but to touch it I'd have to learn a whole slew of other new things...), so it will need lot's of work 'till I'm satisfied it can go to trunk.

But, I looked around, and I still think MNG would be the best solution for open source games animations, the problem is just that because it's not wide-spread, noone takes the time to make the few modifications to get it into nice shape.

(As for size, there I can say for certainty that there is a 20%-80% size saving with mng compared to pngs, closer to 20% for workers, and to 80% with buildings (from which not many are animated yet), depending on wether part of the image stands still)


Top Quote
Dwarik

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

Kiscirke, if you put up a branch with your code i'd be happy to help out with beating the code into a style that gets it through the code-checks


Top Quote
ixprefect

Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-04-04, 22:39

If it's loading times you are primarily worried about, it might be worth looking into what 0 A.D. does, since it's open source now. I remember that Jan Wassenberg did some serious experiments on how to transparently pack lots and lots of small files into a big meta-file that is optimized for fast loading times (he wrote a thesis on this topic as well).


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

Dwarik: Ok, will do if it's at least in a workable state.

ixperfect: I tried to look this up, but I couldn't find anything on it. (I could download the game source and look in there, but it wouldn't run on my computer anyway, so I didn't do that yet.) So if you know it's explained somewhere (what he looked into, and what he settled to use in the end) I'd be glad if you pointed me to it, it would be more educational to me then just looking at the final solution.

Anyway as I see they use a 3D environment, so probably they have to store lot's of textures but not animations, and animations are where MNG would really shine: It could compress it pretty well (it just stores the difference between consequent images), and it could also act as a kind of preview, because right now someone working on media can only easily see the frames in their final size animated right there in the game, and then any MNG-enabled image viewer (there are quite some) would do.


Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-05, 23:30

ixprefect, do you know Jan? I just realized that he studies at the location I work at. I will try to contact him or his supervisor for his Studienarbeit tomorrow. Deriving from the title, I guess it is overkill for us: It investigates caching strategies, most likely to not keep all game data in memory at all times. We are just interested how to swallow as much as possible from disk to RAM.


Top Quote