Impossible to find suitable wares position for carriers and beast of burdon alike.

Bug #837239 reported by Astuur
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands media development
Fix Released
Low
Unassigned
widelands
Fix Released
Low
Unassigned

Bug Description

When you look closely at the game, you'll find that wares carried above their heads by our carriers may look fine, but for the oxen, donkeys and horses, the wares hover visibly above their backs.
Can code help to solve this?
A possible graphical solution may be to attach some basket, saddle or other contraption to the back of these animals.

Related branches

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Yes, you are right. From what I can see code changes are not necessary, merely tweaking the hotspot for walkload in the conf-files (like tribes/barbarians/ox/) so work. Feel free to suggest changes ;) , though please test with a wide selection of wares to ensure it is an improvement overall.

Baskets and saddles sounds like a good idea, but when considering the various sizes and shapes of all the wares I think it will be hard to find a way to make these look natural. Any thoughts from the graphics team?

Changed in widelands:
importance: Undecided → Low
milestone: none → build17-rc1
status: New → Confirmed
tags: added: gamedata
Revision history for this message
Astuur (wolfsteinmetz) wrote :

You easily end up with the hands of the carrier sticking through the ware into the air, when the hotspot
is adjusted for the animals.
Almost sure that we cannot find a solution with just manipulating the hotspt - not for all the wares in any case.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

Changing the hot spot on the burden beasts alone will not solve the problem. It would result in changing the position of the animal on the road. IMO, the best approach in this case is to add something to the back of the animals to bring it to the same height as the carriers' hands. Hence pack saddles or panniers seem the way to go.

Chuck Wilder (chuckw20)
tags: added: graphic
removed: grahics
Changed in widelands-media:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

>Changing the hot spot on the burden beasts alone will not solve the problem. It would result in changing the position of the animal on the road.

Please ignore my comment above. I turns out I misunderstood how this hotspot worked. When changing it, I saw the wares floating higher above the workers so I assumed it adjusted the ware's position. However, when experimenting a bit more it turns out it actually controls the carrier and pushes the worker off the road. Sorry about that.

So how is the ware's position calculated, anyway? Is this some hardcoded value in the code used by all the different carriers? I remember helper-carriers (oxen, horses, donkeys) were added later so initially only one value would be needed.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

From what I have observed (and a coder would have to verify this), the graphics engine positions and keeps the ware hot spot a fixed distance along the "y" axis for it to appear to be "above" in relation to the carrier's hot spot once the carrier "takes possession" of the ware. As the location of the carrier's hot spot changes, the ware's hot spot changes accordingly to keep its relative position to the carrier's hot spot.

I find that, as a rule, if I designate the coordinates of the ware's hot spot in the conf file somewhere near the physical center of the ware graphic, the image is usually positioned acceptably.

The hot spot of the carriers/workers who as a rule travel by road, is used to move their images with respect to roads. Because of this, it appears that the game engine positions the carrier's hot spot on the road. Therefor, I designate a coordinate between the feet of a carrier/worker.

The only coding solution I can see that could resolve this issue would be to introduce into the conf file of the carrier/worker/burden beast a variable that could be used to customize that distance between the carrier's hot spot and a ware's hot spot. The value of this variable would be unique to each worker/carrier/beast and be used for all wares that carrier would convey. This, as I see it, would allow a ware with a fixed hot spot to be carried at different heights by workers of differing, well, heights! :)

Revision history for this message
SirVer (sirver) wrote :

I think the proper solution is the coding solution: add a new property for carriers in the conf file that adjusts this hotspot. The fix should be very easy to implement, even for a new coder.

I do not think graphic changes should be made IF the elder of graphics is happy with the looks of the current animals.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

As Elder of Graphics, I am always open to suggestions to improve the visual experience of Widelands. In this case, however, I would welcome the coding/conf file solution. :)

It should go without saying, of course, that this solution should be available to ALL workers and burden beasts, (i.e. road walkers), because those bobs all have the potential to transport wares.

Also, it may be wise to keep this point in consideration when coding for water transport, if wares ill be visible during that conveyance.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

Of course, I MEANT to type, "...if wares WILL be visible during that conveyance." :)

Revision history for this message
Chuck Wilder (chuckw20) wrote :

Unless it is a rough crossing, in which case it is conceivable the wares could get sea sick.....

I'll stop now. :D

Revision history for this message
Shevonar (shevonar) wrote :

As a very new coder I wouldn't say it was "very easy to implement" but it was a good task to get into the code. In the end I only had to change/insert 7 lines. Considering the fact that it took me several hours this is kind of depressing. However I'd love to contribute more in the future :)

About the fix: All workers kann have a "ware_hotspot" attribute in there conf file. If there is no such attribute, the default value is "0 15" (for carriers). For the burden beast some fixed positions are included.

Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
Shevonar (shevonar) wrote :

I have created a branch for my fix and added it here. Also changed status to the appropriate one.

Changed in widelands:
status: Fix Committed → In Progress
Revision history for this message
SirVer (sirver) wrote :

Merged in 5977. This is now only a graphic team bug and only requires conf file tweaking. shevonar, I added you as shevonar on the developers list. If you want to appear with your real name, please state it here or write me a PM on the widelands.org website.

Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
Chuck Wilder (chuckw20) wrote :

Thank you, Shevonar! This will provide us graphicians much more latitude in designing and animating the workers. I can foresee it being of great value with water transport. We might even be able to introduce wheeled carts to help ease some of the carriers' backs! :)

Again, many thanks!

Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
Changed in widelands-media:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.