Transition and evaluation tweaks.

Sped up gameplay outro and eval animations, profile save/load now
properly uses offcommands rather than opaque throbber behaviour, Song
title on evaluation was also moved slightly upward a bit,
This commit is contained in:
ListenerJubatus
2018-01-26 20:34:24 -06:00
parent d68557a37b
commit 10d78a5664
5 changed files with 46 additions and 29 deletions
@@ -16,6 +16,8 @@ local eval_radar = {
} }
local grade_area_offset = 16 local grade_area_offset = 16
local fade_out_speed = 0.3
local fade_out_pause = 0.08
-- And a function to make even better use out of the table. -- And a function to make even better use out of the table.
local function GetJLineValue(line, pl) local function GetJLineValue(line, pl)
@@ -75,7 +77,7 @@ if not GAMESTATE:IsCourseMode() then
mid_pane[#mid_pane+1] = Def.BitmapText { mid_pane[#mid_pane+1] = Def.BitmapText {
Font="Common Fallback", Font="Common Fallback",
InitCommand=function(self) InitCommand=function(self)
self:x(_screen.cx):y(_screen.cy+188):diffuse(color("#512232")):shadowlength(1):zoom(0.75):maxwidth(500) self:x(_screen.cx):y(_screen.cy+188-6):diffuse(color("#512232")):shadowlength(1):zoom(0.75):maxwidth(500)
end; end;
OnCommand=function(self) OnCommand=function(self)
local song = GAMESTATE:GetCurrentSong(); local song = GAMESTATE:GetCurrentSong();
@@ -84,14 +86,14 @@ if not GAMESTATE:IsCourseMode() then
else else
self:settext(""); self:settext("");
end; end;
self:diffusealpha(0):sleep(1.3):decelerate(0.4):diffusealpha(1) self:diffusealpha(0):sleep(1.0):decelerate(0.4):diffusealpha(1)
end, end,
OffCommand=cmd(decelerate,0.4;diffusealpha,0) OffCommand=cmd(decelerate,0.4;diffusealpha,0)
} }
mid_pane[#mid_pane+1] = Def.BitmapText { mid_pane[#mid_pane+1] = Def.BitmapText {
Font="Common Fallback", Font="Common Fallback",
InitCommand=function(self) InitCommand=function(self)
self:x(_screen.cx):y(_screen.cy+188+22):diffuse(color("#512232")):shadowlength(1):zoom(0.6):maxwidth(500) self:x(_screen.cx):y(_screen.cy+188+22-6):diffuse(color("#512232")):shadowlength(1):zoom(0.6):maxwidth(500)
end; end;
OnCommand=function(self) OnCommand=function(self)
local song = GAMESTATE:GetCurrentSong(); local song = GAMESTATE:GetCurrentSong();
@@ -100,7 +102,7 @@ if not GAMESTATE:IsCourseMode() then
else else
self:settext(""); self:settext("");
end; end;
self:diffusealpha(0):sleep(1.3):decelerate(0.4):diffusealpha(1) self:diffusealpha(0):sleep(1.1):decelerate(0.4):diffusealpha(1)
end, end,
OffCommand=cmd(decelerate,0.4;diffusealpha,0) OffCommand=cmd(decelerate,0.4;diffusealpha,0)
} }
@@ -108,7 +110,7 @@ else
mid_pane[#mid_pane+1] = Def.BitmapText { mid_pane[#mid_pane+1] = Def.BitmapText {
Font="Common Fallback", Font="Common Fallback",
InitCommand=function(self) InitCommand=function(self)
self:x(_screen.cx):y(_screen.cy+188):diffuse(color("#512232")):shadowlength(1):zoom(0.75):maxwidth(500) self:x(_screen.cx):y(_screen.cy+188-6):diffuse(color("#512232")):shadowlength(1):zoom(0.75):maxwidth(500)
end; end;
OnCommand=function(self) OnCommand=function(self)
local course = GAMESTATE:GetCurrentCourse() local course = GAMESTATE:GetCurrentCourse()
@@ -126,13 +128,13 @@ for i, v in ipairs(eval_lines) do
mid_pane[#mid_pane+1] = Def.ActorFrame{ mid_pane[#mid_pane+1] = Def.ActorFrame{
InitCommand=cmd(x,_screen.cx;y,(_screen.cy/1.48)+(spacing)), InitCommand=cmd(x,_screen.cx;y,(_screen.cy/1.48)+(spacing)),
OffCommand=function(self)
self:sleep(0.13 * i):decelerate(0.6):diffusealpha(0)
end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;); InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;);
OnCommand=function(self) OnCommand=function(self)
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(1)
end;
OffCommand=function(self)
self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
}; };
@@ -140,7 +142,10 @@ for i, v in ipairs(eval_lines) do
Font = "_roboto condensed Bold 48px", Font = "_roboto condensed Bold 48px",
InitCommand=cmd(zoom,0.6;diffuse,color("#000000");settext,string.upper(JudgmentLineToLocalizedString(cur_line))); InitCommand=cmd(zoom,0.6;diffuse,color("#000000");settext,string.upper(JudgmentLineToLocalizedString(cur_line)));
OnCommand=function(self) OnCommand=function(self)
self:diffusealpha(0):sleep(0.13 * i):decelerate(0.6):diffusealpha(0.6) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(0.8)
end;
OffCommand=function(self)
self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
} }
} }
@@ -175,7 +180,7 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(1) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(1)
end; end;
OffCommand=function(self) OffCommand=function(self)
self:sleep(0.07 * i):decelerate(0.3):diffusealpha(0) self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
} }
end end
@@ -14,6 +14,9 @@ local eval_lines = {
local grade_area_offset = 16 local grade_area_offset = 16
local fade_out_speed = 0.3
local fade_out_pause = 0.08
-- And a function to make even better use out of the table. -- And a function to make even better use out of the table.
local function GetJLineValue(line, pl) local function GetJLineValue(line, pl)
if line == "Held" then if line == "Held" then
@@ -50,13 +53,13 @@ for i, v in ipairs(eval_lines) do
t[#t+1] = Def.ActorFrame{ t[#t+1] = Def.ActorFrame{
InitCommand=cmd(x,_screen.cx;y,(_screen.cy/1.6)+(spacing)), InitCommand=cmd(x,_screen.cx;y,(_screen.cy/1.6)+(spacing)),
OffCommand=function(self)
self:sleep(0.13 * i):decelerate(0.6):diffusealpha(0)
end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;); InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;);
OnCommand=function(self) OnCommand=function(self)
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(0.8)
end;
OffCommand=function(self)
self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
}; };
@@ -64,7 +67,10 @@ for i, v in ipairs(eval_lines) do
Font = "_roboto condensed Bold 48px", Font = "_roboto condensed Bold 48px",
InitCommand=cmd(zoom,0.6;diffuse,color("#000000");settext,string.upper(JudgmentLineToLocalizedString(cur_line))); InitCommand=cmd(zoom,0.6;diffuse,color("#000000");settext,string.upper(JudgmentLineToLocalizedString(cur_line)));
OnCommand=function(self) OnCommand=function(self)
self:diffusealpha(0):sleep(0.13 * i):decelerate(0.6):diffusealpha(0.6) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(0.8)
end;
OffCommand=function(self)
self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
} }
} }
@@ -94,10 +100,10 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
else else
self:horizalign(left) self:horizalign(left)
end end
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1) self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(1)
end; end;
OffCommand=function(self) OffCommand=function(self)
self:sleep(0.1 * i):decelerate(0.3):diffusealpha(0) self:sleep(fade_out_pause * i):decelerate(fade_out_speed):diffusealpha(0)
end; end;
} }
end end
@@ -3,7 +3,7 @@ local raveChildren
local bg = Def.ActorFrame{ local bg = Def.ActorFrame{
Def.Quad{ Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0")); InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
StartTransitioningCommand=cmd(linear,5;diffusealpha,1); StartTransitioningCommand=cmd(linear,3;diffusealpha,1);
}; };
Def.ActorFrame{ Def.ActorFrame{
@@ -32,17 +32,17 @@ local bg = Def.ActorFrame{
LoadActor(THEME:GetPathG("_rave result","P1"))..{ LoadActor(THEME:GetPathG("_rave result","P1"))..{
Name="P1Win"; Name="P1Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
StartTransitioningCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); StartTransitioningCommand=cmd(sleep,1.0;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
}; };
LoadActor(THEME:GetPathG("_rave result","P2"))..{ LoadActor(THEME:GetPathG("_rave result","P2"))..{
Name="P2Win"; Name="P2Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
StartTransitioningCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); StartTransitioningCommand=cmd(sleep,1.0;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
}; };
LoadActor(THEME:GetPathG("_rave result","draw"))..{ LoadActor(THEME:GetPathG("_rave result","draw"))..{
Name="Draw"; Name="Draw";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
StartTransitioningCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); StartTransitioningCommand=cmd(sleep,1.0;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
}; };
}; };
}; };
@@ -8,8 +8,11 @@ t[#t+1] = Def.ActorFrame {
self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#6248A7")):Center() self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#6248A7")):Center()
end, end,
OnCommand=function(self) OnCommand=function(self)
self:zoom(0):decelerate(0.25):zoom(0.5):sleep(0.5):decelerate(0.25):zoom(0) self:zoom(0):decelerate(0.25):zoom(0.5)
end end;
OffCommand=function(self)
self:decelerate(0.25):zoom(0)
end;
}; };
}; };
@@ -8,8 +8,11 @@ t[#t+1] = Def.ActorFrame {
self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#95326F")):Center() self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#95326F")):Center()
end, end,
OnCommand=function(self) OnCommand=function(self)
self:zoom(0):decelerate(0.25):zoom(0.5):sleep(0.5):decelerate(0.25):zoom(0) self:zoom(0):decelerate(0.25):zoom(0.5)
end end;
OffCommand=function(self)
self:decelerate(0.25):zoom(0)
end;
}; };
}; };