U1-A6-MazeGame

2020-11-27に共有
- If you'd like to check the coding specifically click the "see inside" blue button
- For making the background I used a plain white backdrop located near the bottom right and made a plain purple background for the maze.
- For the straight black lines I used for the maze I used the
the straight black line from the Costumes section for making sprites and such.
- To make the sprites I made them in the costumes section for making sprites (I used the pen and the paints for all the sprites even the flower and my brother wanted to create a monster and made the little monster called "Bob" himself)
- For the voices (credit to my brother for saying "dumb dumb" when you hit the side of the maze) and I used my voice for the character sprite touching the pink flower sprite! the coding blocks I used can be found in sound and you can record your own voices for those blocks they are called "Play sound (recording) until done"
- I used other blocks such as event blocks, motion blocks, look blocks, sensing blocks, control blocks etc.
- To be a little more specific as to what blocks I used for the coding I used the "when green flagged clicked" block, forever control block, Motion blocks: "set y to" and "set x to", I used a control "repeat" block and used the same motion blocks I used earlier! To make the monster bob!
- For the coding of lily (the little red-headed girl you play as) I used a lot of codes for starters I wanted Lily to move using arrow keys so I used a specific code to get her to move using the arrow keys. I used:
* When green flagged clicked
* forever block (located in the control section)
* "If" control block combined with "key right arrow pressed")
* The blue motion block called (Turn (counterclockwise way) 15 degrees)
* Use blue motion block "Change X by (insert number)(5)"
* Put another forever block combined with the Key left arrow block
* Blue motion block "Change x by insert number (-5)
* Use if block again with the key "Up arrow" pressed
* Turn clockwise with blue motion block (15 degrees)
* use blue motion block (change x by (insert number) 5 block)
* use the same bocks but change the "Change X by" block into the number -5
* Change the blue motion block to counterclockwise by 15 degrees

For other codes
- The coding for when the sprite character touches the black outline of the maze is:
- When the green flag is clicked
- Forever control block and if control block
- Touching colour sensing block (black)
- Set X to -169
- Set Y to 121
- Play recording3 until done
- Say try again for 0.4 seconds
* For the timer
-When Flag clicked
-Set my variable (Timer) to 0
-add forever block
- Wait 1 second
- Change Timer by 1
- when flag clicked
- add forever block
- put repeat block (100)
- add block set y to (148)
- add block set x to (134)
-put repeat block (20)
- put set y (28) in second repeat block which is in forever block
- put set x (133) in second repeat block which is in forever block
- For Bob the green monsters coding (If the sprite hits him you teleport back)
- Use block "When the green flag is clicked"
- Forever and if bocks which are located in the control section
- Combine the "If" block with the sensing block (Touch colour (insert colour)
- Put 2 blue motion blocks underneath the "if " block (set X by -172 and set y by 123)
- Play sound recording3 until done
- Place a "look" block called "Say try again for 0.4 seconds"
* For the coding of the pink flower to get it to say "You win" and the voice recording I made these are the coding steps
- Use when green flagged clicked block
- Use control forever and if bock
- combine the blocks then put the" if touching colour then.." block underneath the "if" control block
- Say you got the flower for 0.5 seconds using the looks block
- Play sound (make a recording) until done block (sound block)
- Say "YOU WIN" for 1 second (look block)
- Use 2 motion blocks (set x to -174 and set 7 to 113)
- Use control block "Set timer to 0"
- forgot to mention the little stars in the plain galaxy
and that's all the coding for this maze game