Skip to content

akshatjaiin/rock-paper-scissor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

:

🎮 Rock Paper Scissors for Sprig Welcome to Rock Paper Scissors, a simple yet fun game built using the Sprig game editor! This project is an interactive version of the classic hand game, with animated computer choices and a cool slider mechanism for selecting your move.

play here: https://sprig.hackclub.com/~/L42vaFRh2KY4zIjnkgva

🚀 Features Computer vs. Player: The computer makes its move after flickering through choices, adding suspense. Slider-based Move Selection: Use the slider to choose between rock, paper, or scissors. Dynamic Animations: Watch the computer and your choices animate on-screen. Score Levels: Different outcomes for win, lose, or tie are reflected with unique levels and visuals. Restart Option: Play again anytime with a quick keypress. 🕹️ How to Play Move the Slider:

Press a or w to move left. Press s or d to move right. Select Your Move:

Once you've positioned the slider on Rock, Paper, or Scissors, press J to lock in your choice. Watch the Computer:

The computer will cycle through its options before landing on its final choice. Wait and see who wins! Determine the Winner:

If you win, you'll advance to a new level with different visuals. If you lose, you'll see a new scene showing the result. If it's a tie, you'll see a special screen for that as well. Restart the Game:

Press K anytime to restart the game from the beginning. 🎨 Game Elements Sprites Rock: 🪨 Paper: 📄 Scissors: ✂️ Slider: Moves to select your choice Visual Cues Each level has unique visuals depending on the outcome: Level 1: Loss Level 2: Win Level 3: Tie 🛠️ Game Code Overview Here's a breakdown of the main functions used in the game:

getComputerChoice(playerChoice): The computer cycles through rock, paper, and scissors with a flicker effect, before finalizing its choice. determineWinner(playerChoice): After both choices are made, this function determines the winner and updates the game level. moveLeft() and moveRight(): Move the player's selection slider to choose between rock, paper, or scissors. instructions(): Display the game's instructions on the screen. 🎶 Sounds The game includes a cool melody when levels change and another for slider movement.

Melody on Win/Loss: A short victory or defeat tune is played when the game ends. Slider Movement: A soft tone plays as you move the slider left or right. 🛑 How to Restart If you'd like to restart the game at any point, simply press K to reset to the initial level and start over.

Enjoy playing Rock Paper Scissors in the Sprig editor! 🎉

image

About

sprig editor js game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published