Skip to content

A bunch of Chickens - They look for Food and eat it when they find some. And there are Bees! Written in P5JS.

License

Notifications You must be signed in to change notification settings

johnnyawesome/ChickensAndBees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

🐔Chickens and Bees🐝

A bunch of Chickens - They look for Food and eat it when they find some. And there are Bees! Written in P5JS.

ChickensAndBees

Copyright & Attribution

Chicken: Author: daneeklu License: GPL 2.0 and CC-BY 3.0 / Bee: Author: ChickenTeddy License: CC BY 4.0 / Grass: Author: Invincible License: CC0 / Fence: Author: William.Thompsonj License: CC0 / Flowers: Author: vassago-labs License: CC BY-SA 4.0 / Grain / Cereal: Author: ScratchIO License: CC0

About the Project

The Code is written in P5JS. I also coded a Squirrel 🐿️ that lives in the Forest and searches for Acorns, using the P5.Play-Library which in turn uses the Planck Physics Engine.

Initialization

  • Generate a Background out of Grass-Tiles
  • Generate a number of Chickens (You can change "numberOfChickens" to get more / less Chickens)
  • Generate a number of Bees (You can change "numberOfBees" to get more / less Bees)
  • Generate a random Pattern of Plants / Flowers
  • Generate Food-Piles at random Places
  • Draws the Fence

🐔The Chickens🐔

  • The Chickens will search for Food
  • When they find Food, they'll eat it
  • When the current Food is gone, the Chicken will search for more Food
  • Sometimes a Chicken will take a short break, standing still, to be more natural-looking

🐝The Bees🐝

  • The Bees fly all over the screen, from right to left 🐝
  • Bees fly at random Speeds on their X-Axis. Some are slower, some are faster
  • To look more natural, the Bees oscillate on their Y-Axis
  • When a bee hits the left edge of the Screen, it dies
  • A new Bee is generated in it's place

🌾The Food🌾

  • Food will spawn in random Locations
  • When a Food-Pile is eaten, a new Food-Pile will spawn at a new random Location

Related Projects

I also coded a Pixel-Art Squirrel 🐿️ that lives in the Forest 🌳 and searches for Acorns 🌰 using P5JS, the P5.Play-Library, which in turn uses the Planck Physics Engine.

Squirrel