Problem with countuous scaling

Started by Varcuz, Sat 29/01/2022 15:30:58

Previous topic - Next topic

Varcuz

Hello i have smal problem with countuous scaling. I dont find any answers on forum so im asking. My room is size 640x360 and character is 70x210. For example when i set minscalinglevel to 75 an max to 120 when my character walk the picture does not go down smoothly. I dont no how to explain this...
character reduction is not smooth . there is some way to smooth the scaling? With smooth scaling sprite is better, but still doesn't look good.
Sorry for english ;)

Khris

Maybe a screenshot would help? Upscaling is a problem in general though, you should always draw character sprites at the maximum size that is required, especially in a highres game.

Varcuz

Quote from: Khris on Sat 29/01/2022 20:57:05
Maybe a screenshot would help? Upscaling is a problem in general though, you should always draw character sprites at the maximum size that is required, especially in a highres game.
When i draw character  at maximum size and character is scale down problem still exists.
Here is the link to the video where I recorded the problem.
https://youtu.be/E5N79dIIlV4

Danvzare

Ok, so let me get this straight. Your problem is that the character is scaled in a jerky way, rather than a smooth continuous way?
Like it's being scaled to 76% then suddenly 77%, then to 78%, rather than a more appropriate 76.1%, 76.2%, 76.3%, etc.
Unfortunately that's just the way AGS scales characters I'm afraid.

Varcuz

Quote from: Danvzare on Sun 30/01/2022 12:20:17
Ok, so let me get this straight. Your problem is that the character is scaled in a jerky way, rather than a smooth continuous way?
Like it's being scaled to 76% then suddenly 77%, then to 78%, rather than a more appropriate 76.1%, 76.2%, 76.3%, etc.
Unfortunately that's just the way AGS scales characters I'm afraid.
Yes, that's what I mean. So there is no way to make it better? :(

Cassiebsg

Never say "there's no way", lets rather say "no easy way" or "not with the built in scale function" instead.

I'm sure that you can use floats and manually scale the character/sprites (probably needs dynamic sprites). Though, coding that is beyond my capabilities.
There are those who believe that life here began out there...

Varcuz

Quote from: Cassiebsg on Sun 30/01/2022 15:24:11
Never say "there's no way", lets rather say "no easy way" or "not with the built in scale function" instead.

I'm sure that you can use floats and manually scale the character/sprites (probably needs dynamic sprites). Though, coding that is beyond my capabilities.
I think a an easier idea would be to change the perspective of the room to one that doesn't require that much scaling, but thanks for Yours answers. :)

Khris

The setup has an option for this ("smooth scaled sprites"); if you turn that on characters are scaled using the resolution the game is running at rather than the native one.

Having said that, I don't see anything wrong with the gameplay video you posted; it looks fine. Maybe it's because I grew up with 320x200 games in the 90s?

Crimson Wizard

#8
Quote from: Khris on Sun 30/01/2022 17:32:15
The setup has an option for this ("smooth scaled sprites"); if you turn that on characters are scaled using the resolution the game is running at rather than the native one.

To clarify, that option is "Render sprites at screen resolution".
"Smooth scaled sprites" enables antia-aliasing during rescale afaik.

However, I am not certain if this option would help, as, judging by the above posts, the issue is not necessarily that the character is pixelated, but that scaling is done in rough steps.
Although tbh I don't see anything wrong in the above video either, so may be mistaken about the problem.

Varcuz

Khris: I have turned on the ("smooth scaled sprites")  option already, but it didn't do much.
Crimson Wizard: Exactly, The thing is, the character shakes a bit when scaling, and it looks strangely.

If You will take a look you can see it in the video, looking especially at the heads of the characters you can see it.

I add new video in a brighter room, it shows better there.

https://youtu.be/sTfzTQStmbw

Khris

Just for the record, to me that video looks perfectly fine. The "shaking" is barely noticeable, if at all.

Crimson Wizard

I think the only way do fix this in the current engine is to resize the sprites in the animation frames dynamically in script instead, as Cassiebgs mentioned above, as this will let more gradual change.
That would affect the perfomance though; which may or not be a concern (depends on number of things).

Varcuz

Maybe Khris have right and  it doesn't look bad.  Anyway  changing the size of the icons in the animation frames in the script is too difficult for me, at the moment i dont now how to start doing this. Thanks for the answers anyway :)

Varcuz

I think i found a solution, anyway the effect is much better.
I had the resolution set to 640x320 so i change this to 1366x768 and change bacground size to same, but i don't change a character image size. In maxscaling i set up to 220 and minscaling to 120 and now its look much better. Scaling seems much smoother :)

SMF spam blocked by CleanTalk