Most friendly "encapsulation" framework

Hello everybody,

So, I chose babylon js to recreate my old multiplayer flash card game, but before to reach the game, there are different other pages / steps (as you could see in the screenshots from appstore ‎www.chibre.ch dans l’App Store), I’ll have to do:

  • Login page
  • A page listing the different rooms players can connect to
  • A room page with a main chat, private chat, and some tables where players can sit to be part of a game

and that’s it, when 4 players sit on a table then the babylon js game starts…

So, I don’t think babylon js is suited to make the whole “site” around the game, and I know I’ll have to learn a new js framework, which brings my original question: what js framework will be the “best” (most friendly, easy, performing, whatever) I’ll to invest time in to learn ?

We have different Angular projects at my (real) work (yup this is personal project), so, I already did some hello world stuff there, but this could seam a bit over killing… what about Vue.js ?

Thanks!

What is easiest depends a lot on what you’re familiar with. A little bit of plain javascript or jquery with something like socket.io (or manually w/ websockets) can make a chat room pretty easily. Express mixed w/ passport.js can make some logins if you’re already a web developer. Php or whatever else is fine too.

I don’t think vuex/vuejs would be overkill, as it looks like your game might have the majority of its code involved in the webpage + ui part of things, and the babylon/game-engine part might only be 30-50% to render the cards and animations.

It is also totally possible just to make that game as 3 separate webpages without any framework, if you prefer that style.

I like React. I used it for the inspector and my personal apps (https://www.collecto.app / https://www.urzagatherer.app) and I like the way it works

But as @timetocode said, it is up to you. All frameworks are quite good tbh

thanks for you answers :slight_smile:

@timetocode I left web … 10 years ago, lol, so at this time I was very familiar with action script and some php… 8 years ago I learned objective C to port my game on ipad, and stopped: my point here is that I’ll have to learn something new anyway, so… finally I might not look at the most friendly but maybe most performant…

I’ll have also to add a chat to the game itself, for the 4 players to be able to chat together: I am even thinking to do something light and kind of deeply integrated into the game, giving a chance to the babylon GUI (chat is nothing more than an input text and a limited buffered text area that is continusouly updated, after all), but in the event I would use another framework to do that… what would fit nicely with Babylon JS ?

Frankly speaking, if no babylon js integration in the picture, I would assess Angular VS vue.js… dunno why I am not really thinking about React.

My current babylon js investigations are done in js: would there be any limitation if I would switch to typescript ? Thinking about angular “encapsulation” (<- if that means something)…

My geek friend, not knowing babylon js, having tested the three frameworks, is promoting vue.js, pretending it is proposing the best of the two other ones and would suit well for a one guy medium project…

The good thing is that Babylon.js will work with all of them so go with Vue (so you can leverage your friend knowledge :))

Hello everybody, I am finally back, 5 months later :slight_smile:

Long story made short, I had to built a server side gateway to discuss in rtmp with my existing adobe media server while offering sockets capabilities to the new javascript game client.
The client is done in vue.js 2, main pages / functionalities are almost done (login, list of rooms, room with chat and tables where players can sit to start a new game), and it is now time to get back to babylon js :wink:

And here is my first question: this is where I left a few months ago my babylon game client project Chibre.ch, and now that it is about trying some end to end integration, before to really go into the ux details. I was happy with vanilla javascript, but I found out yesterday about Vue-BabylonJS Documentation site, which might ease a bit the integration whith what I already have BUT, I would like to know if thiis is reliable / supported / future proof ?

I am not looking to extend a big vue.js app with some 3d (I am a vue.js beginner), the 3d game client is really the core of my app, the reason of being of my whole project, and I would like to know if I would not have better to stay in vanilla js, maybe just to be better supported here, or to ensure I can reuse any existing example / playground ?

Thank!!

1 Like

I think this is pretty well supported by @BrainBacon

So… I was not convinced to add an abstraction layer to BabylonJS, therefore, I npm installed all libs in my vue app, and did small adaptations of my code to make it vue-compatibe in a new vue-component, and after a few hours, it worked like a charm :slight_smile:

what took me most time to understand was how to make earcut work, as I had to do nothing else than to import the lib in my former project, but my friend showed me I could pass it to the ExtrudePolygon function as the last param.

let display = BABYLON.MeshBuilder.ExtrudePolygon("polygon", {shape:shapeDisplay, depth: lDisp, sideOrientation: BABYLON.Mesh.DOUBLESIDE }, scene, earcut);

1 Like