Babylon.js + Webxr + Google Cardboard MP game possible?

Hello there,

I am very new here, so excuse me when I ask in the wrong manner.

I want to create a simple 3D Multiplayer game for my Bachelor Thesis, like chess. My supervisor wants it to be web-based and VRable. He has the Google cardboard but if necessary we can upgrade to something more high-tech.

Anyways he is no programmer so the possibility of this is out in blue. And as I only know vanilla JS I am also clueless about this specific combination?

So is it possible to create a simple 3D Multiplayer game with Babylon.js and play it (with magnet interaction) via the Vr Cardboard and webXR? Or is it too lowtech?
And is gaze interaction or eye tracking possible? I meant I have read it is not.

I am very greatful for every response!
Cheers
Tim

Hi timkarl,

Welcome to Babylon! That’s quite a features list; and while pretty much all of those things are possible (except eye tracking, which I’m pretty sure is not a feature in Google Cardboard, and perhaps “magnet interaction” as I’m simply not sure what that means), it doesn’t sound like the sort of thing I would typically recommend as a “getting started” project. If you can, I’d recommend breaking down the features list into a set of “tiered” objectives, starting very easy and building up to the bigger vision. For example, your tiers might be something like the following:

  • Display a chessboard in 3D with pieces on it on a traditional screen.
  • Make your chessboard viewable in VR.
  • Add the ability to move pieces on the board on a traditional screen.
  • Now make your pieces movable in VR.
  • Make your pieces aware of where they should be on the board, turning this into an actual game.

In this example breakdown, steps 1 and 2 are very easy, step 3 is slightly trickier, step 4 gets interesting (you’ll have to make some decisions about how things should be grabbed, etc., as the defaults aren’t as set-in-stone in VR as they are on a traditional screen), and step 5 that brings it all together will really put your implementation to the test. As a starting point for understanding steps 1 through 3, take a look at this Playground which shows an example of draggable objects, similar to how you might move chess pieces on a board. Try getting a feel for what this is doing, then working through in your mind how you would translate that to VR (do you want to control with gaze/motion/voice, do you want to be able to pick pieces up or just slide them around, etc.). Hopefully this will help contextualize what might be involved in a project like this. And if it all seems feasible after assessing it, then that Playground is probably a good place to start! For example, you might begin by trying to replace the primitives in the scene with your chess board and pieces, then add features and functionality from there. Hope this is, if slightly rambling, at least somewhat interesting. :upside_down_face: Best of luck!

Thank you very much @syntheticmagus. You gave me a comprehensive overview how one should approach a 3D - VR project. I quite thought so that it wouldn’t be that easy but I have a better view now: Thanks

Also the doc has plenty of insights on those techniques: WebXR | Babylon.js Documentation