Hi everyone, I’m really excited to share with you all my pet project for the past 2 months. It’s a chess game where you can
- interact with the chess pieces using simulated physics (using PhysX)
- change your size relative to the chess set
- play with friends online via WebRTC
Here’s the link: https://halfbaked.city/apps/chess-xr/app
It’s built with VR in mind right now so you can only play online with a VR headset, but you can move around and resize yourself to smack some pieces around on both desktop and mobile. Clocks in around 6MB, half of which is the physics engine
Here’s a little promo video I made to demo some things: https://youtu.be/1AV8Or6JdeM
I’ve left all the code unminified so that people can look through the project if they like for educational purposes
A big thank you to the three.js community for being so helpful and inspirational. I’d also like to give special thanks to @felixmariotto for building his UI library and https://github.com/prestomation for doing the emscripten bindings for PhysX
7 Likes
Looks great! Would love to see an addition of a chess clock to simulate real tournament games and see how players do in fast time controls while in VR
You’re welcome
Some feedback : I waited a bit for an opponent but unfortunately I had none, it would be nice if you added a bot opponent, even if its not physics-based. Also I popped in the middle of the chess board, and it seems that the ‘up’ and ‘down’ buttons are switched.
Overall great work ! It was fun to shoot the chess pieces, the physic runs very smoothly. Also I like the hands, did you do it yourself ?
Thanks for the feedback! Yea unfortunately not too many people are using it at this time haha. My next steps are to add a strict version of the game where you can only make legal moves so that I can let desktop and mobile users play too, and once that’s done it’ll be easy to add an AI to play against. The up and down being switched was because the way it works in code is that the user height/scale is what changes, but I realize the thought process of a user playing is that the settings refer to the table height/size so I’ll change that
I did everything except for models. The chess pieces I found online on a free assets website and the hands I stole from a-frame (I’m assuming they’re fair game to use…)
1 Like
Unfortunatelly it seems to be stuck on ipad chrome at the loading screen.
The video is hilarious
Ah thanks for letting me know. Hadn’t tested it on anything other than Safari for iOS, seems the same thing happens for the old iPhone SE on chrome as well. Glad you liked the video