from Demonll@lemmy.org to programming@programming.dev on 20 Apr 11:36
https://lemmy.org/post/5435220
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!
#programming
threaded - newest