Skip to content

Commit

Permalink
i uhhhh mmmhmmm
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Aug 2, 2024
1 parent ae2c2e5 commit b60cbf9
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- [ Application Settings ] -->

<app title="Rhythmo" file="Rhythmo" main="Main" version="0.3.0" company="Joalor64" />
<app title="Rhythmo" file="Rhythmo" main="Main" version="0.3.5" company="Joalor64" />

<!-- [ Window Settings ] -->

Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* [ ] Improve ChartingState

# Future To-Dos (After release)
* Polymod support (or modding support in general)
* Modding Support (Using Polymod)
* Maybe a few more songs
* Achievements
* Custom Skins
Expand Down
2 changes: 1 addition & 1 deletion docs/01 - scripting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# How to Use the Scripting System
This will teach you how to use Rhythmo's special scripting system. Basically, you can use this to make custom backgrounds, add special functions, etc.
This will teach you how to use Rhythmo's special scripting system. Basically, you can use this to make custom backgrounds, add special functions, make cool mechanics, etc.

Your script should either be located in `assets/scripts/[name].hxs`, or in `assets/songs/[your-song]/script.hxs`.

Expand Down
15 changes: 13 additions & 2 deletions docs/02 - adding-a-custom-song.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ For song data, you need the following:
* `assets/songs/[song-name]/script.hxs` (Optional)

## Charting
Lastly, to chart your song, go to PlayState and then press "7" to go to ChartingState. <br>
Before you actually chart your song, you need `chart.json`.
Use this template:
```json
{
"song": "Song Name",
"notes": [],
"bpm": 100,
"timeSignature": [4, 4]
}
```

Now, to chart your song, go to PlayState and then press "7" to go to ChartingState. <br>
When you're done, simply save the chart. It should save in `assets/songs/[song-name]/chart.json`.

You might have to manually change the BPM and time signature.
Also, you'll have to manually change the BPM and time signature beforehand.
2 changes: 1 addition & 1 deletion gitVersion.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version":"0.3.0",
"version":"0.3.5",
"description":"Lorem ipsum..."
}
2 changes: 2 additions & 0 deletions source/states/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class MenuState extends ExtendableState {
if (Input.is("accept")) {
if (selections[curSelected] == 'exit') {
FlxG.sound.play(Paths.sound('cancel'));
if (FlxG.sound.music != null)
FlxG.sound.music.fadeOut(0.3);
FlxG.camera.fade(FlxColor.BLACK, 0.5, false, () -> {
#if sys
Sys.exit(0);
Expand Down
12 changes: 11 additions & 1 deletion source/states/OptionsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class OptionsState extends ExtendableState {
var curSelected:Int = 0;
var daText:FlxText;

var checkerArray:Array<Checker> = []; // wip
var checkerArray:Array<Checker> = [];

override function create() {
super.create();
Expand All @@ -36,6 +36,13 @@ class OptionsState extends ExtendableState {
optionTxt.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
optionTxt.ID = i;
grpOptions.add(optionTxt);

if (i < 5) {
var checker:Checker = new Checker(0, 0, getOptionState(i));
checker.sprTracker = optionTxt;
checkerArray.push(checker);
add(checker);
}
}

daText = new FlxText(5, FlxG.height - 24, 0, "", 12);
Expand Down Expand Up @@ -96,6 +103,9 @@ class OptionsState extends ExtendableState {
openSubState(new LanguageSubState());
}

for (i in 0...checkerArray.length)
checkerArray[i].checked = getOptionState(i);

updateText();
}

Expand Down
9 changes: 8 additions & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,15 @@ class PlayState extends ExtendableState {
seperatedScore.push(Std.parseInt(comboSplit[i]));

var daLoop:Int = 0;

remove(ratingDisplay, true);

for (i in seperatedScore) {
var numScore:FlxSprite = new FlxSprite(0, 0);
numScore.loadGraphic(Paths.image('ui/num' + Std.int(i)));
numScore.scale.set(0.5, 0.5);
numScore.screenCenter();
numScore.x = (FlxG.width * 0.55) + (43 * daLoop) - 90;
numScore.x = (FlxG.width * 0.55) + (43 * daLoop) - 100;
numScore.y = ratingDisplay.y + 80;
numScore.acceleration.y = FlxG.random.int(200, 300);
numScore.velocity.y -= FlxG.random.int(140, 160);
Expand All @@ -407,6 +410,8 @@ class PlayState extends ExtendableState {
daLoop++;
}

add(ratingDisplay);

note.active = false;
notes.remove(note);
note.kill();
Expand Down Expand Up @@ -492,6 +497,8 @@ class PlayState extends ExtendableState {
scriptArray = [];
callOnScripts('destroy', []);

instance = null;

super.destroy();
}

Expand Down
3 changes: 2 additions & 1 deletion source/states/SongSelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ class SongSelectState extends ExtendableState {
if (Input.is("accept")) {
PlayState.song = Song.loadSongfromJson(Paths.formatToSongPath(songListData.songs[currentIndex].name));
ExtendableState.switchState(new PlayState());
FlxG.sound.music.stop();
if (FlxG.sound.music != null)
FlxG.sound.music.stop();
}
}

Expand Down
4 changes: 4 additions & 0 deletions source/substates/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class PauseSubState extends ExtendableSubState {
ExtendableState.switchState(new MenuState());
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'), 0.75);
PlayState.chartingMode = false;
} else if (Input.is("backspace")) {
ExtendableState.switchState(new SongSelectState());
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'), 0.75);
PlayState.chartingMode = false;
} else if (Input.is("r"))
ExtendableState.resetState();
else if (Input.is("accept"))
Expand Down

0 comments on commit b60cbf9

Please sign in to comment.