Crossy rpad

By dk donkey kong · 13 views · 0 likes · Jul 6, 2026

This sketch recreates the classic Crossy Road game: a red square hops between lanes of grass, traffic, and water, riding logs and dodging cars while the camera scrolls upward to follow progress. It tracks a score based on distance traveled and persists a high score across sessions using the browser's local storage.

#daily
🔀 Remix This ✨ Try This Prompt 📖 View Docs ⛶ Full Screen ← Back to Gallery

💬 Comments

Loading comments...

📋 Embed Code

Copy this code to embed this sketch on your website:

<iframe src="https://p5js.ai/embed/fcc70b1a-9cf5-4871-858f-0cef24c57e45" width="400" height="400" frameborder="0" allow="autoplay" title="Crossy rpad"></iframe>

Adjust width and height as needed. Preview embed →

❓ About This Sketch 4 questions

What does the Crossy Road sketch create visually?

The Crossy Road sketch visually represents a top-down view of a character navigating through various lanes filled with obstacles like cars and logs. The lanes are designed to scroll vertically, giving the impression of movement as the player character attempts to avoid collisions and move upwards.

How can users interact with the Crossy Road sketch?

Users can interact with the Crossy Road sketch by using keyboard controls to move the player character left and right across the lanes. The game also features a scoring system that tracks how far the player progresses vertically in the game.

What creative coding technique does the Crossy Road sketch demonstrate?

The Crossy Road sketch demonstrates the use of object-oriented programming in p5.js through the implementation of classes for the player and obstacles. This technique helps in organizing the code for better management of game entities and their behaviors.

How could someone recreate a similar effect in p5.js?

To recreate a similar effect in p5.js, one can use arrays to manage multiple lanes and obstacles, and implement a scrolling background to simulate movement. Incorporating keyboard controls for player movement and a scoring system to track progress will enhance interactivity.

🎬 Video Preview