YesNoOk
avatar

Mugen 1.0; layers being 1 pixel off when x3 resolution (Read 1704 times)

Started by Cobra Caddie, October 14, 2018, 04:42:00 am
Share this topic:
Mugen 1.0; layers being 1 pixel off when x3 resolution
#1  October 14, 2018, 04:42:00 am
  • *****
  • Most Dangerous Mugen
    • USA
    • caddie.smeenet.org
So I'm getting a weird error with Mugen 1.0 where I have my screenpack at x3 resolution, and some of my layers are 1 pixel off. Which shouldn't be possible since everything should be done in 3 pixels. If I try and adjust the positioning, it'll just be 2 pixels off in the opposite direction. Here's an example of what I mean, look at the small portraits compared to the background layer.



Anyone know what causes this and how to fix it?
Last Edit: October 21, 2018, 07:06:03 pm by Cobra Caddie
Re: Mugen 1.0; layers being 1 pixel off when x3 resolution
#2  October 15, 2018, 12:03:45 am
  • avatar
  • **
    • USA
I've seen this happen before, but never really cared enough to try fixing it.  Hardware scaling in Mugen 1.1 makes it all but invisible.  You might be able to fudge the values a bit by adding or subtracting tiny values if that's allowed.  Like change a 10 to 9.99 or 10.01, etc.  I'm not sure what causes the issue exactly, but yes.  It's annoying.
Re: Mugen 1.0; layers being 1 pixel off when x3 resolution
#3  October 15, 2018, 10:54:18 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
The only way I found to fix this was to apply a localcoord to the screenpack matching the resolution and scale everything up via the code.

Oh, I want a diagram. I fucking love diagrams.
Re: Mugen 1.0; layers being 1 pixel off when x3 resolution
#4  October 15, 2018, 11:28:37 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Mugen 1.0; layers being 1 pixel off when x3 resolution
#5  October 21, 2018, 07:11:56 pm
  • *****
  • Most Dangerous Mugen
    • USA
    • caddie.smeenet.org
Thanks for all the info. I found a weird quick fix; I changed the localcoord to 319 instead of 320. This fixed the alignment issues perfectly while in a match, but now there is some flaws on the select screen. Which makes me think in game and outside of game have two separate ways of rendering.

My original fix was using a position with a decimal for what was causing the misalignment in that screenshot, but now only some portraits are misaligned. This makes a full fix impossible for the moment unless I change the localcoord back, and figure out a way to fix the in game alignment.
Re: Mugen 1.0; layers being 1 pixel off when x3 resolution
#6  October 22, 2018, 01:25:51 am
  • ****
    • crepa.neocities.org

  • Online
Hmm, I remember when I was making an original screenpack, to be more specific while I was creating the lifebars, I had a similar problem. I've made everything calculated, position, size, everything, and when I started coding it for the game, the elements were also 1 pixel off. Fortunately, my screenpack was hires and changing the position 1 pixel solved the problem (should not be a problem in the first place because, as I said, everything was drawn perfectly calculated where it should be).