Ask HN: Anyone making games in JavaScript or interested in doing it?
I'm a software developer working mostly on web applications. When I was younger, I wanted to make games but I shelved the dream pretty early because I had other interests and didn't know how to program anyway.

Couple of years later, I decided to pursue a BS in CS because I was interested in getting into AI, however during my degree, I realized that I enjoyed building applications/web apps better than fine-tuning ML models. So I shifted my interest and effort towards web development and got a normal SWE job after college. Also, I heard about the bad pay and working conditions in the games industry so I was never interested in joining it anyway.

During that time, I didn't think too much of video games as I basically stopped playing them for a while and was not willing to learn Unity/Unreal/Godot as they were specifc to the game industry. I preferred to build side projects in languages that I could put on my CV and would be relevant to web dev.

However, I soon realized that I could make games using the same programming language I was using for my job (JavaScript/TypeScript) so I gave it a try. This is how I was introduced to the world of JS game dev.

This is what I learned.

-> Making 2D games in JS is viable, graphics have come a long way in the browser.

-> There are many options you can use. Just like the plethora of frontend libraries/frameworks the same can be found in JS gamedev.

-> Monetizing games made in JS is also possible. You just have to wrap your games as a desktop app. Here again many options exists.

-> Games made in JS are easily shareable, which is ideal for game jams. You can then take your JS game jam game and continue developing it as a full release you can wrap as a desktop app and sale on Steam. I think this is the greatest advantage of making games with JS.

Here are the various options I came across so you can narrow down your choices when choosing how you'll make your game :

Lower level (No libraries being used):

-> Canvas API (Easy enough)

-> WebGL API (Harder than the canvas but more performant)

-> WebGPU API (Early days, not widely supported)

Medium level (Separate libraries for rendering and physics):

-> Rendering: Pixi.js + Physics: Matter.js or Planck.js

-> Rendering: P5.js + Physics: Matter.js or Planck.js

-> Rendering: Kontra.js + Physics: (same options, there are probably more I'm unaware of)

... other options I'm unaware of.

High level (Single libraries that takes care of both rendering, physics and even sound for some of them)

-> Phaser3 (Most famous, Vampire Survivor is made with it)

-> Kaboom.js (The one I'm currently using, documentation is great and very easy to understand)

-> Excalibur.js (Very promising but below ver1. Latest version at the time of writing this is ver. 0.28)

-> Melon.js (Old but being currently revamped)

... other options I'm unaware of.

Higher level (Full game engines)

-> Ct.js

-> Cocos2d

-> Play Canvas

-> GDevelop (No code but can use javascript)

... other options I'm unaware of.

I recommend the libraries in the high level section as I think those are the ones that gives you the most freedom to structure your codebase to your liking while giving you enough stuff out of the box to make your games quicker.

Anyway if you have yet to delve into the topic and you're interested, I made a YouTube channel teaching gamedev in JS through tutorials. Tutorials I already made include :

-> How to make a Pokemon-like.

-> How to make a platformer.

-> How to make a fighting game.

You can find my channel at https://youtube.com/@jslegenddev.