this post was submitted on 20 Apr 2026
3 points (80.0% liked)

Programming

26625 readers
110 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Hi folks,

I've been practicing game loop logic and input handling by building a small browser shooter entirely in vanilla JavaScript. No frameworks, no build tools—just a single index.html file.

Tech highlights: • Custom virtual joystick with unified mouse/touch input • requestAnimationFrame game loop with velocity-based movement • Boundary collision and smooth 60FPS rendering • ~300 lines of readable, commented JS

This post: Gameplay video showcase of the current prototype.

Looking for feedback on: • Code structure: Any anti-patterns or modern JS improvements? • Input handling: Is the joystick math clean enough? • Performance: Any obvious bottlenecks for low-end devices?

Happy to share the source code if anyone wants to review or tinker. Thanks for your time and constructive thoughts!

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here