YesNoOk
avatar

Scaling character for 4:3 (Read 416 times)

Started by SaltAddict, May 17, 2020, 03:09:12 AM
Share this topic:
Scaling character for 4:3
#1  May 17, 2020, 03:09:12 AM
  • avatar
  • ***
    • Portugal
After a quick mess around with MAME settings it tells me the game my character is ripped from has an internal resolution of 3:2, however it is displayed in 4:3.

When using the unscaled sprites the character looks too small and too wide, so how would I convert that aspect ratio into a scale value mugen can use?
Re: Scaling character for 4:3
#2  May 17, 2020, 07:46:12 AM
  • *****
  • Shame on you!
    • USA
You can use
[Size]
xscale = 1.33           ;Horizontal scaling factor.
yscale = 1.5           ;Vertical scaling factor.
At the top of your character's CNS file to affect it. Those should be the values, but I'm not positive.

----
You will want to make two variables to match those values. Then you would use those variables to do math to place explods and helpers easier. My Samus has some scaling. You might want to look it over.
vVv Wheat Stage Released vVv
Re: Scaling character for 4:3
#3  May 17, 2020, 09:55:47 PM
  • avatar
  • ***
    • Portugal
You can use
[Size]
xscale = 1.33           ;Horizontal scaling factor.
yscale = 1.5           ;Vertical scaling factor.
At the top of your character's CNS file to affect it. Those should be the values, but I'm not positive.

----
You will want to make two variables to match those values. Then you would use those variables to do math to place explods and helpers easier. My Samus has some scaling. You might want to look it over.

Cheers!

I was alright planning to have math in place to scale everything accordingly, I can just multiply the values by the size constant, right?
Re: Scaling character for 4:3
#4  May 18, 2020, 04:01:56 AM
  • *****
  • Shame on you!
    • USA
If you're talking about using something like
const(size.xscale)
Yes and No. It will work for multiplying a lot of stuff. It'll work in a lot of triggers. But it will not work with everything.
That's why I used the variables in Samus. If I remember correctly, the hitdef was one of the spots where it would and wouldn't work. It had me going crazy for a long time.

I think you may end up having to adjust some of your values, but yes, just adding
*var(yourvaluehere)
to all of your positions should work. I think in certain instances I had to adjust the original value slightly due to 1 pixel being off from rounding one way or the other.
vVv Wheat Stage Released vVv
Re: Scaling character for 4:3
#5  May 19, 2020, 02:22:13 AM
  • ***
If you're talking about using something like
const(size.xscale)
Yes and No. It will work for multiplying a lot of stuff. It'll work in a lot of triggers. But it will not work with everything.
That's why I used the variables in Samus. If I remember correctly, the hitdef was one of the spots where it would and wouldn't work. It had me going crazy for a long time.

I think you may end up having to adjust some of your values, but yes, just adding
*var(yourvaluehere)
to all of your positions should work. I think in certain instances I had to adjust the original value slightly due to 1 pixel being off from rounding one way or the other.

not only position, but size, velocity too.
Now my Youtube Channel is my HomePage
https://www.youtube.com/channel/UC4N3iOEfslR4iRRXPjP11jg
You can follow my Character release or stage release Playlists for all my works.
Re: Scaling character for 4:3
#6  May 22, 2020, 12:43:06 AM
  • avatar
  • ***
    • Portugal
If you're talking about using something like
const(size.xscale)
Yes and No. It will work for multiplying a lot of stuff. It'll work in a lot of triggers. But it will not work with everything.
That's why I used the variables in Samus. If I remember correctly, the hitdef was one of the spots where it would and wouldn't work. It had me going crazy for a long time.

I think you may end up having to adjust some of your values, but yes, just adding
*var(yourvaluehere)
to all of your positions should work. I think in certain instances I had to adjust the original value slightly due to 1 pixel being off from rounding one way or the other.

not only position, but size, velocity too.


Ah, I see. I've got it set up with variables now, thank you both
Re: Scaling character for 4:3
#7  May 24, 2020, 07:29:44 PM
  • ***

you don't have to do this
just scale the sprite is enough, just tweek your hitbox will do.

unless you want to do it like me (over engineer your character to make yourself happy)
you can check my following character as example.
they are aimed to be free scale-able and adapter any ratio.
https://www.youtube.com/watch?v=KC01Z-VOxS0
Now my Youtube Channel is my HomePage
https://www.youtube.com/channel/UC4N3iOEfslR4iRRXPjP11jg
You can follow my Character release or stage release Playlists for all my works.