Skip to content

Commit

Permalink
Version 0.2
Browse files Browse the repository at this point in the history
* (Kind of) Fixed Downscroll
* Changed Note Splash textures to Unofficial ones made by Keoiki
* Added an anti-crash prevention to Health icons
* Removed Mind Games leftover from HealthIcon.hx
  • Loading branch information
ShadowMario committed Jul 16, 2021
1 parent 35d035f commit 8c00bb3
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 59 deletions.
Binary file added assets/preload/images/credits/keoiki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/shared/images/noteSplashes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 33 additions & 33 deletions assets/shared/images/noteSplashes.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="noteSplashes.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- Created with Adobe Animate version 21.0.7.42652 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="note impact 1 blue0000" x="1850" y="262" width="189" height="270" frameX="-32" frameY="-12" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 blue0001" x="1540" y="556" width="213" height="265" frameX="-27" frameY="-22" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 blue0002" x="1056" y="0" width="252" height="291" frameX="-4" frameY="-6" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 blue0003" x="0" y="0" width="260" height="298"/>
<SubTexture name="note impact 1 green0000" x="663" y="806" width="189" height="270" frameX="-32" frameY="-12" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 green0001" x="1757" y="556" width="213" height="265" frameX="-27" frameY="-22" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 green0002" x="1312" y="0" width="252" height="291" frameX="-4" frameY="-6" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 green0003" x="264" y="0" width="260" height="298"/>
<SubTexture name="note impact 1 purple0000" x="1121" y="818" width="189" height="270" frameX="-32" frameY="-12" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 purple0001" x="0" y="563" width="213" height="265" frameX="-27" frameY="-22" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 purple0002" x="1568" y="0" width="252" height="291" frameX="-4" frameY="-6" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 purple0003" x="528" y="0" width="260" height="298"/>
<SubTexture name="note impact 1 red0000" x="1314" y="818" width="189" height="270" frameX="-32" frameY="-12" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 red0001" x="217" y="563" width="213" height="265" frameX="-27" frameY="-22" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 red0002" x="1056" y="295" width="252" height="291" frameX="-4" frameY="-6" frameWidth="260" frameHeight="298"/>
<SubTexture name="note impact 1 red0003" x="792" y="0" width="260" height="298"/>
<SubTexture name="note impact 2 blue0000" x="1121" y="590" width="169" height="201" frameX="-45" frameY="-41" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 blue0001" x="434" y="564" width="225" height="238" frameX="-20" frameY="-19" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 blue0002" x="1312" y="295" width="265" height="257" frameX="0" frameY="-10" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 blue0003" x="1824" y="0" width="224" height="258" frameX="-50" frameY="0" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 green0000" x="1507" y="825" width="169" height="201" frameX="-45" frameY="-41" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 green0001" x="663" y="564" width="225" height="238" frameX="-20" frameY="-19" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 green0002" x="1581" y="295" width="265" height="257" frameX="0" frameY="-10" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 green0003" x="538" y="302" width="224" height="258" frameX="-50" frameY="0" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 purple0000" x="1680" y="825" width="169" height="201" frameX="-45" frameY="-41" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 purple0001" x="892" y="590" width="225" height="238" frameX="-20" frameY="-19" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 purple0002" x="0" y="302" width="265" height="257" frameX="0" frameY="-10" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 purple0003" x="766" y="302" width="224" height="258" frameX="-50" frameY="0" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 red0000" x="1853" y="825" width="169" height="201" frameX="-45" frameY="-41" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 red0001" x="434" y="806" width="225" height="238" frameX="-20" frameY="-19" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 red0002" x="269" y="302" width="265" height="257" frameX="0" frameY="-10" frameWidth="274" frameHeight="267"/>
<SubTexture name="note impact 2 red0003" x="1312" y="556" width="224" height="258" frameX="-50" frameY="0" frameWidth="274" frameHeight="267"/>
<SubTexture name="note splash blue 10000" x="0" y="0" width="194" height="186" frameX="-47" frameY="-57" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash blue 10001" x="199" y="0" width="220" height="218" frameX="-31" frameY="-34" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash blue 10002" x="424" y="0" width="284" height="293" frameX="-7" frameY="-2" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash blue 10003" x="713" y="0" width="291" height="303"/>
<SubTexture name="note splash blue 20000" x="1009" y="0" width="202" height="211" frameX="-69" frameY="-68" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash blue 20001" x="1216" y="0" width="235" height="240" frameX="-47" frameY="-45" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash blue 20002" x="1456" y="0" width="298" height="315" frameX="-9" frameY="-6" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash blue 20003" x="0" y="320" width="315" height="321"/>
<SubTexture name="note splash green 10000" x="320" y="320" width="194" height="186" frameX="-47" frameY="-57" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash green 10001" x="519" y="320" width="220" height="218" frameX="-31" frameY="-34" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash green 10002" x="744" y="320" width="284" height="293" frameX="-7" frameY="-2" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash green 10003" x="1033" y="320" width="291" height="303"/>
<SubTexture name="note splash green 20000" x="1329" y="320" width="202" height="211" frameX="-69" frameY="-68" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash green 20001" x="1536" y="320" width="235" height="240" frameX="-47" frameY="-45" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash green 20002" x="0" y="646" width="298" height="315" frameX="-9" frameY="-6" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash green 20003" x="303" y="646" width="315" height="321"/>
<SubTexture name="note splash purple 10000" x="623" y="646" width="194" height="186" frameX="-47" frameY="-57" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash purple 10001" x="822" y="646" width="220" height="218" frameX="-31" frameY="-34" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash purple 10002" x="1047" y="646" width="284" height="293" frameX="-7" frameY="-2" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash purple 10003" x="1336" y="646" width="291" height="303"/>
<SubTexture name="note splash purple 20000" x="1632" y="646" width="202" height="211" frameX="-69" frameY="-68" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash purple 20001" x="0" y="972" width="235" height="240" frameX="-47" frameY="-45" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash purple 20002" x="240" y="972" width="298" height="315" frameX="-9" frameY="-6" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash purple 20003" x="543" y="972" width="315" height="321"/>
<SubTexture name="note splash red 10000" x="863" y="972" width="194" height="186" frameX="-47" frameY="-57" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash red 10001" x="1062" y="972" width="220" height="218" frameX="-31" frameY="-34" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash red 10002" x="1287" y="972" width="284" height="293" frameX="-7" frameY="-2" frameWidth="291" frameHeight="303"/>
<SubTexture name="note splash red 10003" x="1576" y="972" width="291" height="303"/>
<SubTexture name="note splash red 20000" x="0" y="1298" width="202" height="211" frameX="-69" frameY="-68" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash red 20001" x="207" y="1298" width="235" height="240" frameX="-47" frameY="-45" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash red 20002" x="447" y="1298" width="298" height="315" frameX="-9" frameY="-6" frameWidth="315" frameHeight="321"/>
<SubTexture name="note splash red 20003" x="750" y="1298" width="315" height="321"/>
</TextureAtlas>
5 changes: 4 additions & 1 deletion source/CreditsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class CreditsState extends MusicBeatState
private static var creditsStuff:Array<Dynamic> = [ //Name - Icon name - Description - Link - BG Color
['Psych Engine Team'],
['Shadow Mario', 'shadowmario', 'Main Programmer of Psych Engine', 'https://twitter.com/Shadow_Mario_', 0xFFFFDD33],
['RiverOaken', 'riveroaken', 'Artist/Animator of Psych Engine', 'https://twitter.com/river_oaken', 0xFFC30085],
['RiverOaken', 'riveroaken', 'Main Artist/Animator of Psych Engine', 'https://twitter.com/river_oaken', 0xFFC30085],
[''],
['Special Thanks'],
['Keoiki', 'keoiki', 'Note Splash Animations', 'https://twitter.com/Keoiki_', 0xFFFFFFFF],
[''],
["Funkin' Crew"],
['ninjamuffin99', 'ninjamuffin99', "Programmer of Friday Night Funkin'", 'https://twitter.com/ninja_muffin99', 0xFFF73838],
Expand Down
7 changes: 5 additions & 2 deletions source/HealthIcon.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package;

import flixel.FlxSprite;
import openfl.utils.Assets as OpenFlAssets;

using StringTools;

Expand Down Expand Up @@ -34,13 +35,15 @@ class HealthIcon extends FlxSprite
}

public function changeIcon(char:String) {
if(char == 'sussy-tower') char = 'face';
if(char != 'bf-pixel' && char != 'bf-old') {
char = (char.split('-')[0]).trim();
}

if(this.char != char) {
loadGraphic(Paths.image('icons/icon-' + char), true, 150, 150);
var file:String = Paths.image('icons/icon-' + char);
if(!OpenFlAssets.exists(file)) file = Paths.image('icons/icon-face'); //Prevents crash from missing icon

loadGraphic(file, true, 150, 150);
animation.add(char, [0, 1], 0, false, isPlayer);
animation.play(char);
this.char = char;
Expand Down
2 changes: 1 addition & 1 deletion source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using StringTools;

class MainMenuState extends MusicBeatState
{
var psychEngineVersion:String = '0.1.2';
var psychEngineVersion:String = '0.2';
public static var curSelected:Int = 0;

var menuItems:FlxTypedGroup<FlxSprite>;
Expand Down
26 changes: 15 additions & 11 deletions source/NoteSplash.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,29 @@ class NoteSplash extends FlxSprite
super(x, y);

frames = Paths.getSparrowAtlas('noteSplashes');
animation.addByPrefix("note1-0", "note impact 1 blue", 24, false);
animation.addByPrefix("note2-0", "note impact 1 green", 24, false);
animation.addByPrefix("note0-0", "note impact 1 purple", 24, false);
animation.addByPrefix("note3-0", "note impact 1 red", 24, false);
animation.addByPrefix("note1-1", "note impact 2 blue", 24, false);
animation.addByPrefix("note2-1", "note impact 2 green", 24, false);
animation.addByPrefix("note0-1", "note impact 2 purple", 24, false);
animation.addByPrefix("note3-1", "note impact 2 red", 24, false);
for (i in 1...3) {
animation.addByPrefix("note1-" + i, "note splash blue " + i, 24, false);
animation.addByPrefix("note2-" + i, "note splash green " + i, 24, false);
animation.addByPrefix("note0-" + i, "note splash purple " + i, 24, false);
animation.addByPrefix("note3-" + i, "note splash red " + i, 24, false);
}
setupNoteSplash(x, y, note);
antialiasing = ClientPrefs.globalAntialiasing;
}

public function setupNoteSplash(x:Float, y:Float, ?note:Int = 0) {
setPosition(x, y);
setPosition(x - Note.swagWidth * 0.95, y - Note.swagWidth);
alpha = 0.6;
animation.play('note' + note + '-' + FlxG.random.int(0, 1), true);
var animNum:Int = FlxG.random.int(1, 2);
if(animNum == 2) {
offset.set(20, 20);
} else {
offset.set(10, 10);
}

animation.play('note' + note + '-' + animNum, true);
animation.curAnim.frameRate = 24 + FlxG.random.int(-2, 2);
updateHitbox();
offset.set(Std.int(0.3 * width), Std.int(0.3 * height));
if(colorSwap == null) {
colorSwap = new ColorSwap();
shader = colorSwap.shader;
Expand Down
29 changes: 18 additions & 11 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,9 @@ class PlayState extends MusicBeatState

if (generatedMusic)
{
var roundedSpeed:Float = FlxMath.roundDecimal(SONG.speed, 2);
var center:Float = strumLine.y + Note.swagWidth / 2;
var leScale:Float = (Conductor.stepCrochet / 100) * 1.5 * roundedSpeed;
notes.forEachAlive(function(daNote:Note)
{
if (daNote.y > FlxG.height)
Expand All @@ -1993,15 +1996,16 @@ class PlayState extends MusicBeatState
}

// i am so fucking sorry for this if condition
var center:Float = strumLine.y + Note.swagWidth / 2;
if (ClientPrefs.downScroll) {
daNote.y = (strumLine.y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(SONG.speed, 2));
daNote.y = (strumLine.y + 0.45 * (Conductor.songPosition - daNote.strumTime) * roundedSpeed);
if (daNote.isSustainNote) {
if (daNote.animation.curAnim.name.endsWith('end') && daNote.prevNote != null) {
daNote.y += daNote.prevNote.height;
} else {
daNote.y += daNote.height / 2;
}
//Jesus fuck this took me so much mother fucking time AAAAAAAAAA
if (daNote.animation.curAnim.name.endsWith('end')) {
daNote.y += 10.25 * leScale + (46 * (roundedSpeed - 1));
daNote.y -= 23 * ((SONG.bpm / 100) - 1) * roundedSpeed;
}
daNote.y += (Note.swagWidth / 2) - (68 * (roundedSpeed - 1));
daNote.y += 27.5 * ((SONG.bpm / 100) - 1) * (roundedSpeed - 1);

if(daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= center
&& (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))))
Expand All @@ -2014,7 +2018,7 @@ class PlayState extends MusicBeatState
}
}
} else {
daNote.y = (strumLine.y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(SONG.speed, 2));
daNote.y = (strumLine.y - 0.45 * (Conductor.songPosition - daNote.strumTime) * roundedSpeed);

if (daNote.isSustainNote
&& daNote.y + daNote.offset.y * daNote.scale.y <= center
Expand Down Expand Up @@ -2582,9 +2586,12 @@ class PlayState extends MusicBeatState

if(daRating == 'sick' && ClientPrefs.noteSplashes && note != null)
{
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
splash.setupNoteSplash(note.x, note.y, note.noteData);
grpNoteSplashes.add(splash);
var strum:StrumNote = playerStrums.members[note.noteData];
if(strum != null) {
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
splash.setupNoteSplash(strum.x, strum.y, note.noteData);
grpNoteSplashes.add(splash);
}
}

if(!practiceMode) {
Expand Down

0 comments on commit 8c00bb3

Please sign in to comment.