Catch by Coordinate – Scratch Game Assignment

The following task was discussed in class today:

Task : Create a game where a sprite moves around a few times to a random position and asks the player (user) to guess his x and y coordinates. If both the x and y coordinates entered by the player are within 10 units of the sprites location, say a message which indicates success, otherwise, say that the player missed and tell the player to try again.

A sample of blocks below shows how to move the sprite around:

Hint

A previously recorded class shows how guessing can be improved to include a range.

https://islandclass.org/2026/05/08/how-to-tolerate-a-guess-withing-a-certain-range-using-the-abs-function-3n-2026-05-08_10-03-41/

Updates to this post

2026-05-08: Added hint section

© 2021  Vedesh Kungebeharry. All rights reserved. 

Leave a comment