Code for Display of Oversized Portraits Needs Explanation

Discussion and development of all aspects of the game, including AI improvements and new engines.

Moderators: Developers, Forum Moderators

Code for Display of Oversized Portraits Needs Explanation

Postby Wussel » September 1st, 2013, 9:07 pm

I made some tests in Wesnoth 1.10 and got hit by canvas size error. A search found only a similar problem by Doofus.
viewtopic.php?f=6&t=37879&start=255#p553169

When will this error be triggered? Can it be avoided? I got the impression that it applies to profile/portrait. Could an image with message be bigger?

Did the semi transparent speech area get smaller? Can I get it back to old size? I am under the impression, that Wesnoth 1.6 scaled all pictures to 80% on standard wide screen laptops. Do I have to do thast by code in 1.10? What would be the code?
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Postby Dugi » September 1st, 2013, 9:19 pm

The problem Doofus mentioned was related to a bug in the iOS port. I believe it is not your case. Can you describe the problem in a more detailed way, like which WML snippet with which pictures caused it?

I have never had any problem with canvas size related to portraits, but I had the hell a lot of them with GUI lua.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3156
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: canvas size error

Postby Wussel » September 3rd, 2013, 1:13 pm

We are talking about oversize pictures here. There is an error code now in 1.10. It is triggered if you have picture bigger than 500x500. I am telling you a secret now and hope that is not making things even worse in the future: 800x500 and 500x800 can be displayed. But 700x 560 will cause the error.

More over really annoying: The long picture is scaled by DIFFERENT amounts according to length and maybe screen resolution. Totally odd numbers. For 800 it is roughly 5/6 for me.

The wide picture is displayed as it is with no automatic scaling. This is really useless. If you want to add speech bubbles with this blit function you need more canvas size!

Could somebody please enlighen us, what the code is doing? Before there were Wesnoth crashes, if you exceeded the screen size. Scaling was allways the same (for me 80%). Now there is the canvas size error at levels which could be displayed and the campaigns get closed, but Wesnoth is not crashing anymore.

This is completly useless from the user point of view. I admit, that a programmer might think it is a solution to prevend crash reports from Wesnoth at large.

Best Solution would be:
Whatever picture is there, gets dsplayed. What does not fit gets truncated at the end of the window. Scaling can be set manually in preferences like 100%, 80% 60% 40%. A note should be given what setting for which device would be best.

It could be so simple. Why force user like Doofus to scale his portraits down to 500x500???

Please write some clear instruction on the behavior of Wesnoth, when displaying oversize pictures. Finding it out by try and error is really time consuming. Doofus mentioned his time too.
.
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Postby Dugi » September 3rd, 2013, 1:51 pm

Darn, you still didn't explain when does it happen. When you're using a classical [message]? When using [story]? When using wesnoth.show_dialog? When it is a halo? You might possibly be using all of these for dialogues with speech bubbles.

I have encountered problems with image size when using wesnoth.show_dialog, in some cases it's total craziness, but judging from your other posts, it is not very likely that you're using it.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3156
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: canvas size error

Postby Wussel » September 3rd, 2013, 9:09 pm

Oh, sorry. Stoy is no problem. Allways scaled perfectly to fit screen. I am talking about pictures beeing displayed with messages like portraits and other.

Pseudo code for crashing Wesnoth:

Crash-Event
...Message =bla
...Image=oversize
/Crash-Event
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Postby Dugi » September 4th, 2013, 12:00 pm

If I was you, I'd fill a bug report, find the largest size that does not crash it and use it as canvas (because it usually takes ages till a reported bug is fixed). Alternatively, you might write the scenarios in a way that they can be restarted at any point (saving all units and progression somewhere), at the time of a dialogue start a dialogue scenario and use the resizing in [story] and then restore the scenario (but this isn't easy nor comfortable).
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3156
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: canvas size error

Postby Wussel » September 4th, 2013, 12:40 pm

This is not a bug. It is a feature.
Just not a usefull one. There is a mole somewhere in the project, who is making Wesnoth less open and less finished.
Maybe somebody just afraid, that there will be nothing more to do.

Bug report:
http://gna.org/bugs/index.php?21104
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Code for display of oversized portraits needs explanation!

Postby Wussel » September 25th, 2013, 11:57 am

Somebody changed it for the 1.10 version. Could somebody please check the code and explains what it does? Users like doofus do like to display oversized portraits. (angel with wings and such)

Based on my testings my computer can display 800x500 and 500x 800 but not 800x800. The tallpicture gets scaled differently depending on hight. The wide picture does not get scaled.

Please understand that these 2 things in combination are extremly annoying. Best would be to allow all sizes and allway scale them to windows size, if to big. If somebody wants to use oversize pictures and cares about proportion, they could allways use same canvas size.

THE QUESTION IS: What is the Wesnoth code actually doing??? Please answer if there is anybody who knows.
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: Code for display of oversized portraits needs explanatio

Postby Max » September 25th, 2013, 1:57 pm

if i'm not mistaken this is closely related to another thread of yours:
viewtopic.php?f=21&t=39311

you've already created a bug report and have been asked to provide feedback on how to reproduce this issue. sounds like this could be done be just replacing a core image that is used in the first scenario of a mainline campaign with one of a larger size...

my apologies if these are two different issues...
Max
Forum Regular
 
Posts: 1439
Joined: April 13th, 2008, 12:41 am

Re: canvas size error

Postby Turuk » September 25th, 2013, 2:11 pm

I have combined your new thread into your current thread on the same issue.

Please do not create multiple threads on the same topic.
Maintainer of AOI and TB.
Maintainer of UMC 1.11: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
Turuk
Sithslayer
 
Posts: 4990
Joined: February 28th, 2007, 8:58 pm

Re: canvas size error

Postby Wussel » September 26th, 2013, 12:19 pm

Combining is ok. BUT THIS IS NOT A WML ISSUE!

Please move to coders corner. The problem has NOTHING to do with WML. Therefore shift everything to CODERS CORNER!

Thanks for your support!

Please use the new headline, as it is more descriptive.
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: Code for Display of Oversized Portraits Needs Explanatio

Postby Turuk » September 26th, 2013, 12:57 pm

Posting Guidelines wrote:a. Write clearly (#)
...No SHOUTING in threads — it’s rude and won’t get you anywhere...



Moved to the proper forum and title changed on request.

In the future, watch the use of caps lock.
Maintainer of AOI and TB.
Maintainer of UMC 1.11: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
Turuk
Sithslayer
 
Posts: 4990
Joined: February 28th, 2007, 8:58 pm

Re: Code for Display of Oversized Portraits Needs Explanatio

Postby Wussel » October 2nd, 2013, 10:44 am

I have to learn how to use the posh green color. Is bold or underline still allowed?
Is my question really so difficult? Nobody knows how art is displayed in this game?

Somebody changed the code for 1.10. I am not asking why. I just want to know what.
Wussel
 
Posts: 159
Joined: July 28th, 2012, 5:58 am

Re: Code for Display of Oversized Portraits Needs Explanatio

Postby Turuk » October 2nd, 2013, 11:11 am

Wussel wrote:I have to learn how to use the posh green color. Is bold or underline still allowed?


The color is for moderators, and the Posting Guidelines are still at the top of each page.

Wussel wrote:Is my question really so difficult? Nobody knows how art is displayed in this game?


No, but a developer who knows might not frequent the forum that often to have responded yet. Most of them are available on IRC.
Maintainer of AOI and TB.
Maintainer of UMC 1.11: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
Turuk
Sithslayer
 
Posts: 4990
Joined: February 28th, 2007, 8:58 pm

Re: Code for Display of Oversized Portraits Needs Explanatio

Postby JaMiT » October 3rd, 2013, 2:00 am

Wussel wrote:Is my question really so difficult?
Yes. It is really difficult to figure out what you are talking about. (You were even told as much by soliton in your bug report. Hint: pay attention when someone is trying to help you.)

Try starting over from the beginning (not in a new topic), and explain what you did, what you expected, and what happened. Include concrete examples. Make it so that someone who cannot read your mind can reproduce whatever it is you're miffed about. It might help to keep a neutral tone (don't assume whatever it is you are encountering is intentional, and don't assume it is wrong), avoid commentary, and don't get sidetracked in digressions. Just the facts, laid out clearly. Then, once you've got the context established, try asking your question again.


Hmm... I do spot one question I sort of know an answer to:
Wussel wrote:Why force user like Doofus to scale his portraits down to 500x500???
To avoid biggerism, last I heard. Or to put it another way, to maintain a consistent scale across portraits. It starts by someone wanting an extra 50 pixels per dimension for a "really awesome" portrait of something that's "really big, and deserves a bigger portrait". Then others see that 550x550 portrait, and start using that size for portraits that are less awesome, of things less sizable. So when the next "really awesome" portrait comes along, there's another request for just "a little" more size allowance. Eventually, you get new portraits of house cats that look bigger than the old portraits of trolls. Kind of makes the art look thrown together instead of being well-thought out.

Disclaimer: That's just what I've gathered from various posts by the art directors. The idea seems reasonable to me, but it is also just my interpretation of hearsay.
JaMiT
Developer
 
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Next

Return to Coder’s Corner

Who is online

Users browsing this forum: No registered users and 0 guests