Is it possible to optimize BabylonJS to use as 2D game engine like PIXI and Phaser?

I suppose BJS performance is mush slower than PIXI and Phaser. Am I right? They are both WebGL2 engines. Is it possible to optimize BJS to use it in 2D game to drastically increase its performance?
Maybe turning off lights, shadows, use own simple shadows?
What actions can be taken to increase the performance of BJS using in 2D games? Or anyway it’s very bad idea?

I wouldn’t say it’s a bad idea :slight_smile: as you’ve said, they’re both WebGL, so they’re using the same technology under the hood, and Babylon is used for 2D content, like the onscreen controls in XCloud. @sebavan and @Cedric have worked on some projects that are more 2D than 3D so they might have some tips?

As @carolhmj says, Babylonjs is a 3d engine that can do 2D games as well… or even 2.5D
I don’t see how it would make a huge performance difference. All the work in done with the GPU (well …most) and CPU/GPU are fast enough now to not be a problem for 2D games. With some cares on culling and perf mode, I doubt you’ll see any performance difference.
This said, I believe the API might be the biggest difference where it’s clearly made for 2D content where as Babylon might be more generic and 3D oriented.
This said, I don’t know PIXI API, so, not the best person for some advice here.

1 Like