An engaging 2D platformer game built with the p5.js framework. Guide your Adventurer through skies, forests, canyons, and castles. Collect coins, avoid enemies, and reach the castle to complete each level.
- Smooth side-scrolling platformer with physics
- Multiple environmental elements: mountains, clouds, trees, canyons, raining/sunny weather
- Interactive platforms and collectible coins
- Enemy patrols with collision detection
- Flagpole and castle end-level mechanics
- Sound effects and background music
- Lives and score tracking
- Clone or download this repository.
- Ensure you have a modern browser (Chrome, Firefox, Edge).
- No additional server is required; you can open the game locally.
- Open
index.html
(orsketch.html
) in your browser. - The game will start in the intro screen. Press Enter or click to begin.
- Left Arrow: Move Adventurer left
- Right Arrow: Move Adventurer right
- Up Arrow / Space: Jump
- Collect all coins scattered in each level to increase your score.
- Avoid or defeat patrolling enemies; collisions cost a life.
- Falling into a canyon or running out of lives will restart the level.
- Reach the castle or flagpole to complete the level and advance.
All game assets (images, sounds, fonts) are located in the assets/
folder:
- Images: Platforms, background, character sprites, enemies, UI icons
- Audio: Sound effects (jump, collect, lose life), background music
- Fonts: Custom TTF fonts for UI
├── assets/ # Images, sounds, fonts
├── sketch.js # Main game logic and rendering
├── index.html # HTML wrapper for p5.js sketch
└── README.md # Project overview and instructions
- Modify environmental arrays (
clouds
,mountains
,trees
,canyons
,platforms
) insketch.js
to change layout. - Add or replace character/enemy sprites in
assets/
and adjust references inpreload()
. - Tweak physics parameters (gravity, jump height, enemy speed) for a different feel.
Contributions, bug reports, and feature suggestions are welcome. Feel free to open an issue or submit a pull request.
This project is released under the MIT License.