Skip to content

Commit

Permalink
ASSORIYAN ENGINE FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Legendary-Candice-Joe committed Oct 26, 2023
1 parent 3fc4889 commit 8d3fb73
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ Chart editor fix (again).
1. Added StaticSprite, a sprite with no update. Mild performance increase I guess.
2. Fixed chart editor bug where the section would get stuck at the end.
3. Split stage curtains into 2 sprites, and lowered the res on the back sprite, big peformance increase.
4. ChartingState UI highlighting effect.
4. ChartingState UI highlighting effect.
5. Input and framerate fixes for web build.
6. Windows and Linux release now compiled with GCC, and compiler optimizations. (Read Release please!)
7. Allow pausing on countdown without breaking.
8. Fixed arrow fade in (whoopsie it's been wrong all this time).
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ although Assorion Engine may have several <a href="https://github.com/Assorion/F
- Assorion Engine based off <a href="https://github.com/FunkinCrew/Funkin/releases/tag/v0.2.6">`0.2.6`</a> version of the base game
- Songs and Data folder have been merged into the songs-data folder
- Pressing the F12 key in gameplay uses an experimental screenshot feature. When pressed, a folder and file will be created
- Web build compiles, but is full of bugs still. These will be fixed later.

**RoadMap**
* [x] Offset wizard
Expand Down
5 changes: 5 additions & 0 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ class Main extends Sprite
memC = new ui.MemCounter(10, 18, 0xFFFFFF);
addChild(fpsC);
addChild(memC);

#if (!desktop)
flixel.FlxG.keys.preventDefaultKeys = [];
Settings.pr.framerate = 60;
#end

Settings.apply();
}
Expand Down
36 changes: 17 additions & 19 deletions source/gameplay/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class PlayState extends MusicBeatState
public var vocals:FlxSound;
public var notes:FlxTypedGroup<Note>;
public var unspawnNotes:Array<Note> = [];
public var highestPossibleScore:Int = 0;

public var strumLine:FlxObject;
public var followPos:FlxObject;
Expand Down Expand Up @@ -290,7 +289,6 @@ class PlayState extends MusicBeatState
newNote.scrollFactor.set();
newNote.player = player;
unspawnNotes.push(newNote);
highestPossibleScore += player == playerPos ? 350 : 0;

if(susLength > 1)
for(i in 0...susLength+1){
Expand All @@ -306,7 +304,7 @@ class PlayState extends MusicBeatState
private function generateStaticArrows(player:Int, playable:Bool):Void
for (i in 0...4)
{
var babyArrow:StrumNote = new StrumNote(0, strumLine.y, i, player);
var babyArrow:StrumNote = new StrumNote(0, strumLine.y - 10, i, player);
babyArrow.alpha = 0;

strumLineNotes.add(babyArrow);
Expand All @@ -318,7 +316,7 @@ class PlayState extends MusicBeatState
function startCountdown():Void
{
for(i in 0...strumLineNotes.length)
FlxTween.tween(strumLineNotes.members[i], {alpha: 1}, 0.5, {startDelay: (i + 1) * 0.2});
FlxTween.tween(strumLineNotes.members[i], {alpha: 1, y: strumLineNotes.members[i].y + 10}, 0.5, {startDelay: ((i % 4) + 1) * 0.2});

var introSprites:Array<StaticSprite> = [];
var introSounds:Array<FlxSound> = [];
Expand Down Expand Up @@ -377,6 +375,7 @@ class PlayState extends MusicBeatState
if(!paused) return;

paused = false;
if(FlxG.sound.music.time == 0) return;

FlxG.sound.music.play();
vocals.play();
Expand Down Expand Up @@ -447,7 +446,7 @@ class PlayState extends MusicBeatState
var fcText:String = ['?', 'SFC', 'GFC', 'FC', '(Bad) FC', 'SDCB', 'Clear'][fcValue];
var accuracyCount:Float = fcValue != 0 ? Math.floor(songScore / ((hitCount + missCount) * 3.5)) : 0;

scoreTxt.text = 'Notes Hit: $hitCount | Notes Missed: $missCount | Accuracy: $accuracyCount% - $fcText | Score: $songScore - ${Math.floor(songScore / highestPossibleScore * 100)}%';
scoreTxt.text = 'Notes Hit: $hitCount | Notes Missed: $missCount | Accuracy: $accuracyCount% - $fcText | Score: $songScore';
scoreTxt.screenCenter(X);

health = CoolUtil.boundTo(health + change, 0, 100, true);
Expand Down Expand Up @@ -511,18 +510,6 @@ class PlayState extends MusicBeatState
updateHealth(Math.round(-Settings.pr.miss_health * 0.5));
}

inline function destroyNote(note:Note, act:Int){
note.typeAction(act);
notes.remove(note, true);
note.destroy();

if(hittableNotes[note.noteData] == null
|| hittableNotes[note.noteData] != note)
return;

hittableNotes[note.noteData] = null;
}

// # input code.
// please add any keys or stuff you want to add here.

Expand All @@ -536,8 +523,8 @@ class PlayState extends MusicBeatState
var k = key.deepCheck([NewControls.UI_ACCEPT, NewControls.UI_BACK, [FlxKey.SEVEN], [FlxKey.F12] ]);
switch(k){
case 0, 1:
if(FlxG.sound.music.playing)
pauseGame(new PauseSubState(camHUD, this));
//if(FlxG.sound.music.playing)
pauseGame(new PauseSubState(camHUD, this));
return;
case 2:
FlxG.switchState(new ChartingState());
Expand Down Expand Up @@ -750,6 +737,17 @@ class PlayState extends MusicBeatState

openSubState(state);
}
inline function destroyNote(note:Note, act:Int){
note.typeAction(act);
notes.remove(note, true);
note.destroy();

if(hittableNotes[note.noteData] == null
|| hittableNotes[note.noteData] != note)
return;

hittableNotes[note.noteData] = null;
}
private inline function introSpriteTween(spr:StaticSprite, steps:Int, delay:Float = 0, destroy:Bool):FlxTween
{
spr.alpha = 1;
Expand Down
4 changes: 3 additions & 1 deletion source/ui/OptionsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class OptionsState extends MenuTemplate
['basic', 'gameplay', 'visuals', 'controls'],
['start_fullscreen', 'start_volume', 'skip_logo', 'default_persist','launch_sprites','cache_text'],
['audio_offset', 'input_offset', 'downscroll', 'ghost_tapping', 'botplay', 'miss_health'],
['antialiasing', 'framerate', 'show_hud', 'useful_info', 'light_bot_strums']
['antialiasing', #if desktop 'framerate', #end 'show_hud', 'useful_info', 'light_bot_strums']
];

static var descriptions:Array<Array<String>> = [
Expand Down Expand Up @@ -51,7 +51,9 @@ class OptionsState extends MenuTemplate
],
[
'If you don\'t know what this does, Google it.',
#if desktop
'Changes how fast the game CAN run. I recommend setting it to 300, not the max',
#end
'Shows your health, stats, and other stuff in gameplay',
'Shows FPS and memory counter',
'Enemy notes glow like the players'
Expand Down

0 comments on commit 8d3fb73

Please sign in to comment.