Skip to content

Commit

Permalink
Reduce Gameplay code, remove PlayerNumber macros, and more
Browse files Browse the repository at this point in the history
more: remove a variable referring to multiplayer that is not really useful anywhere in the game's current state and better used in another way
shaved so much stuff off of gameplay I gained 200 fps (on top of about 1200 fps average)
  • Loading branch information
poco0317 committed Jul 30, 2019
1 parent 0375254 commit cd23136
Show file tree
Hide file tree
Showing 28 changed files with 1,285 additions and 1,973 deletions.
27 changes: 0 additions & 27 deletions Themes/Til Death/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -528,34 +528,7 @@ LifeP1X=50+128
LifeP1Y=10
LifeP1OnCommand=halign,0;draworder,101;

LifeP2X=SCREEN_WIDTH-50-128
LifeP2Y=10
LifeP2OnCommand=halign,1;zoomx,-1;draworder,101;

ScoreP1OnCommand=visible,false;
ScoreP2OnCommand=visible,false;

# online scoreboard
# P1 is used when the only player is P2
ScoreboardC1P1X=250
ScoreboardC1P1Y=50
ScoreboardC1P1OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1
ScoreboardC2P1X=190
ScoreboardC2P1Y=50
ScoreboardC2P1OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1
ScoreboardC3P1X=140
ScoreboardC3P1Y=50
ScoreboardC3P1OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1
# P2 is used when the only player is P1
ScoreboardC1P2X=SCREEN_WIDTH-250
ScoreboardC1P2Y=50
ScoreboardC1P2OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1
ScoreboardC2P2X=SCREEN_WIDTH-190
ScoreboardC2P2Y=50
ScoreboardC2P2OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1
ScoreboardC3P2X=SCREEN_WIDTH-140
ScoreboardC3P2Y=50
ScoreboardC3P2OnCommand=zoom,0.4;strokecolor,Color("Outline");shadowlength,1

#From default
[StreamDisplay]
Expand Down
5 changes: 0 additions & 5 deletions Themes/_fallback/base._ini
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,6 @@ TimerSeconds=-1
UseAlternativeInput=false
PlayerType="Player"
PlayerInitCommand=y,SCREEN_CENTER_Y
StartGivesUp=true
BackGivesUp=false
FailOnMissCombo=-1
GivingUpGoesToPrevScreen=false
GivingUpGoesToNextScreen=false
InitialBackgroundBrightness=1
Expand All @@ -607,7 +604,6 @@ MusicFadeOutSeconds=0.5
OutTransitionLength=1.5
CourseTransitionLength=0.5
BeginFailedDelay=1.0
AllowCenter1Player=true
ScoreKeeperClass="ScoreKeeperNormal"
SongBackgroundOnCommand=
SongForegroundOnCommand=
Expand Down Expand Up @@ -730,7 +726,6 @@ DebugOnCommand=wrapwidthpixels,SCREEN_WIDTH-50;strokecolor,color("#000000");
DebugOffCommand=stoptweening;linear,1/8;diffusealpha,0
SecondsBetweenComments=10
TickEarlySeconds=0.05
ShowLifeMeterForDisabledPlayers=false
PlayerP1OnCommand=
PlayerP1OffCommand=
PlayerP1OnePlayerOneSideX=math.floor(scale(0.25,0,1,SCREEN_LEFT,SCREEN_RIGHT))
Expand Down
56 changes: 0 additions & 56 deletions Themes/_fallback/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2563,23 +2563,16 @@ NextScreen=Branch.AfterGameplay()
PrevScreen=Branch.BackOutOfStageInformation()
TimerSeconds=-1
#
ShowLifeMeterForDisabledPlayers=false
InitialBackgroundBrightness=1.0
SecondsBetweenComments=10.0
ScoreKeeperClass=ScoreKeeperClass()
ForceImmediateFailForBattery=true
TickEarlySeconds=0
#
PlayerType="Player"
# useful in some obscure situations where the theme resolution has been increased.
PlayerInitCommand=y,SCREEN_CENTER_Y;zoom,(THEME:GetMetric("Common","ScreenHeight")/480)
StartGivesUp=true
BackGivesUp=false
GiveUpSeconds=2.5
# rage
AllowCenter1Player=true
#
FailOnMissCombo=FailCombo()
GivingUpGoesToPrevScreen=false
GivingUpGoesToNextScreen=false
SelectSkipsSong=true
Expand Down Expand Up @@ -2614,60 +2607,18 @@ StepsDescriptionP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSid
StepsDescriptionP1Y=SCREEN_CENTER_Y-24
StepsDescriptionP1OnCommand=visible,false
StepsDescriptionP1OffCommand=
StepsDescriptionP2X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX")
StepsDescriptionP2Y=SCREEN_CENTER_Y-24
StepsDescriptionP2OnCommand=visible,false
StepsDescriptionP2OffCommand=
#
PlayerOptionsP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX")
PlayerOptionsP1Y=SCREEN_CENTER_Y+24
PlayerOptionsP1OnCommand=visible,false
PlayerOptionsP1OffCommand=
#
StepsDisplayP1X=SCREEN_CENTER_X-160
StepsDisplayP1Y=SCREEN_BOTTOM-60
StepsDisplayP1OnCommand=visible,false
StepsDisplayP1OffCommand=
#
SongOptionsX=SCREEN_CENTER_X
SongOptionsY=SCREEN_BOTTOM-32
SongOptionsOnCommand=visible,false
SongOptionsOffCommand=
#
DebugX=SCREEN_CENTER_X
DebugY=SCREEN_BOTTOM-116
DebugOnCommand=zoom,0.75
DebugStartOnCommand=stoptweening;diffusealpha,0;sleep,0.2;linear,1/8;diffusealpha,1
DebugBackOnCommand=stoptweening;diffusealpha,0;linear,1/8;diffusealpha,1
DebugTweenOffCommand=stoptweening;linear,1/8;diffusealpha,0
#
SongNumberFormat="%d"
SongNumberP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") - 60
SongNumberP1Y=SCREEN_TOP+24+7
SongNumberP1OnCommand=visible,false
SongNumberP1OffCommand=

# online scoreboard
# P1 is used when the only player is P2
ScoreboardC1P1X=SCREEN_CENTER_X*0.25
ScoreboardC1P1Y=SCREEN_CENTER_Y*0.45
ScoreboardC1P1OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
ScoreboardC2P1X=SCREEN_CENTER_X*0.5
ScoreboardC2P1Y=SCREEN_CENTER_Y*0.45
ScoreboardC2P1OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
ScoreboardC3P1X=SCREEN_CENTER_X*0.75
ScoreboardC3P1Y=SCREEN_CENTER_Y*0.45
ScoreboardC3P1OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
# P2 is used when the only player is P1
ScoreboardC1P2X=SCREEN_CENTER_X*1.25
ScoreboardC1P2Y=SCREEN_CENTER_Y*0.45
ScoreboardC1P2OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
ScoreboardC2P2X=SCREEN_CENTER_X*1.5
ScoreboardC2P2Y=SCREEN_CENTER_Y*0.45
ScoreboardC2P2OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
ScoreboardC3P2X=SCREEN_CENTER_X*1.75
ScoreboardC3P2Y=SCREEN_CENTER_Y*0.45
ScoreboardC3P2OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1

[ScreenEvaluation]
Class="ScreenEvaluation"
Expand Down Expand Up @@ -2882,22 +2833,15 @@ PrevScreen="ScreenOptionsInputSub"
NextScreen="ScreenOptionsInputSub"
PlayerType="PlayerSyncMachine"

#AllowCenter1Player=false
SyncInfoOnCommand=x,PositionPerPlayer(GAMESTATE:GetMasterPlayerNumber(),SCREEN_CENTER_X+160,SCREEN_CENTER_X-160);y,SCREEN_CENTER_Y;zoom,0;decelerate,0.5;zoom,0.6

# hidden by default:
LifeP1OnCommand=visible,false
LifeP2OnCommand=visible,false
ScoreP1OnCommand=visible,false
ScoreP2OnCommand=visible,false
StageOnCommand=visible,false
ScoreFrameOnCommand=visible,false
LifeFrameOnCommand=visible,false
DifficultyP1OnCommand=visible,false
DifficultyP1ReverseOnCommand=visible,false
DifficultyP2OnCommand=visible,false
DifficultyP2ReverseOnCommand=visible,false
SongOptionsOnCommand=visible,false

[PlayerSyncMachine]
Fallback="Player"
Expand Down
Loading

0 comments on commit cd23136

Please sign in to comment.