Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Pawnslaught VR Chess [Android][XR][free]

Discussion in 'Made With Unity' started by bitbang3r, Dec 5, 2018.

  1. bitbang3r


    Sep 22, 2018
    My new VR chess game for Android (with Cardboard-type viewer) is now available.

    Play URL:
    open Beta URL:
    shortened Play URL:

    Preview video on YouTube:

    Highlights: Imagine playing live chess while standing on a raised platform, observing your players through binoculars (don't laugh, the metaphor actually works pretty well), and guiding their actions with a laser pointer.

    How to play:
    • Point at a chess piece with the reticle, press and release the trigger. Point at an unoccupied square or computer piece, press and release the trigger. Enjoy the show.
    • There are five levels. "Beginner" is pretty hard to beat, and "Brutal" is... well... brutally hard. In theory, I could easily make it arbitrarily harder, but the current "Brutal" level is about as hard as it can get without making the AI take longer than a minute to pick its next move (if you ever need to win an argument about the performance-inferiority of ARM cores used in Android devices compared to even an old i7, chess games make it really painfully obvious).
    • I'm going to give the button a better name for the next release (probably to "save/share game transcript"), but the "Share PGN" button will save a transcript of your game (in PGN, with FEN end-of-turn summary) to any program capable of handling text intents (including an email client, if you want to mail me a bug report and include a transcript so I can replicate your game's state). I personally use it to save the game state to OneNote when an animation glitches on the phone so I can replicate it in the editor.
    I'm not really satisfied with the current fixed 3dof view, and have plans to improve upon it for the next major round of enhancements.

    Requires a Cardboard-type viewer, and supports the following controls:
    • Magnetic trigger [see notes below] (first-generation Cardboard)
    • Capacitive trigger (second-generation Cardboard)
    • Bluetooth gamepads and mouse button
    • USB gamepad or mouse button (connected via USB-OTG adapter)
    Additional notes about Magnetic Triggers:

    Magnetic trigger support is kind of experimental... Google officially abolished it a while ago, so I had to write my own library to do it. It works fairly well on my phone. As is usually the case with anything that had to be reverse-engineered through direct observation on specific hardware (in my case, a Nexus 6P with REIM 2 viewer), compatibility with magnetic buttons using different phones and viewers is almost a matter of blind random luck at this point (I plan to improve it, but I've gone about as far as I can without help from somebody else who has different hardware to experiment with).

    Note that magnetic-button triggering is disabled by default. To enable it, look forward & up to see the preferences board, aim at the "Enable magnetic trigger" checkbox, and select it. There's no catch-22 involved... regardless of whether or not magnetic triggering is enabled for the game as a whole, it's ALWAYS enabled for selecting that particular checkbox (yeah, getting THAT to work burned almost an entire day of my life). If you can't select the box using the magnetic trigger, it's because my library isn't recognizing your trigger presses at all.

    Big tip: if the magnetic trigger doesn't work with my app, try to find some app it DOES work with before filing a bug report. As anybody who's messed with magnetic triggers in the past knows, it's one of those ideas that sounds good in theory, but is a nightmare to support in real life. When it comes to mag triggers, some phone+viewer combos just don't work reliably, have NEVER worked reliably, and almost certainly never WILL work reliably.

    My mag button library absolutely requires a phone with a real gyroscope. If your phone uses "integrated" sensors to emulate a fake gyro, my mag button code will NEVER work on your phone (my code compares the gyro and magnetometer... phones that fake a gyro combine data from the accelerometer and magnetometer. Do the algebra, combine my code with data from a fake gyro, and the magnetometer data ends up canceling itself out on both sides of the equation).

    If it doesn't work at all, try rotating your phone 180 degrees (your viewer's magnet and your phone's sensor might end up in a better position relative to each other). If it works, but not well, try facing in the compass direction 90 degrees to the left or right.

    Also, if you use a magnetic trigger, make sure you know how to trigger re-calibration of your phone's compass... in theory, you can do it by launching Google Maps & moving the phone in a complicated "figure-8" pattern. You'll know you need to do it if Google Maps & Waze suddenly start reporting "No GPS", even though OTHER apps (like ChartCross GPStest+) have no problem whatsoever obtaining a location fix accurate to a few meters within seconds). The problem is that GM/Waze CALL it "GPS", but REALLY depend mostly on dead reckoning to determine location, and suffer badly when the compass' calibration data gets corrupted (say, by a large magnet in a VR headset that totally confuses its sense of direction).

    Other VR platforms coming soon.