Skip to content

Quality of Life additions #457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions assets/data/stages/philly.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var trainCooldown:Int = 0;
function create() {
// defaultCamZoom = 0.5;
phillyTrain.moves = true; // Def value false in funkinsprite
light.color = colors[curColor];
light.color = colors[curColor]; lightGlow.color = light.color;
trainSound = FlxG.sound.load(Paths.sound("train_passes"));
}

Expand All @@ -31,7 +31,7 @@ function beatHit(curBeat:Int) {
var newColor = FlxG.random.int(0, colors.length-2);
if (newColor >= curColor) newColor++;
curColor = newColor;
light.color = colors[curColor];
light.color = colors[curColor]; lightGlow.color = light.color;
}

if (!trainMoving)
Expand All @@ -50,6 +50,8 @@ function update(elapsed:Float) {
else
light.alpha = 0;

lightGlow.alpha = light.alpha - 0.25;

if (trainMoving) {
updateTrainPos();
}
Expand All @@ -69,7 +71,7 @@ function updateTrainPos():Void
if (trainSound.time >= 4700)
{
startedMoving = true;
gf.playAnim('hairBlow');
if (gf != null) gf.playAnim('hairBlow');
}

if (startedMoving)
Expand Down
3 changes: 3 additions & 0 deletions assets/data/stages/philly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<sprite name="bg" x="-100" y="0" sprite="sky" scroll="0.1" zoomfactor="0"/>
<sprite name="city" x="-10" y="0" sprite="city" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3"/>
<sprite name="light" x="-10" y="0" sprite="win" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3"/>
<sprite name="lightGlow" x="-10" y="0" sprite="winGlow" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3">
<property name="blend" type="float" value="1"/>
Copy link
Member

@NeeEoo NeeEoo Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a int not float

This comment was marked as spam.

</sprite>
<sprite name="streetBehind" x="-40" y="50" sprite="behindTrain" zoomfactor="1" />
<sprite name="phillyTrain" x="2000" y="360" sprite="train" zoomfactor="1" />
<sprite name="street" x="-40" y="50" sprite="street" zoomfactor="1" />
Expand Down
Binary file added assets/images/stages/philly/winGlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions assets/songs/monster/scripts/vignette.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function create()
{
if (!Options.gameplayShaders)
{
disableScript();
return;
}

vignette = new CustomShader('coloredVignette');
vignette.color = [0, 0, 0];
vignette.amount = 1;
vignette.strength = 1 - (health / 2) / 1.5;
camGame.addShader(vignette);
}

function update(elapsed:Float)
{
var targetStrength:Float = 1 - (health / 2) / 1.5;

var bg = stage.stageSprites.get('bg');
if (bg.animation.name == 'lightning' && !bg.animation.finished)
vignette.strength = 0.075;
else
vignette.strength = lerp(vignette.strength, targetStrength, 0.1);
}

function onGameOver()
{
FlxTween.tween(vignette, {"strength": 0.075}, 1, {ease: FlxEase.quadOut});
}