Skip to content

The most popular fruit-slicing game! This game is built completely using the p5js JavaScript library. Link: https://verma-anushka.github.io/Fruit-Ninja/

Notifications You must be signed in to change notification settings

verma-anushka/Fruit-Ninja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FRUIT NINJA 🥝

Fruit Ninja - the most popular fruit-slicing game in the world! This game is built completely using the p5js JavaScript library.

GETTING STARTED 📝

To start playing:

HOW TO PLAY? ⁉️

RULE 1: Slice fruit 🥝
RULE 2: Don't slice bombs 💣
...and that is all you need to know to get started with the addictive Fruit Ninja action!!

TO-DO 📋

  • Add sounds
  • Fix bugs
  • Add modes
  • Mobile friendly

ABOUT p5js 💬

Basic sketch

  • This is the basic setup for a p5.js sketch- setup() and draw().

  • Note: p5.js will also require an empty HTML file that links to the p5.js library and your sketch file in the header.

    function setup() {
      // setup stuff
    }
    function draw() {
      // draw stuff
    }
  • Alternatively, you could use the preload() function.

  • If a preload() block exists it runs first, then setup() will wait until everything in there has completed before it gets run, so you can make use of things loaded in preload in setup and draw.

    let img;
    function preload() {
      img = loadImage('img.jpg');
    }

Game Snapshot 📷

Fruit Ninja

REFERENCES 📚

p5js Documentation: A complete guide on how to use the p5js library.

CONTRIBUTE :shipit:

Issues, PRs, and all your suggestions and discussions are very welcome!

About

The most popular fruit-slicing game! This game is built completely using the p5js JavaScript library. Link: https://verma-anushka.github.io/Fruit-Ninja/

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published