game is cheating
No it's not. You just mad you can't beat it
I can't either
Finally did, after slowing down the Ghouls

The thing is to shoot the Ghouls ASAP when there is no visible stars or when you caught a star but to wait AMAP to shoot the Ghouls in order to let the star glide and avoid a too far Ghoul respawn.
And yes, it's buggy but I can't solve it : when a Ghoul passes the Spaceship, it should only subtract 10 points and respawns on top, but most of the time, it respawns randomly on the screen (without subtracting 10 points) and sometimes just around the Spaceship which causes a unexpected Game Over because the Ghouls is too close and crashes into the Spaceship
The bug doesn't exist if the Ghoul passes you in the beginning or it if a Ghoul passes you a consecutively after a first time and so on. But if it wrongly passes you twice and you shoot a Ghoul after, the bug resets and next time a Ghoul passes you, it will respawn randomly...

man i knew u would come through with some piff , am watching that intro to sratch vid tomorrow and start working on my game , my shyt finna be

though , i was going through your script and it seemed pretty simple, any tips for me?
Less is more obviously, so the the cleaner and simpler the code, the easier it is to fix it :
- When you see a recurring code, make it a function (with "add blocs" on Scratch)
- Name functions, variables as clearer as possible (ie, don't name a function "function01" but make the name a description ie "spaceship_movement")
- Don't use "spaces", use "underscores" to represent them
- Code in lowercase, sometimes coding is case sensitive and a little detail can fukk up a whole script
You'll learn in a few lessons that variables should be declared beforehand or before any script so take that habit : set the things then showed them or start them not otherwise.
For the conditions, what I did was state the exceptions before the rule but I don't know if it's the normal thing to do :
- If "problem 1" then "solution 1"
Else If "problem 2" then "solution 2"
Else If "problem 3" then "solution 3"
Else "normal"
Also don't hesitate to sketch or write down your ideas. Coding is logical, so make diagrams to represent your scripts (flowcharts for conditions for example) so you can spot any possible bugs or illogical stuff.
But that's how I do, maybe @
Ctrl, @
FreshFromATL or @
Data-Hawk will tell you otherwise because I only learnt coding by myself.
You can also proceed by steps ie :
- Step 1 : My title screen then the rules, so everything but the stage is hidden, I made the music started on the rule screen and put a little tick so I would be sure people fully read the rules
- Step 2 : The splash screen, I show the level and the score variables and put a button for the player to start the game whenever he wants.
- Step 3 : The game starts with its rules, so I show all the sprites with the inherent normal scripts : the stars and the ghouls glides down at different speeds and when they reach the bottom, they respawns randomly on top of the screen to glide down again. The spaceship is a the bottom, moves from left to right and shoot lasers. The lasers move following a vertical direction and do so at a steady speed.
- Step 4 : The exceptions
--- 4a : What do I do if the star : 1. meet the spaceship ? It gives a speed boost. 2. is touched by a laser ? It disappears and respawn after some time. 3. reach the bottom ? it gets back on top, wait a little, then glide again
--- 4b : What do I do if the ghoul : 1. meet the spaceship ? It blows it up. 2. is touched by a laser ? It disappears, gives the player 1 point, then glides again. 3. reach the bottom ? it makes the player lose 10 points, then glide again immediately
--- 4c : What do I do the bring some challenge ? 1. Every 10 points, the player passes a new level till level 6. 2. Every new level increases the speed of the ghoul (variable here).
- Step 5 : How does the game end (you don't want a game which lasts forever) ?
--- Win if the player reach 60 points -> Victory screen
--- Lose if the player is touched by a Ghoul -> Game over screen
--- Lose if the player's score is below 0 -> Game over screen
And don't forget to implement sounds, it's better with them
Ahh still not subtracting the points... is this the language they are using during the course? scratch?
Scratch is only a way to introduce the concepts of "variable", "conditions", "functions", "scripts" on so on... I know already about that because I have basic knowledge of PHP but it still a great way to learn about that. Then with the incoming lessons, we will get into some proper languages.
And yeah, I spent a good amount of time on those two bugs and decided to surrender after a while because I was not going anywhere.