Bugs and instructions: (There are more instructions on how to play the game(s) inside the project)The project has two games. The second one starts when the first one ends. So keep playing the first game until you go into the second one, because the second game turned out much better than the first. In the first game, you have to control the paint bucket with the arrow keys, and have to pass through all of the corals and sea star to give them color. If you leave a coral with no color for too long, then it will turn white. The second game is not finished. You have to control a submarine and collect plastic by pressing the space button. It is almost done but there is no variable to count how much plastic you collect. and nothing happens when you get to the end. I spent HOURS working on this project. But still there are a couple of bugs. 1. When you press on the play again button when you loose, the game won't work. So don't press that button, instead, if you want to play again, press the green flag a couple of times. 2. When you press space in the submarine game quick enough, you can go through the wall and probably won't be able to come out again. So don't press space too quick. 3. If you go into the submarine game, there is still a chance that the submarine won't move when you press an arrow key. I have tried several times to fix this bug; I made it so that when you press the button to play the game, the button will keep broadcasting a message to start the game until it detects that a variable changed. That variable will only be changed when the submarine receives the message. I think this strategy worked. But I think that once the submarine was still not moving, and I don't remember wether that was before or after I "fixed" that bug.
I drew all of the sprites. How I coded parts of this project: So to code the game where you have to paint the corals, I coded it so that a number from one to five will be selected to go into a variable. So each coral and the sea star is assigned with a number. If the coral detects that the variable has changed to its number, it will turn white. The greatest challenge on coding this was to make the corals turn white when the paint bucket past by them even if the variable was still their number. To code the submarine project, I coded the submarine to move with the arrow keys. And each time, it was moving with the arrow keys and was touching the walls, it would move the other direction. This part was very challenging to code. When I coded the bucket so that it couldn't go through the water, it was much easier because there was only one direction in which it could go that way. So if you pressed the up arrow key while the sprite was sensing it was touching a color that was beyond where it should not go, it would bounce in the opposite direction. But here it was different. You could go right, left, up or down to go into some of the walls. So my original plan was to code it so that when you were clicking on an arrow key while touching a wall, it would instead go in the opposite direction. But that didn't go well because then, if you went towards a wall, when clicking the left key, for example, and pressed just at the right moment the right key. you could easily go through the wall, because if you keep pressing the same key, it will keep moving you in the opposite direction, and then it was impossible to go out again. So I couldn't leave the game with that bug, so I had to come with other plan. So I coded the submarine so that it was always broadcasting a message each 0.05 seconds or so and then I made some code to always activate when they receive that message, and that was the code to make the submarine bounce in the walls. I don't know how to correctly explain how I did the code, I don't really remember it exactly. I was not expecting it to work. But it did. I think I could've found an easier code system to make the submarine bounce in the walls much easier and with less code. But I decided to challenge myself to come up with my own solution, so that is what I came up with. To code the plastic, so that it always selected a random position, I just made it so that when they receive a message, they will keep looking for a new position, until they sense that they are not touching any of the walls. Also, when you get into the last part of the game, you will find a deep sea creature in it. I coded it so that it would select a number from one to a hundred to go into a variable, and if that number is seven, it will change to another creature. If the number is not seven, then it will be an angler fish, but if it is seven, then you will find a goblin shark, a deep sea creature that I found when searching for something to put into my game. So there is a rare chance that you encounter it when playing the game.