Discuss Scratch

KawaiiChiScratch
New Scratcher
4 posts

How do you make the timing of a rhythm game / the scoring system?

I have everything ready but I can't figure out how to make the scoring system work even after changing my sprites and other things like code of other parts. Any help will be helpful
Vaibhs11
Scratcher
1000+ posts

How do you make the timing of a rhythm game / the scoring system?

You mean the scoring system goes too high?
Ankit_Anmol
Scratcher
500+ posts

How do you make the timing of a rhythm game / the scoring system?

KawaiiChiScratch wrote:

I have everything ready but I can't figure out how to make the scoring system work even after changing my sprites and other things like code of other parts. Any help will be helpful
if <score condition> then
change [score v] by (1)
end
Vaibhs11
Scratcher
1000+ posts

How do you make the timing of a rhythm game / the scoring system?

Ankit_Anmol wrote:

KawaiiChiScratch wrote:

I have everything ready but I can't figure out how to make the scoring system work even after changing my sprites and other things like code of other parts. Any help will be helpful
if <score condition::operators> then
change [score v] by (1)
wait until <not <score condition::operators>>
end
Fixed
semmiesem9
Scratcher
100+ posts

How do you make the timing of a rhythm game / the scoring system?

The question is pretty vague, so I don't think we'd be able to help much without more details. Could you share the project for now and post the link here so we can see the code for ourselves?
semmiesem9
Scratcher
100+ posts

How do you make the timing of a rhythm game / the scoring system?

However, here are some general tips to rhythm games;

Every song has a BPM (beats per minute) / tempo, as I'm sure you know. Scratch's ‘wait x secs’ blocks are not reliable and will get out of sync pretty quickly. They're definitely not what you want for a rhythm game, where being in sync is extremely important. Instead, you'll need to use the ‘timer’ block. Music and sound effects keep going even if scratch is lagging, and so does the timer block. This makes it perfect for rhythmic things.

The following script will pause a script until a specific beat.
play sound [music v]
reset timer
wait until < (((60)/(BPM))*[beat]) < (timer)>
That's the basis of every rhythmic input I have used in my rhythm game projects. I'm not sure how much this helps, but here is my most recently shared rhythm game for reference.
KawaiiChiScratch
New Scratcher
4 posts

How do you make the timing of a rhythm game / the scoring system?

Sorry, should have been more specific. I have the notes and such and when I click the corresponding button it disappears (when in a 10 step range), but I can't get the score to change no matter what I do.
DerpyHead0
Scratcher
1000+ posts

How do you make the timing of a rhythm game / the scoring system?

KawaiiChiScratch wrote:

Sorry, should have been more specific. I have the notes and such and when I click the corresponding button it disappears (when in a 10 step range), but I can't get the score to change no matter what I do.
you can't get a variable to change? are you sure you don't have a `set [score] to (0)` lying around somewhere?
semmiesem9
Scratcher
100+ posts

How do you make the timing of a rhythm game / the scoring system?

KawaiiChiScratch wrote:

Sorry, should have been more specific. I have the notes and such and when I click the corresponding button it disappears (when in a 10 step range), but I can't get the score to change no matter what I do.
I see I see, for this you just need a variable, and change it in the same script as the notes disappearing. For this, you'll need to use the
change [score v] by (1)
block. Place that right in front of the “delete this clone” block, and it'll change the score when you hit the note.

If this doesn't work or doesn't really answer your question, it would be best if you share the project and give the link to the project here, so we can check it out for ourselves.
COOL_GUY230
Scratcher
6 posts

How do you make the timing of a rhythm game / the scoring system?

I made a rhythm game like fnf on scratch. This is the code for hitting the notes.. Please let me know if there are any flaws.

when [left arrow] key pressed
if <<key [left arrow] pressed?> and <touching [player left] ?>> then
broadcast [left hit]
delete this clone
end
wait until <not <key [left arrow] pressed?>>

Last edited by COOL_GUY230 (June 29, 2024 15:01:37)

AJALBOI223
Scratcher
1 post

How do you make the timing of a rhythm game / the scoring system?

I NEED HELP WITH THE ENTIRE ENGINE!!!

Powered by DjangoBB