YesNoOk
avatar

Afterimages pissing you off? Well they're broken. (Read 78647 times)

Started by Vans, June 08, 2015, 03:41:26 pm
Share this topic:
Re: Afterimages pissing you off? Well they're broken.
#21  June 08, 2015, 08:07:43 pm
  • avatar
  • ******
    • USA
...What the fuck

Bea

Re: Afterimages pissing you off? Well they're broken.
#22  June 08, 2015, 08:14:41 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
Elecbyte standard of quality.
Why are people surprised with such egregious bug? That is the norm for Elecbyte.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Afterimages pissing you off? Well they're broken.
#23  June 08, 2015, 08:18:35 pm
  • ******
  • what a shame
    • Iran
looool
Re: Afterimages pissing you off? Well they're broken.
#24  June 08, 2015, 08:22:31 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Fucking incredible.
Re: Afterimages pissing you off? Well they're broken.
#25  June 08, 2015, 08:56:13 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
LOL
My apologies, Vans.

Elecbyte standard of quality.
Why are people surprised with such egregious bug? That is the norm for Elecbyte.
Well I guess it's because we expect the shit we're working with to work. I'm in denial about it at times, because I just keep hoping that it's me that's doing wrong and that needs to fix his shit to get things to work properly.

-[Все слова это только слова.]-
Re: Afterimages pissing you off? Well they're broken.
#26  June 08, 2015, 09:19:48 pm
  • ******
  • 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!
Last Edit: June 08, 2015, 09:25:20 pm by XGargoyle

Bea

Re: Afterimages pissing you off? Well they're broken.
#27  June 08, 2015, 10:00:16 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
Elecbyte standard of quality.
Why are people surprised with such egregious bug? That is the norm for Elecbyte.
Well I guess it's because we expect the shit we're working with to work. I'm in denial about it at times, because I just keep hoping that it's me that's doing wrong and that needs to fix his shit to get things to work properly.

15 years around this stuff.
By now I know better than trusting Elecbyte code quality.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Afterimages pissing you off? Well they're broken.
#28  June 08, 2015, 10:13:43 pm
  • ****
  • The Barbarian
  • Most ****able 2013
    • USA
    • Skype - chronostrifeff7h@hotmail.com
Haha thanks for posting this. I've been playing around with Afterimages and couldn't help but notice the coloration was incorrect, 0,0,0 was giving me a reddish Krillin which was driving me up a wall. So I figured I was doing something wrong.

I'm not sure what it does, but I could have swore palbright seemed to take and apply negatives for me despite the documentation saying it doesn't. Not sure if it is rolling it back to some red of 65xxx or 32xxx (not that I'm even sure how the engine defines these ints), maybe its a 1.1 thing or maybe I really was messing with paladd. I might be losing my mind though, its been a couple weeks.

I'm tempted to play with this some more, now and this thread just helped me feel significantly less stupid about getting back into MUGEN code.
Re: Afterimages pissing you off? Well they're broken.
#29  June 08, 2015, 10:34:48 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Each color component is only 8 bits, so it would be from 0-255, not 0-65535.
Re: Afterimages pissing you off? Well they're broken.
#30  June 08, 2015, 10:38:03 pm
  • ****
    • China
    • http://vans.trinitymugen.net/
I have not confirmed using artmoney, but further tests would hint at the add_r parameter being completely fixed at 30.

If we assume the equation Elecbyte gives us is correct then,

(256 + 30) * 256 / 256 + add2_r = 256 → add2_r = -30.

Which means that setting palpostbright = -30,0,0 is the closest thing we can get to a fix (for getting solid colors)



This also means that colors looking off after doing that has to be related to something else entirely.
Last Edit: June 08, 2015, 10:47:31 pm by Vans
Re: Afterimages pissing you off? Well they're broken.
#31  June 08, 2015, 11:33:10 pm
  • ******
  • [E]
    • Mexico
Re: Afterimages pissing you off? Well they're broken.
#32  June 08, 2015, 11:38:35 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
This also means that colors looking off after doing that has to be related to something else entirely.

I'm pretty sure it's related to the maxing out at 255. That could happen with several different values. So when you undo the conversion, you won't necessarily get the original value back.

In other words, it's not a one-to-one mapping.
Last Edit: June 08, 2015, 11:42:04 pm by Jesuszilla
Re: Afterimages pissing you off? Well they're broken.
#33  June 10, 2015, 05:07:56 am
  • **
So I looked a little bit more into this issue.

It turns out MUGEN, when parsing an AfterImage controller, and after initializing the default parameters for PalBright, actually stores add_r at the wrong address, so it ends up using add_g's address for add_r and add_g :laugh:

Nothing a bit of hex editing can't fix, fortunately.

KDT

Re: Afterimages pissing you off? Well they're broken.
#34  June 10, 2015, 06:05:18 am
  • *
    • UK
This seems to work

Make a helper with a palette with all the red values adjusted -30, i.e 159,44,255 to 129,44,255 and draw the after imge from that
Code:
[State 0, Helper]
type = Helper
trigger1 = time = 1
trigger1 = numhelper(12000) = 0
helpertype = normal
name = "ai"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

Code:
[Statedef 12000]

[State 0, RemapPal]
type = RemapPal
trigger1 = 1
source = 1,palno
dest = 30,palno

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 0, Turn]
type = Turn
trigger1 = facing != root, facing

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != root, anim
value = root, anim

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = root, pos x
y = root, pos y

[State 810, 1]
type = AfterImage
trigger1 = time = 1
time = 170000
length = 99
framegap = 3
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palcontrast = 256,256,256
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
Re: Afterimages pissing you off? Well they're broken.
#35  June 10, 2015, 06:33:23 am
  • **
It is a nice idea, but red values between 0 and 29 will be clamped to 30.
Re: Afterimages pissing you off? Well they're broken.
#36  March 17, 2022, 07:24:07 pm
  • *
Replying SIX YEARS later, it's even more broken. The solution in this simply no longer works now. This code:

Code:
[State blah blah blah, blah]
type = AfterImage
trigger1 = time = 0
time = 170000
length = 11
framegap = 1
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palcontrast = 256,256,256
palpostbright = -30,0,0
paladd = 0,0,0
palmul = 1.0,1.0,1.0

Is now no longer a solution as the afterimages still appear red, for some reason. Editing postbright further does nothing.

Yeah, pain.