Skip to content

Conversation

@Karthikeya1500
Copy link

Description

This PR adds a new example game named "Survive the Horde" under examples/javascript_game/.
It demonstrates player movement, shooting, enemy spawning, and collision detection using p5.js.


Changes

  • Added new folder examples/javascript_game/
    • index.html: main entry point
    • game.js: core game logic
    • game.css: styles for layout and dark theme
    • README.md: game description and instructions
  • The game shows how to use animation loops, keyboard input, and object interaction in p5.js.

How to Play

  • Use Arrow Keys to move the player.
  • Press Spacebar to shoot bullets in four directions.
  • Survive as long as possible while avoiding incoming enemies.
  • Getting hit by an enemy ends the game.

Screenshot

Survive the Horde Screenshot

PR Checklist

  • Example runs without errors
  • Includes a README.md with description and controls
  • Tested locally using Live Server

Additional Notes

This example demonstrates:

  • Collision detection
  • Simple scoring system
  • Dynamic enemy spawning
  • Real-time user interaction using p5.js

@welcome
Copy link

welcome bot commented Nov 10, 2025

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

@Karthikeya1500
Copy link
Author

Hi! 👋
Linking this PR to the related issue.

Closes #8256

@Ankit-raj-11
Copy link

Ankit-raj-11 commented Nov 12, 2025

Hi p5.js team,

I’m interested in contributing to the new example game "Survive the Horde" (issue #8256, PR #8248)—or similar interactive projects for the p5.js examples directory.

My background:

  • Experience building interactive JS games (with p5.js & canvas).
  • Focused on writing clear game logic and accessible code for beginners.
  • Passionate about creative coding and making open source fun and welcoming for all.

If there are any improvements, extensions, or additional example slots available, I’d love to help. Please consider assigning me to ongoing or related tasks—especially those involving new examples, accessibility, or education.

Thanks for your consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants