Friday, October 20, 2017

Cat and Mouse post Ranftl and Martin

Hi we are Nacho Ranftl and Dante Martín, in this post we are going to teach you the way that we have created the Cat and Mouse game. This is a game where the player controls a mouse. His objective is to eat 5 cheeses to win. However if the mouse crashes against the wall or the cat he will lose.

Here is a picture of some scripts of this game:



  • First we had to make the movement of the mouse so it moves around the screen. For doing this we used a combination of the following scripts:Capture.PNG


  • Then we had to create a variable called cheese, we associated this variable with a certain object. And every time that the mouse touched the “cheese” the counter got one up.



  • After that we had to modify the scripts so that each time that the cat touched the walls it had to bounce. (Since when we had to create this post we were already finished with the maze it worked like it is shown below.)


  • We, had to add also that every time that the cat touched the mouse the game should stop to do this we used this group of scripts. We also did as an addition that when you lost, the background changed, to one that said that the game was over.



(When the mouse was touching the cat it would broadcast a message, when the cat would have received the message he will change the backdrop)



  • Then we added this certain combination from scripts to prevent the mouse from going through the wall.


As it is broadcasting message1 again it will repeat the process of losing. (shown 1 step above)

  • The last step was to make the cat move through the whole maze. (explained in step 3)



Dibujo sin título (2).png
wordcloud.png

No comments:

Post a Comment