Cat and Mouse is a type of game that involves constant pursuit and near captures, and is based on how a cat hunts a mouse in real life. The cat will constantly chase the user's mouse pointer until it has been caught or the game has been stopped.

The most used variants of cats are the Scratch Cat [1] and the Cat 2 sprite.[citation needed] The repeat until block can be used to continue moving until the mouse pointer is reached:

when green flag clicked
go to x: (0) y: (0)
repeat until <touching (mouse-pointer v)?>
point towards (mouse-pointer v)
move (2) steps
end

Additions

A common method of score tracking is by the amount of time has transpired. This can done using the timer:

when green flag clicked
set [score v] to (0)
reset timer
repeat until <touching (mouse pointer v)?>
set [score v] to (timer)
end

Another method of score tracking and winning is using a variable timer. Make an empty sprite with two costumes: one blank (costume 1) and one with a "Win" banner (costume 2).

when green flag clicked
switch costume to [costume 1 v]
set [Time v] to (0)
forever
    wait (1) seconds
    change [Time v] by (1)
    if <(Time) > [20]> then
        broadcast [Win v]
        stop [all v]
    end
end

when i receive [Win v]
switch costume to [costume 2 v]

The Mouse addition: (add a mouse sprite)

when green flag  clicked
set size to [50%]
forever
    go to x: (mouse x) y: (mouse y)
    point in direction (-45) // Direction you want it to be facing. This is around the direction of most cursors.
end

Note: For the Mouse addition, in the main cat sprite, change the "touching" and "point" to "Mouse" instead of "Mouse-Pointer"

Variations

Common variations of the Cat and Mouse game are: [2]

  • Adding high scores using ☁ cloud data
  • Adding achievements, such as coins or other virtual currencies which can be used to purchase other items in it
  • Adding sound effects or banners and text for certain events such as scoring and loss[3]
  • Adding obstacles that the cat must maneuver around
  • A mouse pointer. Probably a mouse.[4]
  • Other characters, such as a dog going after a bone mouse pointer.

External Links

References

Cookies help us deliver our services. By using our services, you agree to our use of cookies.