This is a collection of common questions I receive, hopefully with some good answers.
This is an amazing web API, and I highly recommend it.
Want to leverage WebGL, with a nice 2d API. I recommend PixiJS. It has a really nice API and great docs. It's actively supported and a mature product.
Want to make 2d games? Phaser has everything you need. Under the hood it's powered by Pixi.js, but it includes things like physics systems, a full fledged game engine, and great docs. I also recommend checking out Tiled.
If you want to get started doing 3d, then I highly recommend learning by using three.js. Start by reading the source of the examples. I helped out in the early days with documentation, and reading the source code of how three.js works was a nice way to learn 3d for me.
I leave my preferred WebGL library for the end. I don't recommend starting out with it, but once you've graduated to knowing more about how WebGL works, it's a great library to do things from scratch. It makes it fun to work with the WebGL API. It's what I've used to build all of my Sessions.
Going from three.js which is a great abstraction, to knowing raw WebGL is a big leap. I'd recommend if you want to do this, try first by rendering a lit bunny rabbit from scratch. The following are a list of resources I've used to help on my path.
- WebGL Fundamentals - The first stop on your path to learning WebGL
- WebGL on MDN - Lots of docs here.
- WebGL Spec - If you really want to learn it, read the spec. Seriously.
- My YouTube Videos - I've talked a lot about my process on how I make things here.
- Matrix math for the web
- Game Engine Architecture - One of the best damn books. It's a deep dive for sure.
- Mathematics for 3D Game Programming and Computer Graphics - Math is your friend.
- GPU Gems - Craaazy techniques
- Real-Time Rendering - Craaaazy math.