JIT
P5.js Cyberpunk Shooter Game
Create a p5.js game of a shooter, cyber punk neon theme

Okay, let's create a simple p5.js shooter game with a cyberpunk neon theme.

This sets up a basic shooter:

  • Player: A neon cyan triangle controlled by Arrow Keys or A/D.
  • Shooting: Press Spacebar, Up Arrow, or W to shoot neon yellow bullets.
  • Enemies: Neon magenta/red squares spawn from the top and move down.
  • Collisions: Bullets destroy enemies, increasing your score. Enemies hitting the player ends the game.
  • Scoring: Displayed in the top-left corner.
  • Game Over: Screen appears when an enemy hits the player. Press Enter to restart.
  • Theme: Dark background, neon colors, and a slight glow effect on the canvas via CSS.

You can now run this. Use the arrow keys (or A/D) to move and Space/Up/W to shoot.*

Updated files
v1