"Aesthetic bug" with ModifyExplod

Started by Fausto Mugen, September 26, 2017, 02:26:58 PM

Previous topic - Next topic

Fausto Mugen

[Google Translation]

I have two explods cut in half, one in front of the enemy and another behind, and when using ModifyExplod in the two at the same time the problem appears.
I attach two explanatory gifs, does not give any error but looks ugly.

In mugen 1.0, the bug is presented in Time = 17, 21, 25, 29, 37, 41, 45.
Spoiler (click to show)



In Mugen 1.1, the bug is presented in Time = 15.
Spoiler (click to show)



Here I leave the codes relevant to the problem:

Spawning helper (Player scale 0.85, 0.9 -------- Helper scale 0.25, 0.25)
Spoiler (click to show)


[State 3200, Helper Donut]
type = Helper
trigger1 = AnimElemTime(3) = 0
name = "Super Donut"
ID = 3204
pos = Ceil(35 * Const(size.xscale)), Ceil(-58 * Const(size.yscale)) ;30, -52
postype = P1
stateno = 3204
ownpal = 1
size.xscale = (5 * Const(size.xscale)) / 17 ;0.25
size.yscale = (2.5 * Const(size.yscale)) / 9 ;0.25


Helper state (hitting the enemy)

Spoiler (click to show)


;---------------------------------------------------------------------------
; Super Donut Hit
[Statedef 3206]
type = A
movetype = A
physics = N
anim = 1
velset = 0, 0
ctrl = 0
hitcountpersist = 1
sprpriority = 2

[State 3206, Safety]
type = ChangeState
trigger1 = !NumTarget
trigger1 = Time = 0
trigger2 = Root, StateNo != 3200 && Root, StateNo != 3201
trigger3 = Time > 50
value = 3205

[State 3206, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3206, TargetState]
type = TargetState
triggerall = NumTarget
triggerall = Root, StateNo = 3200 || Root, StateNo = 3201
trigger1 = Time = 0
value = 3202

[State 3206, BindToTarget]
type = BindToTarget
triggerall = NumTarget
trigger1 = Time = 0
time = 57
pos = 0, (Target, Const(size.mid.pos.y)), Foot

[State 3206, Donut Front]
type = Explod
trigger1 = Time = 0
anim = 3206
ID = 3207
pos = 0, 0
postype = P1
bindtime = 46
removetime = 46
scale = Const(size.xscale), Const(size.yscale)
sprpriority = 2
ownpal = 1

[State 3206, Donut Back]
type = Explod
trigger1 = Time = 0
anim = 3207
ID = 3207
pos = 0, 0
postype = P1
bindtime = 46
removetime = 46
scale = Const(size.xscale), Const(size.yscale)
sprpriority = 0
ownpal = 1

[State 3206, Donut Sound]
type = PlaySnd
trigger1 = Time = 0
value = 1800, 1
channel = 1

[State 3206, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(3207)
trigger1 = Time < 33
ID = 3207
scale = Const(size.xscale) * (2 - (0.03125 * Time)), Const(size.yscale) * (2 - (0.03125 * Time))

[State 3206, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(3207)
trigger1 = Time >= 33 && Time <= 45
ID = 3207
scale = Const(size.xscale) * (1 - (0.03125 * (Time - 32))), Const(size.yscale) * (1 - (0.03125 * (Time - 32)))

[State 3206, ChangeState]
type = ChangeState
trigger1 = Time >= 46
trigger1 = Root, StateNo = 3201
value = 3208


Trololo

The problem isn't in your coding. At least, I don't think you really need to do anything there. I suggest you edit your background "half-of-rings" into full rings.
Why? Well, because full ring at background shall overlay these holes, so they would be less noticeable. At least, I think this will work in that way.

Fausto Mugen


XGargoyle

Yes, as it has been said, you have to overlap the sprites to ensure a smooth scaling. Mugen does fuzzy things with decimals and localcoord spaces. Thst means 1 pixel scaled up 50% could become 1.4 or 1.6 in some instances, while you were expecting 1.5


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!

Fausto Mugen

Quote from: Trololo on September 26, 2017, 02:33:15 PM
The problem isn't in your coding. At least, I don't think you really need to do anything there. I suggest you edit your background "half-of-rings" into full rings.
Why? Well, because full ring at background shall overlay these holes, so they would be less noticeable. At least, I think this will work in that way.

Quote from: XGargoyle on September 26, 2017, 10:26:55 PM
Yes, as it has been said, you have to overlap the sprites to ensure a smooth scaling. Mugen does fuzzy things with decimals and localcoord spaces. Thst means 1 pixel scaled up 50% could become 1.4 or 1.6 in some instances, while you were expecting 1.5

I replaced the background sprite and the problem disappeared, thank you very much for your answers.