Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Score calculation not working
- 40F4
- Scratcher
8 posts
Score calculation not working
I'm trying to make some kind of algorithm to calculate the maximum amount of points possible in my game. Every method I have tried results in something that runs quite slowly, or a score that is off by a few numbers. I have been trying to fix this for six hours and have had no luck.
For reference, the game is a rhythm game and the levels are determined by a list.
For reference, the game is a rhythm game and the levels are determined by a list.
(donkeykongismyfavoritemarvelsuperhero)
- qwertycodechamp90411
- Scratcher
100+ posts
Score calculation not working
How does the scoring system work?
Useful Links: Text Generator ——— Encoders/Decoders (Normal, Case Sensitive) ——— New Math Blocks ——— Comment what next on my profile!
Wait, we’re at 900 million projects? So close to 1 billion projects uploaded to the server!
<((x) ^ ((1) / (y))::operators) = ((y) √ (x)::operators)> // is false if x < 0???Hi! I'm qwertycodechamp90411. I'm most active on the suggestions forum and the help with scripts forum, because I like to help other people and improve scratch! I like to think I'm good at scratch, but there's a lot I don't know/understand (how on earth do scrolling platformers work lol). As a general rule of thumb, I should have the answer if it's math related, because I'm a very stereotypical nerd when it comes to math.
- mstone326
- Scratcher
1000+ posts
Score calculation not working
We are happy to help but need much more information on your scoring system.
High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
- TechNerd64
- Scratcher
100+ posts
Score calculation not working
Are you running it without screen refresh?
Founder of Gigabyte Games, and apart of the EvolvusOS Team for OSWars 10. I mainly work on games and other interesting projects, but you can find me in the forums from time to time.
- 40F4
- Scratcher
8 posts
Score calculation not working
Yes, I have tried running it with screen refresh and without Are you running it without screen refresh?
There is basically 2 kinds of notes that can spawn. If the note is alone (no notes were spawned directly before it) then correctly hitting the note gives a 10 point reward. However, if the note was spawned right after another one of the same type, it only rewards 1 point. There is also a combo system, every multiple of 35 notes in a row is rewarded with a higher multiplier (1x > x2 > x3…) We are happy to help but need much more information on your scoring system.
It seems that the system works fine up until the point where the multiplier is accounted for.
Note spawning system (kinda messy):
(donkeykongismyfavoritemarvelsuperhero)
- mstone326
- Scratcher
1000+ posts
Score calculation not working
Guessing, is the score or whatever updated by a broadcast? All clones will respond to a broadcast unless you control which one will respond
High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
- 40F4
- Scratcher
8 posts
Score calculation not working
Oh yeah, another scoring related script:
Here are the scripts for the algorithm stuff:
Here are the scripts for the algorithm stuff:
(donkeykongismyfavoritemarvelsuperhero)
- 40F4
- Scratcher
8 posts
Score calculation not working
Nope, just a variable that changes when a clone dies Guessing, is the score or whatever updated by a broadcast? All clones will respond to a broadcast unless you control which one will respond
(donkeykongismyfavoritemarvelsuperhero)
- mstone326
- Scratcher
1000+ posts
Score calculation not working
Pretty much impossible to help with the scratchblocks. I wish I could offer better assistance but without seeing it is just guessing.
High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
- 40F4
- Scratcher
8 posts
Score calculation not working
What do you mean by that? I posted images of every script that relates to the scoring and algorithm stuff. Pretty much impossible to help with the scratchblocks. I wish I could offer better assistance but without seeing it is just guessing.
(donkeykongismyfavoritemarvelsuperhero)
- mstone326
- Scratcher
1000+ posts
Score calculation not working
Can you make a copy of your project and take out what shouldn't be seen yet and share that.
Even though we see the blocks for scoring, there could be a block within the project in another sprite accidentally causing issues.
Even though we see the blocks for scoring, there could be a block within the project in another sprite accidentally causing issues.
High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
- 40F4
- Scratcher
8 posts
Score calculation not working
Alright, will do. Can you make a copy of your project and take out what shouldn't be seen yet and share that.
Even though we see the blocks for scoring, there could be a block within the project in another sprite accidentally causing issues.
(donkeykongismyfavoritemarvelsuperhero)
- 40F4
- Scratcher
8 posts
Score calculation not working
Sorry for the incredibly messy code but here's the project
https://scratch.mit.edu/projects/871243551/
https://scratch.mit.edu/projects/871243551/
(donkeykongismyfavoritemarvelsuperhero)
- 40F4
- Scratcher
8 posts
Score calculation not working
Oh my gosh, I feel so stupid right now.
It was a rounding error in the game when calculating the combo variable.
Fixed it with this script, which just rounded to a single decimal:
Thanks for the help though!
It was a rounding error in the game when calculating the combo variable.
Fixed it with this script, which just rounded to a single decimal:
Thanks for the help though!
(donkeykongismyfavoritemarvelsuperhero)
- Discussion Forums
- » Help with Scripts
- » Score calculation not working