VR Tactics

The beginnings of a turn-based tactics game for SteamVR. The combat system includes player- and AI-controlled turns that allow movement and attacks.

Created with

  • Unity
  • C#
  • VRTK (VR Toolkit)
  • Blender

Background

My husband and I were really hyped for VR when it finally hit the masses. When we got the Vive in 2016, we were excited to find that developing for it was actually pretty accessible to non-professionals. With a new medium, everyone was starved for content, so indie games and experiences were really thriving. We love tactics games, and we thought we could do some really cool and innovative stuff with VR for that type of gameplay. The tooling was very bleeding edge and not optimized for ease of learning and use, but

Features

controls feature
The controls are anchored to one hand and you point and click with the other, so you can walk around the stage wherever you want and the controls move with you.
pathfinding feature
The movement uses A* pathfinding to find the shortest path to the destination.
AI feature
The game alternates between player-controlled units and AI-controlled units, and the AI units move to the nearest enemy and, if in range, attack.
cancel feature
Movements and attacks can be confirmed or cancelled. I added a state machine to more easily handle this functionality.

I made this mini test game, sans VR, to hammer out the details of the state machine, as well as some unit classes and abilities. I had a lot of fun implementing skills that had different areas of effect.

Challenges

One of the more difficult and interesting problems was handling asynchronous operations and timed events in a game setting. Beyond the technical trickiness, it required a different way of thinking. Sometimes you have to manually give the player time to process what's happening, and that means waiting an appropriate amount of time between things; waiting for animations to finish, or to trigger a new event. It's particularly important with AI-controlled units; all the actions they take can happen practically instantaneously, but obviously a human needs time to perceive all of that. I spent a lot of time doing real-time testing and tweaking wait times to make sure things felt smooth and responsive.

Another difficult lesson for me was deciding what to do and not do on my own in this project. I was really interested in every part of making a game - the 3D modeling, texturing and painting, rigging and animating, creating particle effects, and on and on. I ventured into every area, some only briefly, some for much longer. It was really fun, and I learned a lot, but if I had stuck to making every asset myself, from scratch, I never would have gotten anywhere. This project is a great reminder for me to look for ways I can use resources that exist, and to always evaluate where my time is best spent.

Other fun stuff

The model I used for the character units is Unity-chan, a free asset released by Unity Japan that comes with many animations out of the box. It was a really great resource that allowed me to get up and running a lot faster than if I had taken the time to model and animate my own characters.

unity-chan

The one modification I found useful to make was to differentiate the player and AI units. Instead of trying to find a whole different model, I just opened a couple of the texture files in Photoshop and did a quick and dirty color replacement.

All the other models in the scene (except the VR controllers) were made by me, using Blender.

unity-chan textures

There's a lot of cool things that I didn't get to, as I pushed myself to get farther in the project overall rather than taking a deep dive on each aspect of it, as much as I really wanted to.

Some interesting things happen when your skeleton is not scaled properly to your mesh.