Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: 1 2 [3]  All

Author Topic: Screen resolution scale down  (Read 39858 times)

0 Members and 1 Guest are viewing this topic.

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #30 on: April 30, 2014, 01:51:21 PM »

I have received the scene, thanks!

In 1920x... resolution, there is no difference, as I expected. Using a smaller resolution, the aliasing effect is clearly visible when pixelperfect rendering is on, which I didn't expect :(

Right now I can only guess why this happens. I hope I can give you a meaningful answer soon.
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #31 on: April 30, 2014, 08:04:55 PM »

OK, good luck in your quest!
And thank you for the help!
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #32 on: May 01, 2014, 09:40:29 AM »

I might have found the problem with opacity. Looks like the SDL library from the dependencies package is a little too old.

Can you please download a newer library from http://www.libsdl.org (direct link: http://www.libsdl.org/download-2.0.php), and replace SDL2.dll in your project with the new one? It fixed the issue for me.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #33 on: May 01, 2014, 10:57:15 AM »

I have also uploaded a new wme.exe. Now you can play around with a new option "VSync", to be added to the settings.xml file.

Code: [Select]
  <Rendering>
    <PixelPerfect>1</PixelPerfect>
    <VSync>0</VSync>
  </Rendering>

If you set VSync to 1 instead of zero, your frame rate should be limited (60fps) and you should not have the screen tearing anymore. It looks good on Windows at least.
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #34 on: May 01, 2014, 05:55:54 PM »

Wow! I'm impressed!
Both the oppacity problem and the screen tearing have totally disapeared!!!
The game is so pleasant to play now! I'm so happy!

Thanks a lot! You've been really helpful!
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #35 on: May 01, 2014, 06:31:20 PM »

I'm glad you like it :)

Regarding the aliasing problem I don't have any good news. I believe it cannot be solved. I'll try to explain why I think so:

Your animation moves the object (ship) in steps of 1 pixel. This looks perfect in the original 1920x... resolution.

When the game is downscaled, and pixelperfect rendering is off, the ship alone will be scaled when drawn - which gives good results. But the movement will be "uneven", because the "scaled movement" would be less than 1 pixel, and this is rounded to either 0 pixels or 1 pixel for the current step.

When pixelperfect rendering is on, the ship is drawn unscaled on the unscaled background (all invisible). Only the resulting complete image will be scaled-down and drawn to the screen. Now the downscaling will be applied to the whole image, interpolating the position of the ship on the background the same way as the other parts of the image. The movement itself is smooth, but as it is "less than 1 pixel per step" as well when downscaled, it creates the visible artifact.

I don't really know what you can do. Assuming that your game will not be scaled down more than 50% you might try to speed up the anim to at least 2 pixels per step. Maybe the effect is "less ugly" then :)
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #36 on: May 02, 2014, 05:52:36 PM »

Assuming that your game will not be scaled down more than 50% you might try to speed up the anim to at least 2 pixels per step. Maybe the effect is "less ugly" then :)

This method work perfectly with horizontal of vertical scene scrolling.
When I use this script :
Code: WME Script
There's a very strong aliasing effect.
But when I write:
Code: WME Script
No more aliasing. The scrolling looks good!

So I've tried the same method with the boat as you suggested.
But it doesn't work.
The aliasing is still there.

After watching closely to the scene, I've noticed the aliasing effect is visible even before the boat start to move.

Here is a detail of the boat at the original resolution:


And here is the same detail down-scaled (pixel perfect):


I have the feeling that all the oblique lines have that kind of distorsion when down-scaled (pixel-perfect).

I've added two simple squares to the scene so the effect is more obvious.
At the original resolution:


Down-scaled (pixel perfect):


Fortunately, this effect is almost unnoticeable when the objects are motionless because the lines are hand-drawn and irregular in my game.
It only becomes obvious when the boat starts to move.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #37 on: May 03, 2014, 11:43:11 AM »

I became sceptical when I saw your experiment with rectangles, and they really look ugly when scaled. I found another option that I have enabled now earlier in case of pixelperfect rendering, can you please check (once again) with the newest wme.exe from Bitbucket?

On my PC with 1280x... resolution, the aliasing of the boat was much less (not completely gone, but hard to notice if you're not looking for it).

Let me know how it works for you :)
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #38 on: May 03, 2014, 07:23:38 PM »

I've tried on 1600x900 and 1366x768 screens... and on both of them the aliasing effect is totally gone!
The down-scaling is now perfect!
No more screen tearing, oppacity problem & aliasing. You solved all the problems.
It's wonderful!
Many thanks, HCDaniel, for being so responsive and ingenious!
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Screen resolution scale down
« Reply #39 on: May 04, 2014, 02:45:32 PM »

I'm looking forward to your game :) Let me know when its ready.
Logged
Pages: 1 2 [3]  All
 

Page created in 0.024 seconds with 21 queries.