A WebGL abstraction layer, 3D model loading support, scene graph management, object loading, etc. Basically all of the stuff you need to create your own engine, except for perhaps the tooling, is available in 3JS.
In fact, there's other tools such as A-Frame, which is a VR framework which uses an HTML type mark up for creating 3D worlds. It is actually built on top of 3JS. You're gonna find a number of game engines are either built on top of or built using 3JS. It's definitely a powerful building block for building your own 3D titles.
You can build your game directly in 3JS if you wish or you could build your toolchain on top of it. But there are another other JavaScript-based libraries of interest to game developers. On the physics side of things, you've got a port of Box2D, Box2D is probably the most popular 2D physics engine out there. But there's also MatterJS and PlankJS. I don't actually have experience with either of those but they're both 2D game frameworks that run directly in the browser.
On top of that, on the 3D side of things, we've got the AmmoJS which is a bullet 3D physics port for doing 3D simulations, physical simulations. And then we've got OIMO, no idea how to actually pronounce that. And I'm not actually overwhelmingly competent with that library either so I'm not gonna expand upon it other than to let you know. For physics, those are your options out there.
On top of that, we've also got a great rendering library you should probably be aware of. That a lot of these including for example, Phaser and I believe Melon and possibly Cocos2D all build a pawn and that is PixyJS. Now PixyJS basically just abstracts away the rendering layer. So if you need to just do as fast as possible 2D drawing, this makes it so you don't need to know about WebGL or if you're doing fallback rendering, using some other method, PixyJS just takes care of all that for you and a whole lot more. In a lot of ways, it is to 2D what 3JS is to 3D.
So if you want to go ahead and roll your own engine, the nice thing is you've got all these various libraries out there that you can bring together kind of like virtual LEGO blocks, put them together and create an engine of your own, or you can, your game doesn't necessarily need an engine if you're not going to be reusing the code, and it's simple enough in nature. You can just build it right on top of one of these frameworks and go from there so you don't need an engine at all in the end.
If you're going to go the roll it your own kind of approach, or you're using a library or framework that doesn't necessarily provide all of the tooling that you might get from a more full fat game engine, you're going to probably still need some kind of a 2D level design tool. And in this space, I have two major recommendations. Now, the oldest one that's been around for a long time is the Tiled open source project. Tiled is capable of creating not only 2D maps, but also isometric and hexagraphic projection style maps. And then another one in this space that's much younger is the LDTK, or the Level Design Toolkit. Now both of those are excellent tools for composing, visually composing your world as well as populating it, setting up barriers and gameplay objects, etc. So if you are going to go with the homebrew kind of approach, you don't need to create these tools from scratch either. You could bring in tools such as LDTK and Tiled and basically create your own custom game engine using such resources.
Comments