Performance experiences with 1.13.x

General feedback and discussion of the game.

Moderator: Forum Moderators

User avatar
Pentarctagon
Project Manager
Posts: 5527
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Performance experiences with 1.13.x

Post by Pentarctagon »

beetlenaut wrote:
Pentarctagon wrote:It does seem like moving beyond software rendering is something that needs to happen
Is that really true? While the game is struggling and lagging on my machine, I have three processors sitting idle. Would shifting map animations into a separate thread be harder than using accelerated rendering? Any computer bought in the last seven or eight years would see a significant speed-up, and older computers than that would still work.
I say that in part because:
a) Wesnoth seems to have hit something of a performance ceiling during the 1.13 cycle.
b) Very few games these days lack hardware accelerated rendering, and are able to handle a lot more complex sorts of rendering than what Wesnoth currently does.

Whether or not the software rendering approach Wesnoth uses currently can be improved to fix the current performance issues, it then seems like further improvements to anything that could impact rendering time/fps would just get more and more difficult to make. I can't really say whether or not multi-threading would be possible or harder, but in Elvish_Hunter's case at least that probably wouldn't really help, since his CPU has only 2 cores and no hyperthreading.
Elvish_Hunter wrote:
Pentarctagon wrote:Or in this case, perhaps just shipping you better hardware.
Thanks for the offer, I'll keep that in mind should I need it. However, right now I can afford a new system (although the only problem with mine is that I had to lower the optimization level to -O1 while compiling), I'm just unsure about the specifications to choose. Then again, I usually install Linux on dedicated second-hand machines, instead of dual booting... :P
To clarify, I wasn't offering to actually do that myself - I was just proposing it as a possible idea for the Board (vultraz, Doofus-01, Jetrel, Dave) to consider. They'd be the ones who'd need to make a decision on that, and if people would actually be interested in that kind of arrangement, it'd probably be best to poke them on Discord or IRC about it to get their attention. It would also probably depend on how much money the iOS port brings in, but I have no actual knowledge of Wesnoth's finances.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Performance experiences with 1.13.x

Post by Coffee »

This is an interesting discussion for me because I did some dev work in the past with animations for 1.12 (such as the new square bracket animation WML, etc.).

When Wesnoth 1.13.2 or there about came around I found that my machine could not play any map at all -- with the transition to the new SDL if I remember correctly. I stopped being an active dev around then, not all because of this as other things competed for my time as well. It's only around 1.13.5 that I could start to play a game properly and I have a beast machine (12 core 3.3GHz new processor, 8GB DD4 RAM and such).

I did notice some time back (although human memory is sometimes fallible) that some of the code had changed regarding animation cycles and frame ticks. I had a go but couldn't get the dirty animations to not show on the front buffer. This is the drakes/horseman moving issue where 2 separate frames are shown in part on the screen at the same time from what I think are different "cycles" (so from some part of the animation loop and the corresponding next tick cycling backwards). I think this may actually be a coding bug.

Maybe some or just one of the coding changes from the new SDL port affect performance also? I don't know how to test this though and I'm not really that active as a dev any more, but I'd like to help with some minor bug fixing before 1.14 is released. Just my 2 cents.
jyrkive
Inactive Developer
Posts: 36
Joined: July 7th, 2016, 6:20 pm
Location: Helsinki, Finland

Re: Performance experiences with 1.13.x

Post by jyrkive »

beetlenaut wrote:
Pentarctagon wrote:It does seem like moving beyond software rendering is something that needs to happen
Is that really true? While the game is struggling and lagging on my machine, I have three processors sitting idle. Would shifting map animations into a separate thread be harder than using accelerated rendering? Any computer bought in the last seven or eight years would see a significant speed-up, and older computers than that would still work.
Given how much performance has regressed relative to 1.12, I believe that the right short-term solution would be making the rendering code more efficient (which 1.12 has proven to be possible) instead of throwing more hardware at the problem.

Shifting animations to a separate thread would likely indeed be difficult, as Wesnoth code isn't designed to be thread-safe at all.
User avatar
vultraz
Developer
Posts: 960
Joined: February 7th, 2011, 12:51 pm
Location: Dodging Daleks

Re: Performance experiences with 1.13.x

Post by vultraz »

I think part of the problem is just that SDL2 is designed to be used with accelerated rendering, not software rendering. I believe aginor said something as much last year. So I don't know how much we can do.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Performance experiences with 1.13.x

Post by Coffee »

After spending some time with this I think there may be 2 separate problems that people may be confusing here. The first is a "software glitch" that makes the unit movements not look right and give the impression that your computer is not fast enough. The second is actual slow performance that I don't myself see with Wesnoth 1.13.x anymore.

In the bug report linked above I've listed what I've found to be a solution to this first graphical glitch problem (although it appears to be related to the introduction of some lua events feature that needs a work around).

If this can be fixed for 1.13.9, say, IMO it would be worth asking this question again to see if Wesnoth 1.13.x series is really having performance issues or just this coding error.
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Performance experiences with 1.13.x

Post by beetlenaut »

Coffee wrote:it would be worth asking this question again to see if Wesnoth 1.13.x series is really having performance issues or just this coding error.
I cloned the git repo yesterday, and it's running fine for me now on full screen, even with water animations on. It seems like that may have been the main problem.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Pentarctagon
Project Manager
Posts: 5527
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Performance experiences with 1.13.x

Post by Pentarctagon »

Part of the problem was also how Wesnoth's default fps cap was implemented. To start with, it was 50 (rather than 30 or 60), and enforced the cap by never letting the fps be above 50 (or whatever --max-fps specified). jyrkive reimplemented it so that it instead uses the refresh rate of your monitor, and also attempts to instead not let the fps go below your screen's refresh rate.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: Performance experiences with 1.13.x

Post by Coffee »

There have been quite a few bugs fixed recently that may positively affect this, including the bug I mentioned with movement animations. I think version 1.13.9 is due this month and it would be interesting to hear back from people that had issues before if performance is now decent. I think it is pretty good.

The only thing left IMO is the accelerated rendering that Vultraz is working on. The general gameplay smoothness could be excellent even compared to any previous version after all this.
Post Reply