#5604 Graphic issues with window scaling 1.05

Client (147)

The new window scaling leads to graphic issues:

-The fonts (e.g. of player names) become blurred
- if you walk on grey streets (e.g in 0_semos_city) there are "wandering" horizontal and vertical lines. That means the borders of the tiles get clear visible.

OS: Mageia2 Linux
Java: java-1.7.0-openjdk - OpenJDK Runtime Environment​
Graphic card: GeForce GT 240 1GB
Graphic driver: 295.71


  • Kimmo Rundelin

    Kimmo Rundelin - 2012-12-16

    Both of the issues are rather hard to avoid.

    Text gets blurry due to being passed through the same scaling as the rest of the scene. The simplest way to get rid of the blur would be turning off bilinear filtering while drawing the entity tops. The result is not particularly pretty for scaling upwards, and unusable when scaling downwards (see attachment). The upside is that it would be really easy to implement (obviously should not be done when scaling downwards).

    The other option is making the entity views aware of the scaling, and that could get complicated. The views would need to be given access to the unscaled graphics and the scaling factor used for the rest of the drawing plus the information used to calculate the location on the screen. They also would need to track changes in scaling or stop caching the title and health bar images. In short, I think that solution is too complicated and invasive for fixing a minor visual glitch.

    The line effect is partly unavoidable, as resampling the image to a different pixel grid will always make some of the lines stronger than others (except at integer multiples of the original resolution). Part of the effect seems to be from joining the image boundaries at the target buffer, and the results apparently vary between drawing backends (opengl renderer does a lot worse than xrender on my system, for example). That part could be eliminated by switching to triple buffering for drawing the floor layer bundle (that is, drawing the floor layers to an intermediate image at full resolution, and doing the scaling for the entire scene in one pass. The cost would be some memory and a bit slower drawing).

  • Kimmo Rundelin

    Kimmo Rundelin - 2012-12-16

    Scaling text with nearest neighbour

  • Kimmo Rundelin

    Kimmo Rundelin - 2012-12-16

    At quick testing, it looks like triple buffering can make the second problem unnoticeable at least on most backgrounds (like Semos streets) , so it would be worth doing

  • Kimmo Rundelin

    Kimmo Rundelin - 2012-12-16
    • labels: --> Client
    • assigned_to: nobody --> kiheru
    • status: open --> closed-fixed
  • Kimmo Rundelin

    Kimmo Rundelin - 2012-12-16

    I implemented triple buffering, so the second part is fixed in cvs now. I'll close this bug and open a new one for the titles alone. Thank you for the report.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks