I am trying to develop an app similar to sims, it will be multiplayer and the scene will be dynamic(will be substantially different for some people) . I think three js will be easier because of these
1-) networking will be easier for multiplayer, sockets etc
2-) Easier to dynamically create scene,
do you have experience with it any suggestions?
I’m actually working on such since few years ^^ a bit further than sims to build villages and cities, but for social interactions, house building, house holding it is pretty similar.
For your question, both can do it, which is easier depends on your experience and goals. With Unity you can buy a lot systems/plugins you might get to work together, but without having deep control and knowledge about these it can quickly cause a lot problems.
With goals i mean features, scale/performance and target platforms. With THREE you might notice a lot needs to be done by yourself (but you probably won’t be satisfied what is offered in the store of Unity and need to do it yourself too there) it is more of a highly flexible render engine.
But i need to say that your information given is a bit too less and the question too unspecific yet. As i said it also depends on what you’re more experienced with, if you started with both it likely will be hard anyway, such a game with all required systems and networking is a lot work and complex.
Thanks for the answer. I am not experienced in both so it will be a first for me, I have 10+ backend dev experience, this will be my first time for client side and gaming.
What do you think on programmatically creating the scene? I assume it will be more difficult on unity. Mine is not exactly a game it is more like an isometric view of a room and people interacting with each other in a web browser.
Personally, I find Unity’s WebGL export to be very bulky and cumbersome. The final exported files are usually huge, and if I remember correctly, it compiles a lot of its code into WASM, which would probably create a layer of complexity when trying to integrate with WebSockets.
Just check out this Unity demo and look at the developer network tab. Two files stand out:
Compare this to the whole Three.js library: 1.16MB
(Plus, if you visit the Unity demo on mobile, they warn you that Mobile is not supported)
If you’re looking for a similar 3D scene-editor expierience as Unity, I recommend PlayCanvas, it’s pretty user-friendly. But if you’re not worried about creating your scene programmatically, I’d stick with Three.js.
A multiplayer game written in Threejs can load and be ready in under a second.
Here is a Threejs multiplayer game I wrote in only a few days, that you can use as an example.
If you want real time sockets though, you will have various problems to solve. Your server will need to be geographically close to your clients to minimise ping. That is if close to real time updates are an important part of your program.
The server hosting my game demo is in New York. There is no one solution for everything in sockets. You will need to balance the pros and cons on every app you write. You will never solve the low latency issue. I still see problems on GTA and R6:SIEGE and they are high budget productions.
If you want to create web apps with an editor, I’d recommend PlayCanvas over Unity. Recently they also did great upgrades to their free plan, so I recommend checking it out.
With that said, one big advantage Unity has over all other options is their very popular, huge ecosystem. If you’re willing to spend some money, you will probably find 90%+ of assets you need in their store, getting rid of a lot of workload and saving you time. It integrates very well into their editor.
PlayCanvas also has a store, but it’s not very big.
Out of these,
three.js will probably require most amount of work, since it’s not a game engine. There will be LOTS of stuff you will need to do yourself and potentailly rely on a lot of 3rd party plugins. Community is pretty great and open though and you will have most flexibility.