jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
157 stars 63 forks source link

fix corrupt borders after resize #94

Closed kotc closed 3 months ago

kotc commented 3 years ago

most likely calling borders clear too early. fix it by unconditionally clearing buffer before repaint:

diff-0006-fix-corrupt-borders.txt

jdmonin commented 2 years ago

Hello, thanks again for your suggestion on this one. I think I have it fixed, I implemented it slightly differently.

If you want to try it out, you can download the client at https://nand.net/jsettlers/beta/js2500beta-20211218.jar or compile it yourself :)

This new version should be ready for release around the end of the month.

Thanks, -Jeremy

kotc commented 2 years ago

you have missed the one just below the center, try fullscreen/defullscreen to see

kotc commented 2 years ago

also, player cards blink a lot

kotc commented 2 years ago

i had to roll back 07a876a023693634f27a05e3ce19bb4e69a18af8 and apply my simpler fix which works to get usable client. that flashing on every action was unbearable..

jdmonin commented 2 years ago

Thanks for letting me know. I've mostly been using MacOS, occasionally Windows, and I was having trouble reproducing this problem. Sorry I missed it :)

You're on Linux, right? I'll try again to set up a vm to test for this. Would you mind sharing which distro/version/desktop env you're using? Thanks either way

kotc commented 2 years ago

distro is slackware64, desktop env is just plain fluxbox, java is jdk1.8.0_261-b12. but basically it looks as if any redraw triggered full user panel redraw, without double buffering, so it flashes few times per second sometimes (during bot turns)

jdmonin commented 2 years ago

ok, I was able to repro on a slackware64 14.2 VM with fluxbox and openjre-8u312_b07.

I converted SOCPlayerInterface to swing, which should provide double buffering, and removed the paint override that caused the flashing.

You can try https://nand.net/jsettlers/beta/js2600beta-20220215.jar or make your own build. Thanks again!

jdmonin commented 2 years ago

That build also includes the scenario/game option sort ranking from numeric prefixes (issue #99, #100)

jdmonin commented 2 years ago

@kotc If you have any time for it in the next week, would you mind testing this please and let me know if it fixed it for you? I'd really like to get a new version out with your translation and this fix. Thanks as always :)

kotc commented 2 years ago

ok, i will try to test it over the weekend

jdmonin commented 2 years ago

I added one more commit to reduce flicker with this: bb9918ca503e83e2c34f66227796e0175d937a13

Released today as part of 2.6.00

jdmonin commented 3 months ago

Checking in on this one :) @kotc did 2.6.00 fix this issue for you?

kotc commented 3 months ago

yeah, i didnt notice corruption so far, although i've played only git version that i built this week

jdmonin commented 3 months ago

ok great, thank you!