YesNoOk
avatar

Super Portrait / Special Screen - Zoom and Big stages - Mugen 1.1 (Read 1893 times)

Started by DG, October 30, 2021, 06:44:51 pm
Share this topic:

DG

Super Portrait / Special Screen - Zoom and Big stages - Mugen 1.1
New #1  October 30, 2021, 06:44:51 pm
  • **
  • Fire Blast!
    • Brazil
    • dgmugen.com.br
Hello everybody, I'm trying to sort a compatibility model with zoom and big stages. It's Mugen 1.1.

I have a Helper that act as a Super Portrait and it need to be fixed (the best it can) with all kind of stages with different localcoordinates, proportions, resolutions, etc, etc.

The best i could get was this code:

Code:
[State 3200, 10] 
type = Helper
trigger1 = NumHelper(3201) < 1
trigger1 = Time = 252
helpertype = normal
name = "Samurai Traditional BG"
ID = 3201
postype = left
pos = 0,0
bindtime = 0
;facing = 1
stateno = 3201 
ownpal = 1
ignorehitpause = 1
supermovetime = 999999
persistent = 0
;size.xscale = 0.30 ;* const(size.xscale)
;size.yscale = 0.30 ;* const(size.yscale)

;--------------------------------------------------
;Inside the Helper State:

[State 3201, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.30/(camerazoom/const240p(0.75)), 0.30/(camerazoom/const240p(0.75))
ignorehitpause = 1
persistent = 1

[state 3201, 1]
type = PosSet
trigger1 = Time = 0
x = -GameWidth/2
y = const240p((-GameHeight)*0.80)

 


As you can see bellow I get some good results, but not perfect:

Normal Stage (without zoom):


16:9 Zoom Stage:


Zoom and Big Stage (Problem Here!):




I see the X/Y scale and X position are doing well. The problem is the Y position.

Can someone help me with the last stage. It's been a nightmare to sort this.


Cheers!

DG


PS: The player is not surfing. I don't care much about the player's position, I just need the helper very well attached to the screen.



DG Mugen Creations: https://dgmugen.com.br
Support Me: Patreon
Support Me: Other Options
Last Edit: October 30, 2021, 08:59:47 pm by DG

DG

Re: Super Portrait / Special Screen - Zoom and Big stages - Mugen 1.1
New #2  October 30, 2021, 08:56:31 pm
  • **
  • Fire Blast!
    • Brazil
    • dgmugen.com.br
Ok. Sorted!


Thanks to this post I could figure out my solution I'll post here: https://mugenguild.com/forum/topics/special-screen-1-0-zoomout-stages-188452.msg2460659.html#msg2460659


Add those vars / fvars into the root state:

Code:
[State 20000, Increase Size]
type = VarAdd
trigger1 = 1
v = 0
value = 3+(var(0)=-3)
 
[State 20000, Angle Control]
type = VarSet
trigger1 = var(0)<=160
fv = 1
value = fvar(1)-ifelse(var(0)<=10,25.0/(var(0)+20.0),0.02)
 
[State 20000, Image X Scale]
type = VarSet
trigger1 = var(0)<=10
fv = 10
value = ifelse(var(0)<0,1.0/var(0),var(0))
 
[State 20000, Image Y Scale]
type = VarSet
trigger1 = var(0)<10
fv = 11
value = ifelse(var(0)<0,var(0),1.0/var(0))
 
[State 20000, Image Y Scale]
type = VarSet
trigger1 = var(0)=[10,160]
fv = 11
value = (1.0/10.0)-log(0.82,var(0)-9)
 
[State 20000, Image Y Scale]
type = VarSet
trigger1 = var(0)>=160
fv = 11
value = 0.001+fvar(11)/2.0
 

I deleted the Helper and added this Explod instead:

Code:
[State 20001, Self]
type = Explod
trigger1 = Time = [252, 452] ;1
anim = 3211
ID         = 1
space = screen
pos         = ifelse(facing,(screenWidth*0.5-170),(screenWidth*0.5+170)), (20+0.5*fvar(11))
scale = 0.23,0.23
;angle = (parent,fvar(1))*(0.01+1.7/(time*0.23+1))*facing
facing = 1
removetime = 1
pausemovetime  = 9999
supermovetime = 9999
sprpriority         = -10
ownpal = 0

PS: I commented( ; ) the "angle" because it is a plus feature to give us an "anim effect" with the fvar(1) code help. Without it there is no anim.   


DG Mugen Creations: https://dgmugen.com.br
Support Me: Patreon
Support Me: Other Options
Last Edit: October 31, 2021, 07:31:05 pm by DG