Skip to content

ebrahimmostafa133/Cut-The-Repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

72 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•    โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•    โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘          โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  
โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘          โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•      โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•  
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•   โ–ˆโ–ˆโ•‘          โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—    โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
 โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•    โ•šโ•โ•          โ•šโ•โ•   โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•    โ•šโ•โ•  โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•     โ•šโ•โ•โ•โ•โ•โ•โ•

๐Ÿฌ A Physics-Based Puzzle Adventure Game ๏ฟฝ

JavaScript HTML5 CSS3 Canvas

๐ŸŽฎ Play Now!

Om Nom Happy


๐Ÿ“œ About The Project

Cut the Rope (Web Edition) is a faithful recreation of the classic physics puzzle game, built entirely with vanilla JavaScript. Challenge your logic and timing across multiple themed boxes and levels. Feed the adorable Om Nom by cutting ropes, using bubbles, and collecting stars!

โœจ Key Features

  • ๐ŸŽฎ Pure Vanilla JS โ€“ Custom physics engine built from scratch without external libraries.
  • ๐Ÿ—บ๏ธ 12 Challenging Levels โ€“ Spread across 3 unique themed boxes (Cardboard, Fabric, etc.).
  • ๐Ÿฌ Realistic Physics โ€“ Verlet integration for rope simulation and gravity effects.
  • ๐Ÿ’พ Progress Persistence โ€“ Automatically saves your unlocked levels and stars using localStorage.
  • ๐ŸŽต Immersive Audio โ€“ High-quality sound effects and background music.
  • ๐Ÿ“น Cinematic Intro โ€“ Engaging video introduction to set the scene.
  • ๐ŸŽจ Dynamic UI โ€“ Themed backgrounds that change based on your selected box.
  • ๐Ÿ“ฑ Responsive Design โ€“ Optimized for various screen sizes and orientations.

๐ŸŽฌ Screenshots

Start Screen Level Selection Gameplay
Start Levels Game

๐Ÿš€ Getting Started

Prerequisites

  • A modern web browser (Chrome, Firefox, Edge, Safari)
  • A local web server (recommended for video and module support)

Installation

  1. Clone the repository Download the code to your computer using Git:

    git clone https://github.com/ebrahimmostafa133/Cut-The-Repo.git
    cd Cut-The-Repo
  2. Run with a Local Server (Required for Modules & Video) Since the game uses JavaScript Modules and has an intro video, you cannot just open the index.html file directly. You need a local server. Here are the easiest ways:

    1. Open the project folder in VS Code.
    2. Install the "Live Server" extension.
    3. Click the "Go Live" button at the bottom right corner of VS Code.

๐ŸŽฎ How to Play

Controls

Action Control
Cut Rope Click and drag (swipe) across a rope
Pop Bubble Click on a bubble to pop it
Pause Click the menu button
Restart Click the restart icon

Game Mechanics

  • Objective: Deliver the candy to Om Nom's mouth.
  • Stars (โญ): Collect up to 3 stars per level to unlock new boxes.
  • Ropes: Hold the candy in place. Cut them to release it!
  • Bubbles: Lift the candy upwards when it enters them.
  • Physics: Use gravity and momentum to swing the candy into stars.

๐Ÿ—๏ธ Project Structure

Cut-The-Repo/
โ”œโ”€โ”€ audio/              # Sound effects and background music
โ”œโ”€โ”€ css/                # Modular stylesheets (global, screens, components)
โ”œโ”€โ”€ fonts/              # Custom game fonts
โ”œโ”€โ”€ images/             # Game assets (sprites, backgrounds, UI)
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ physics/        # Core physics engine (Verlet, Collisions)
โ”‚   โ”œโ”€โ”€ levels/         # Level data and selection logic
โ”‚   โ”œโ”€โ”€ objects/        # Game entities (Candy, Frog, Star, Bubble)
โ”‚   โ”œโ”€โ”€ states/         # Game state management
โ”‚   โ”œโ”€โ”€ storage/        # Progress saving/loading
โ”‚   โ””โ”€โ”€ index.js        # Main entry point
โ”œโ”€โ”€ video/              # Intro and cutscene videos
โ””โ”€โ”€ index.html          # Main entry file

๐Ÿงฉ Technical Highlights

Architecture Patterns

  • Modular JS: Clean separation of concerns using ES6 modules.
  • State-Driven UI: Screen transitions and game states managed centrally.
  • Custom Physics: Hand-coded gravity, damping, and constraint satisfaction.

Core Systems

// Example: Rope Constraint Logic
export function ropeLimit(candy, anchor, len) {
    const dx = candy.x - anchor.x;
    const dy = candy.y - anchor.y;
    const dist = Math.sqrt(dx * dx + dy * dy);

    if (dist > len) {
        const nx = dx / dist;
        const ny = dy / dist;
        candy.x = anchor.x + nx * len;
        candy.y = anchor.y + ny * len;
        // ... velocity adjustment logic
    }
}

Canvas Rendering

  • Layered Drawing: Background โ†’ Ropes โ†’ Stars โ†’ Om Nom โ†’ Candy.
  • Sprite Animation: Frame-based animations for Om Nom's reactions.
  • Responsive Scaling: Viewport-aware canvas resizing.

๐Ÿ› ๏ธ Technologies Used

  • JavaScript (ES6+) โ€“ Core logic and physics.
  • HTML5 Canvas API โ€“ High-performance 2D rendering.
  • CSS3 โ€“ Advanced animations and responsive layouts.
  • LocalStorage API โ€“ Persistent user progress.
  • Web Audio API โ€“ Dynamic sound management.

๐Ÿ‘ฅ Team

This project was developed by:

Name LinkedIn
Rana Mohamed LinkedIn
Karim Ibrahim LinkedIn
Zeyad Shahin LinkedIn
Ebrahim Mostafa LinkedIn
John Roufaeil LinkedIn

๐Ÿ“ Lessons Learned

What We Learned

  • โœ… Implementing Verlet integration for stable rope physics.
  • โœ… Managing complex game states without external frameworks.
  • โœ… Optimizing canvas rendering for smooth 60fps performance.
  • โœ… Designing a modular and scalable codebase for game levels.

Challenges Faced

  • ๐Ÿ”ง Collision Precision: Fine-tuning star and frog hitboxes.
  • ๐Ÿ”ง Rope Behavior: Ensuring realistic swinging and tension.

๐Ÿ”ฎ Future Enhancements

  • More Obstacles: traps, air cushions, and moving anchors.
  • New Boxes: Magic Box, Valentine Box, and more!
  • Global Leaderboard: Compete with players worldwide.
  • Mobile Support: Like the OG real game we grew up with

๏ฟฝ License

This is a non-commercial, educational project. Any use of game assets is purely out of love and nostalgia. We extend our heartfelt thanks to ZeptoLab for creating such cherished memories.


๐Ÿ™ Acknowledgments

  • ZeptoLab โ€“ For the original "Cut the Rope" inspiration.
  • ITI Open Source Track โ€“ For the support and guidance.
  • Community โ€“ For the amazing assets and feedback.

ITI Open Source Track - INTAKE 46 โค๏ธ

About

A web-based of the popular game Cut the Rope, built using HTML, CSS, and JavaScript as part of an ITI project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors