What is the best way to create a Chatbox for a multplayer game?


As the title states, what would you prefer HTML based or using babylonjs GUI. If it is the latter how do you implement a chatbox using babylonjs GUI?


Fadi Bunni

If you do not plan to go VR, I would recommend plain html :slight_smile:

So like you just wnat to have a wrapper around your canvas using the html as GUI?

What about using xml?


well xml is a file format :slight_smile:

I’ve played with layering in my last few projects. Overlay a 3D canvas with a 2D canvas then overlay that all with HTML. Use alpha on everything with both canvas being 100% and absolute positioning. That way you can have anything anywhere on your screen using any of the technologies.

I would then use plain HTML for the chat box as Deltakosh suggested.

I’ve built my entire UI using HTML/CSS, and there’s no way doing this in 3D is easier. So unless you absolutely need a 3D HUD/VR effect, I can only recommend taking the path of least resistance.

I simply have a container for the render canvas that takes up the entire screen (fixed position, 100% width/height). Then add UI elements like you normally would on a website. Pretty easy! You can even use existing JavaScript-based widget libraries if you want to get fancy.

Alright guys,

Thanks for your input.

I think I will go with HTML5 :slight_smile:

1 Like