Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Pages: 1 2 3 [All]

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

0 Members and 1 Guest are viewing this topic.

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Screen resolution scale down
« on: March 18, 2014, 12:30:03 PM »

Hi, I'm working on a full HD game (1920x1080) but when I try to run it in a computer without FullHD screen, the game doesn't run.

I'm trying to implement Downscaling resolution in case the screen can't work with game current res. I read that WMELite do it in CBRenderSDL::InitRenderer, but I don't know how to implement it in the WME Windows.

Please, can anyone help me? I think that is an important feature.

Thanks a lot!
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 299
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Screen resolution scale down
« Reply #1 on: March 19, 2014, 05:04:09 AM »

Someone made a really cool tool recently and posted it on here. It was last year or this year I think, it automatically scales down every image in the game to fit whatever resolution you are going for. You might wanna search for it in the forums, I forgot what it was called.
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Re: Screen resolution scale down
« Reply #2 on: March 19, 2014, 08:45:15 AM »

Hi, I saw this. But the solution you tell me makes a copy of the game using the new resolution. I don't want to distribute 2 versions of the game depending on resolution. I need that the engine resize the images on the screen, like WME in iPhone or Android.
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #3 on: March 19, 2014, 08:53:02 AM »

A few months ago, I asked on the forum about WMELite downscaling on Windows.
You can read the thread here:
http://forum.dead-code.org/index.php?topic=5584.0

But I've found no solution to the problem.
If you find one, I'd be interested to hear about it!

Thank you!
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Screen resolution scale down
« Reply #4 on: March 20, 2014, 11:43:47 PM »

You can try my fork of wme lite. It should switch resolution to the nearest with correct aspec ratio and letterbox it.

https://bitbucket.org/JanKavan/wmelite-julia-branch
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 299
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Screen resolution scale down
« Reply #5 on: March 21, 2014, 07:08:56 AM »

@metamorphium What does your fork do differently than the original WME Lite?
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Re: Screen resolution scale down
« Reply #6 on: March 21, 2014, 08:45:11 AM »

Thanks metamorphium, I'll try it!!!
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #7 on: March 21, 2014, 09:40:32 AM »

You can try my fork of wme lite. It should switch resolution to the nearest with correct aspec ratio and letterbox it.

https://bitbucket.org/JanKavan/wmelite-julia-branch

It looks very appealing.
Many thanks, metamorphium! Your contributions to the WME community are always so helpful!

There's a "fatal error" when I try to compile "wmelite-julia-branch".
Here is the message I get in Visual C++ 2008 Express :

Quote
1>------ Début de la génération : Projet : wmelite, Configuration : Release Win32 ------
1>Compilation en cours...
1>main.cpp
1>d:\atelier sentô\the coral cave\wme lite - julia fork\src\BSoundBuffer.h(32) : fatal error C1083: Impossible d'ouvrir le fichier include : 'bass_fx.h' : No such file or directory
1>Le journal de génération a été enregistré à l'emplacement "file://d:\Atelier Sentô\the coral cave\wme lite - JULIA fork\visualc\Release\BuildLog.htm"
1>wmelite - 1 erreur(s), 0 avertissement(s)
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

Sorry for the little bits of French in those lines.
Here is a translation of the 4th line:

Quote
1>d:\atelier sentô\the coral cave\wme lite - julia fork\src\BSoundBuffer.h(32) : fatal error C1083: Impossible to open the include file : 'bass_fx.h' : No such file or directory

Is there anything I can do?
Thank you!
« Last Edit: March 21, 2014, 09:42:46 AM by Atelier Sentô »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5667
    • View Profile
    • Dead:Code Site
Re: Screen resolution scale down
« Reply #8 on: March 22, 2014, 03:36:38 PM »

You need the dependencies (3rd party libraries used by WME Lite). You can get them here: https://bitbucket.org/MnemonicWME/wmelite/downloads
The instructions outlined HERE still apply, no matter if you use vanilla WME Lite or meta's fork.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #9 on: March 22, 2014, 06:45:22 PM »

Thank you for the answer, Mnemonic.
I followed those instructions but I probably made a mistake somewhere. I'll try again in a few days.
Logged

ciberspace

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 113
    • View Profile
    • Tele Juego
Re: Screen resolution scale down
« Reply #10 on: March 24, 2014, 12:20:30 PM »

can be?

Q: Do I have to pay for WME Lite?
A: It depends. WME Lite itself is free, but it uses BASS library for sound, which requires that you buy a license if you are selling the game. You don't have to pay anything if you are releasing a freeware game.
http://forum.dead-code.org/index.php?topic=4774.0
http://res.dead-code.org/doku.php/wmelite:start

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5667
    • View Profile
    • Dead:Code Site
Re: Screen resolution scale down
« Reply #11 on: March 24, 2014, 06:02:08 PM »

Bass library is included in the dependencies package.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #12 on: April 15, 2014, 12:25:33 PM »

There's a "fatal error" when I try to compile "wmelite-julia-branch".
Here is the message I get in Visual C++ 2008 Express :

Quote
1>------ Début de la génération : Projet : wmelite, Configuration : Release Win32 ------
1>Compilation en cours...
1>main.cpp
1>d:\atelier sentô\the coral cave\wme lite - julia fork\src\BSoundBuffer.h(32) : fatal error C1083: Impossible d'ouvrir le fichier include : 'bass_fx.h' : No such file or directory
1>Le journal de génération a été enregistré à l'emplacement "file://d:\Atelier Sentô\the coral cave\wme lite - JULIA fork\visualc\Release\BuildLog.htm"
1>wmelite - 1 erreur(s), 0 avertissement(s)
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

Sorry for the little bits of French in those lines.
Here is a translation of the 4th line:

Quote
1>d:\atelier sentô\the coral cave\wme lite - julia fork\src\BSoundBuffer.h(32) : fatal error C1083: Impossible to open the include file : 'bass_fx.h' : No such file or directory

I've tried again to compile metamorphium version of wmelite but I've encountered the same problem (explained on the quote above)
I've tried with the original wmelite and it worked fine.

Here is what I've done:

1- I copy the source files on a folder on my computer.
2- I download dep_visualc2008_september2013.zip and unpack it to visualc\dep directory
3- I open visualc\wmelite.sln in Visual C++ 2008 Express and compile.

But I get this error message again:

Quote
1>d:\atelier sentô\the coral cave\wme lite - julia fork\src\BSoundBuffer.h(32) : fatal error C1083: Impossible to open the include file : 'bass_fx.h' : No such file or directory

Any idea where the problem can be?
If not, it's not really important: I was just curious to try out Metamorphium's version.

Thank you for the help!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5667
    • View Profile
    • Dead:Code Site
Re: Screen resolution scale down
« Reply #13 on: April 15, 2014, 05:54:30 PM »

Ok, apparently bass_fx.h, which meta is using, is not part of the standard BASS distribution (I haven't noticed that before, sorry).
You will need to download it from the BASS Add-ons page: http://www.un4seen.com/bass.html#addons (look for BASS FX).
Then copy bass_fx.h to the dep\bass\include directory and bass_fx.lib to dep\bass\lib directory.

Vanilla WME Lite is not using this add-on, therefore these files are not included with the dependencies.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #14 on: April 15, 2014, 07:59:29 PM »

Wonderful!
It's working now.
Thank you a lot, Mnemonic.

I'll test it with my game tomorrow and come back if something strange occurs.

Many thanks again!
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #15 on: April 22, 2014, 06:03:45 PM »

I've tested my game on several computers using metamorphium's version of wme lite and it's a pleasure to see it down-scaled on every screen (even on a small netbook).

In another hand, some small graphical glitches appear when the game is down-scaled.

1 - ENTITIES

I have the feeling that, instead of scaling the whole window to fit the screen, wme lite scales all the entities separatly.
Per exemple, let's take an entity which is 100x100px at the original resolution (1920x1080).
On a 1600x900 screen, it's going to be resized to 83,3333 x 83,3333 -> 83x83
So the resized entity will be slightly smaller as expected.

When the game is down-scaled, during animations or when you hide/show an entity, it creates a "vibration" as you can see it on the following gif:

(during this animation, every image is jpg so on every frame, the character have a small part of background all around her; instead of a transparent void)

Of course, it can be easily fixed by using transparent png instead of jpg.
So it's not a big problem.

2 - SCROLLING

When scrolling scenes are down-scaled, the scrolling becomes very fast.
I don't why or how to fix it.
My theory is maybe Scene.ScrollPixelsX uses the pixels of the screen (1600x900) instead of the pixels of the original resolution (1920x1080).
Is it possible?

3 - SUBTITLES

At their original resolution (1920x1080), my subtitles look like this:


But when downscaled to 1600x900, they look like this:

which is a little bit odd.

CONCLUSION
If I took the time to report all those things, it's because I'm wondering if they are known problems or if they come from me (scripting errors, per example).

I'm learning WME but programming is still an esoteric language to me...
Thank you for reading me!
« Last Edit: April 22, 2014, 06:11:43 PM by Atelier Sentô »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #16 on: April 23, 2014, 08:45:12 AM »

The issue you mention with entities is correct. I have added an option to wmelite (should be available in the julia branch as well, maybe not with the latest fixes though) to draw all entities to an (invisible) screen with the original game resolution. Only then, the whole scene is scaled to the screen and painted. It fixed all artifacts with drawing bitmaps for me (in our game the bitmaps must be correct to the last pixel). Downside to that approach is that a lot more memory is used - on Windows however, that might not be such a big issue anymore.

To use it, you need to add a settings.xml and enable the option. I hope this is the right format, I just reverse engineered it from the code (I don't have a game project at hand right now):

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<Settings>
  <Rendering>
    <PixelPerfect>1</PixelPerfect>
  </Rendering>
</Settings>

W.r.t. scrolling I don't know what really happens. Can you make some simple project available so I can test this?
EDIT: Could it be related to the scrolling speed setting and the rendering speed of your machine? Does it help to modify ScrollSpeedX?

Font rendering is done differently in the lite version of the engine. Especially for the font attributes, "bold" and "italic" are not supported. Looks like you have a font that you want wme to draw in bold. Original wme will do it, wmelite ignores the setting.
« Last Edit: April 23, 2014, 08:51:04 AM by HCDaniel »
Logged

Atelier Sentô

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

Hello HCDaniel!
Many thanks for your help!

1- ENTITIES

Using SciTE, I've created a file called settings.xml in the same folder as wme lite (julia branch) and I've pasted your code in it.

Now, when I run the game on a smaller screen, the interactive regions and the subtitles are down-scaled but the images appear in their original size.
Per example, my first scene looks like this:

while it should look like this:

(you can click on the images to see them fullsize)

Maybe I forgot to do something to enable the option you're talking about?

2- SCROLLING

In my scene_init.script I've set the scrolling like this:
Code: WME Script
  1. // set the horizontal scrolling speed
In WME, the scrolling is smooth and follow the character just fast enough.
But in wme-lite, it's very very fast.
I send you a scrolling scene by PM so you can test it!

3- SUBTITLES

Thank you for the tip! I didn't know that!
The subtitles still look odd... but it will be OK when settings.xml is enable, I suppose.

Again, many thanks for your help.
« Last Edit: April 25, 2014, 04:59:14 PM by Atelier Sentô »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #18 on: April 23, 2014, 05:48:06 PM »

Can you check again with the "wme.exe" I uploaded here (the relevant changes from the julia branch are in):

https://bitbucket.org/MnemonicWME/wmelite/downloads

The settings.xml file should be fine. If you make a mistake there, it will typically be ignored. As you noticed a difference, it was all fine, even if it was not the result you wished for ;)

I'll check the scrolling project in the next days (I have downloaded it already). What makes me sceptical are the settings you use. You want the engine to scroll one pixel at a time, every 1ms. That would in theory result in 1000 pixels/second. Maybe with regular WME you use full screen, and it could be that the frames per second are limited (maybe to 100 or 60 I'm not sure), so there you'll get only 60 pixels per second at max. Can you re-check in windowed mode whether the scrolling is too fast there as well?
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #19 on: April 25, 2014, 09:35:19 AM »

Can you check again with the "wme.exe" I uploaded here (the relevant changes from the julia branch are in):

https://bitbucket.org/MnemonicWME/wmelite/downloads

The settings.xml file should be fine. If you make a mistake there, it will typically be ignored. As you noticed a difference, it was all fine, even if it was not the result you wished for ;)

Thank you! The down-scaling is now pixel perfect!
What a relief! Many thanks for your help!

Some strange things occur. I don't know if they are know problems.

1 - All semitransparent entities become grey.
On this screenshot, the reflection in the water (on the top-right corner) is looking grey:

while it should look light-blue, like this:

This reflection is a png whose opacity has been reduced in photoshop.
But the same problem occurs when I set the opacity through wme scripts.

2 - The subtitles now use wme default font.

3 - When an objet moves in a scene, there's an aliasing effect.
Here is a video of this effect:
http://youtu.be/4Bpe7-_YvC4
(You'll have to watch it in HD fullscreen to see the "aliasing" on the boat (mostly on its left side)).
Here is the script I use to move the boat:
Code: WME Script
  1. while(true)
  2.   {
  3.    if(boat.X <= 610 * Game.GlobalScale)
  4.         {
  5.         break;
  6.         }
  7.   boat.X = boat.X - 1;
  8.   boat.Y = boat.Y - 1;
  9.  
  10.   Sleep(60);
  11.   }

I'll check the scrolling project in the next days (I have downloaded it already). What makes me sceptical are the settings you use. You want the engine to scroll one pixel at a time, every 1ms. That would in theory result in 1000 pixels/second. Maybe with regular WME you use full screen, and it could be that the frames per second are limited (maybe to 100 or 60 I'm not sure), so there you'll get only 60 pixels per second at max. Can you re-check in windowed mode whether the scrolling is too fast there as well?
When I'm working in windowed, the scrolling is OK. And now, with the new version of wmelite you just uploaded, it's OK in fulllscreen too.

Thank you for your explanations about fps.
I think that most of my problems are because I don't quite understand how to deal with fps...
I'm going to make researchs about it in the wme forums. I have to learn how to create a game that will work on every computers!

EDIT:
I've made a scrolling test with this code:
Code: WME Script
  1. // set the horizontal scrolling speed
The result is good and the scene don't scroll too fast anymore.

Once again, many thanks for your very helpful answers.
It's so relieving to see everything becoming clear, little by little.
« Last Edit: April 25, 2014, 11:02:44 AM by Atelier Sentô »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #20 on: April 25, 2014, 03:14:02 PM »

This reflection is a png whose opacity has been reduced in photoshop.
But the same problem occurs when I set the opacity through wme scripts.
Hmm, can I ask you again to provide me with an example scene? Is this a difference between regular wme and wmelite, or is it a problem that is only visible with "pixel perfect rendering"?

2 - The subtitles now use wme default font.
Hmm that only happens when the font file is not found. Are you sure it is in the same place that the scripts expect it? Please check the "wme.log" file, there you should find complaints if the specified font is not found.

3 - When an objet moves in a scene, there's an aliasing effect.
Here is a video of this effect:
http://youtu.be/4Bpe7-_YvC4
(You'll have to watch it in HD fullscreen to see the "aliasing" on the boat (mostly on its left side)).
I'll check that one out.

I've made a scrolling test with this code:
Code: WME Script
  1. // set the horizontal scrolling speed
The result is good and the scene don't scroll too fast anymore.
That one looks good, scrolling with roughly 60 fps for 4 pixels each :)
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #21 on: April 25, 2014, 04:35:41 PM »

This reflection is a png whose opacity has been reduced in photoshop.
But the same problem occurs when I set the opacity through wme scripts.
Hmm, can I ask you again to provide me with an example scene? Is this a difference between regular wme and wmelite, or is it a problem that is only visible with "pixel perfect rendering"?
In WME, official wmelite and "wmelite julia branch", semitransparent entities looks good.
This problem only appeared today when I tried the "pixel perfect rendering" wme.exe you uploaded yesterday.

(By the way, I wasn't sure how to use your "wme.exe" so I pasted it in the "wmelite - julia branch" folder and I click on it to launch the game.)

I'm going to send you an example scene. I'll send it by PM soon.

I'm also going to check the font files and I'll come back if I don't find the answer.

Thank you for your help!
« Last Edit: April 25, 2014, 04:58:34 PM by Atelier Sentô »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #22 on: April 26, 2014, 12:14:39 PM »

Quote
1 - All semitransparent entities become grey.
On this screenshot, the reflection in the water (on the top-right corner) is looking grey:
I checked your project. Unfortunetely I have absolutely no idea what's happening. The issue is only present in Windows (Linux & Android behave as expected). I don't know whether I have done something wrong (and SDL is gracefully correcting my errors on Linux & Android), or whether it is SDL's fault with the direct3d renderer.

Rendering the scene to a texture and then rendering the texture to the screen (on Windows) alters the color of the semitransparent parts of images (transparency itself is still ok). Does anybody have an idea what might be going on?

Quote
3 - When an objet moves in a scene, there's an aliasing effect.
I see what you mean, but I have no idea what to do :( I guess that it does not make a big difference whether pixelperfect is on or off, and that the effect is gone when you run the game at original resolution?

I did not see any font issue when running the project, so I hope that one is resolved :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5667
    • View Profile
    • Dead:Code Site
Re: Screen resolution scale down
« Reply #23 on: April 26, 2014, 12:28:48 PM »

I checked your project. Unfortunetely I have absolutely no idea what's happening. The issue is only present in Windows (Linux & Android behave as expected). I don't know whether I have done something wrong (and SDL is gracefully correcting my errors on Linux & Android), or whether it is SDL's fault with the direct3d renderer.
Yeah, there seems to be some alpha issue in Direct3D mode in fullscreen. I think meta encountered it as well. Switching to OpenGL renderer fixed the problem. So I suppose meta's fork uses OpenGL while your testing executable doesn't.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #24 on: April 26, 2014, 01:27:19 PM »

Yeah, there seems to be some alpha issue in Direct3D mode in fullscreen. I think meta encountered it as well. Switching to OpenGL renderer fixed the problem. So I suppose meta's fork uses OpenGL while your testing executable doesn't.

Thanks for the hint, I just double-checked that. Unfortunately it doesn't help. Both d3d and opengl work fine, unless I enable the option to render the scene to a separate SDL texture first (in game resolution) and then render that texture to the screen. Alpha is ok, but the color itself looks like it was merged with another one (maybe black) and thus turned to grey. I think I can exclude other bugs, because I added some code that dynamically switches this feature on and off every second just for testing, and only if I render to that extra texture the color has changed. Hmpf :(
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #25 on: April 27, 2014, 04:17:44 PM »

I did not see any font issue when running the project, so I hope that one is resolved :)
In the same folder as wmelite, I've added a "fonts" folder with the .ttf file inside and it's OK, now!
I'm sorry: I didn't know wmelite was acting differently with fonts.
The good thing is: this problem is now solved!

Quote
3 - When an objet moves in a scene, there's an aliasing effect.
I see what you mean, but I have no idea what to do :( I guess that it does not make a big difference whether pixelperfect is on or off, and that the effect is gone when you run the game at original resolution?
The aliasing appears only on the pixelperfect version of wmelite.
Metamorphium's version does not have this problem.
Unfortunately, I don't have a 1920x1080px screen so I can't test it fullscreen at original resolution with wmelite.

I've also noticed that, both on metamorphium's wmelite and on your pixelperfect version, a very strong screen tearing appears when the scene scroll.
(I see no screen tearing when playing the same scene on Mnemonic's official wmelite)

Yeah, there seems to be some alpha issue in Direct3D mode in fullscreen. I think meta encountered it as well. Switching to OpenGL renderer fixed the problem. So I suppose meta's fork uses OpenGL while your testing executable doesn't.

Thanks for the hint, I just double-checked that. Unfortunately it doesn't help. Both d3d and opengl work fine, unless I enable the option to render the scene to a separate SDL texture first (in game resolution) and then render that texture to the screen. Alpha is ok, but the color itself looks like it was merged with another one (maybe black) and thus turned to grey. I think I can exclude other bugs, because I added some code that dynamically switches this feature on and off every second just for testing, and only if I render to that extra texture the color has changed. Hmpf :(
It sounds like the problem is more complicated than expected... I'm sorry!
I hope looking at my problem doesn't take too much of your time and that it will help you in some way with your own game.
« Last Edit: April 27, 2014, 04:23:18 PM by Atelier Sentô »
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #26 on: April 27, 2014, 06:58:19 PM »

Quote
The aliasing appears only on the pixelperfect version of wmelite.
Metamorphium's version does not have this problem.
Unfortunately, I don't have a 1920x1080px screen so I can't test it fullscreen at original resolution with wmelite.
Can you check once again please, I uploaded a new .exe with one more thing from the julia branch that I forgot to add.

Quote
I've also noticed that, both on metamorphium's wmelite and on your pixelperfect version, a very strong screen tearing appears when the scene scroll.
(I see no screen tearing when playing the same scene on Mnemonic's official wmelite)
I don't know whether it is possible to use the "vsync" feature that the regular WME has. Mnemonic, do you know how to do that in SDL?

Quote
It sounds like the problem is more complicated than expected... I'm sorry!
I hope looking at my problem doesn't take too much of your time and that it will help you in some way with your own game.
No need to excuse :) It's good that you test and find bugs, we will all benefit from it. It will make also our game better I'm sure 8)
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #27 on: April 28, 2014, 07:05:43 PM »

Quote
The aliasing appears only on the pixelperfect version of wmelite.
Metamorphium's version does not have this problem.
Unfortunately, I don't have a 1920x1080px screen so I can't test it fullscreen at original resolution with wmelite.
Can you check once again please, I uploaded a new .exe with one more thing from the julia branch that I forgot to add.
Unfortunately, the aliasing problem is still there.

No need to excuse :) It's good that you test and find bugs, we will all benefit from it. It will make also our game better I'm sure 8)
OK, thank you!  :D
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Screen resolution scale down
« Reply #28 on: April 28, 2014, 08:41:25 PM »

Can you send me this one anim that shows the aliasing effect as well so I can test the effect in my PC?

BTW I still have no clue about the strange color with semitransparent graphics  :(
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Screen resolution scale down
« Reply #29 on: April 29, 2014, 06:58:17 PM »

Can you send me this one anim that shows the aliasing effect as well so I can test the effect in my PC?
I've sent you the file by MP!

BTW I still have no clue about the strange color with semitransparent graphics  :(
It is indeed a strange problem... I'm sad I can't help.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • 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: 157
    • 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: 157
    • 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: 157
    • 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: 157
    • 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: 157
    • 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.349 seconds with 18 queries.