Virtual Reality Featured Image

Annual Hackathon 2017

Every year I participate in a 48-hour hackathon at work. It’s an opportunity to write software you otherwise wouldn’t get to write, this could be a neat automation tool to save you time on daily tasks or something totally unique like a virtual reality Blackjack game that will never see the light of day. As long as you think you can write it in 2 days nothing is off limits. There are several prize categories; Most Creative Hack, Most Business Value, and Non-Technical Project. This year I decided that I’d give virtual reality a crack and aim to at least get an honourable mention in the Most Creative Hack category.

The hackathon typically starts on a Thursday and finishes on Friday afternoon before our annual Christmas party. Given its participated in during work time, most teams don’t go hardcore and spend the full 48-hours on their projects like some hackathons you hear about. It is a lot more laid back than that and most hacks usually never have more time spent on it than the 16 working hours, I think this reduced timeframe adds to the pressure of creating something that is worth entering in the contest.

Thursday morning is generally spent getting a team together and usually writing a brief project plan. My team this year consisted of 3 .NET Developers, a QA Tester and a Product Owner, with varying experience in technologies we could have used to attempt the project we decided it would be best to go with Unity3D due to the incredibly simple exporting process. Within the team, I had the most experience with Unity having previously released Super Blasty Blasty on mobile platforms using the engine and used it extensively during my time at University. Our QA Tester had some previous exposure to the engine as well from a more game designer point of view with a focus on creating 3D scenes, however, the other 2 developers had little to no experience using the engine.

Our plan, in a nutshell, was to get the basic Blackjack mechanics implemented in VR then integrated into the Bede Gaming Platform. This was our main focus during day 1, we attempted to recycle some code we found online to provide us with a basic Blackjack core, however, this ended up creating more work than it got rid of and led to some headaches. To try and split the work efficiently we created a Git Repository so we could all work in parallel and speed up the development, this introduced its own problems as having no experience using Unity in a team we ran into countless issues with Git. Eventually, we found a great blog post which helped us tackle some of the problems but more often than not we found ourselves using the traditional approach of just dragging files between machines. After we tackled these problems day 1 was rounded out and we had a working Blackjack game, albeit without any virtual reality elements or platform integration.

Heading into day 2 we decided that making the game function in virtual reality had to be the main goal now we had the game logic handled, we had originally planned this to be done using WebVR and spent several hours trying to do this. Eventually, we gave up and opted for a native Windows application to avoid the headaches of using such an immature piece of software. Making the switch to native app sped our development up massively and got rid of pretty much all the headaches we had been having with WebVR. Unity native VR support ended up being fantastic and in less than an hour after making the switch to native we had the game working in 3d space. Time was running out by this point so we opted to reduce some of platform integration plans and strip out some of the ideas that didn’t add a lot to the overall product. Another one of the features we removed was the ability to play with multiple players in favour of just having the game remain between a single player and the dealer. Stripping these features ultimately gave us more time to polish the core experience and provided a much better outcome for the effort required. Day 2 ended with us pushing the “final” version with about 25 minutes left before the deadline, this version was what we considered our Gold release and it was released into the wild.

We had the game running for around an hour before official judging began and received pretty much universally positive comments, the features we had left out ended up not being to the detriment of the hack and the end product played very well. When the judges eventually got to try the game I’d hazard a guess that at least 80 hands of Blackjack had been played in our virtual casino. The winner of each category was decided by popular vote once the judges had narrowed the choices down to just 2. Having our game running in the wild for as long as it was ended up paying off, as the 5 of us were crowned overall winners for the Most Creative Hack category, narrowly beating AR Bingo for the top prize.

tl;dr: Entered hackathon, made cool thing, won a prize.