study20251028_hitsuji

This is just a study. This is a sheep herding game. You only use the mouse pointer to move. Control the cat to herd the sheep. Clear the game by gathering all the sheep in one spot anywhere. / ただの習作です。羊飼いゲーム(羊追いゲーム)です。使用するのはマウスポインタの移動のみです。猫を操作して羊を追い立ててください。どこでもいいので、羊を一箇所に集めることができたらゲームクリアです。
mouse move only
Learn more about Creative Commons
Join Plus+ to change privacy settings
Join Plus+ to hide source code
  • mySketch
/*
* study20251028_hitsuji
* written by cleemy desu wayo / Licensed under CC0 1.0
* 2025-10-28
* ----
* this is just a study in Processing and p5.js
*
* ----
* NOTE:
* This code is CC0, but please note that the images were created by others
* and may not be CC0.
*
* ----
* ported from this Processing sketch:
* https://gist.github.com/cleemy-desu-wayo/ec1d6ce69b4a7e61efdcee71413ef07f
*
* ----
* images are:
* https://unsplash.com/photos/8RRVfAU0dZ8
* https://publicdomainq.net/cat-animal-0060985/
*
* ----
* how to play:
* You only use the mouse pointer to move. Control the cat to herd the sheep.
* Clear the game by gathering all the sheep in one spot anywhere.
*
*/

let bg;
let pgBg;
let imgCat;
let pgCat;

let fontName = "Noto Sans Mono"; // change this line appropriately
let timeStr = "";

Mode
Select mode or a template
Join Plus+ to code together live.
Centers sketch and matches the background color.
Prevents infinite loops that may freeze the sketch.
This will be the default layout for your sketches
Easy on the eyes
It will show up when there is an error or print() in code
Potential warnings will be displayed as you type
Autocomplete suggestions will be displayed as you type.
Closes parenthesis-like characters automatically as you type
Use ligatures to make your code more readable

  • Controls
    Play
    Ctrl+Enter
  • Code
    Ctrl+Shift+Enter
  • Save
    Ctrl+S
  • Interface
    Fullscreen
    Ctrl+Alt+F
  • Switch Layout
    Ctrl+Alt+L
  • Settings
    Ctrl+Alt+.
  • Editor
    Tidy Code
    Ctrl+B
  • Multiple Cursors
    Ctrl+Click
  • Duplicate Line/Selection
    Ctrl+Shift+D
  • Move Line
    Alt+↑/↓
  • Select Multiple
    Ctrl+D
  • Find in Code
    Ctrl+F
  • Find Next
    Ctrl+G
  • Find Previous
    Ctrl+Shift+G
  • Autocomplete
    Ctrl+I
  • Jump to P5js Refernc.
    Alt+Click

Join Plus+ for private sketches, version history, 1GB space, custom embeds, and more!
🌸 p5.js says: p5 had problems creating the global function "model", possibly because your code is already using that name as a variable. You may want to rename your variable to something else. (https://p5js.org/reference/p5/model)