Category Archives: experiment

Flattr Microdonations

Some of you may have heard about Flattr before. It’s a “social microdonations platform” where you can give small donations to a content creator if you like their content. Kinda like throwing your loose change to a busker in the street.

It’s a cool idea. Like a blog post? Hit the Flattr button to give them small tip. Enjoyed a Youtube video? Hit the like button to give them a small tip. You set your monthly maximum spend and then you can just go crazy Flattring everyone you like… your monthly spend will get distributed to all the people you tipped that month.

But I’m not convinced that it’s really taken off. How many of you can say you have a Flattr account right now?

At any rate, I thought I’d give it a go. So from now on all my posts have a little Flattr button at the top. If you like what you read, click the button and make me feel all warm and fuzzy inside.

The Plan: How one man with no time intends to make the next Diablo this year

I have a problem – I want to make a game, but I don’t have a lot of free time.

I’m a full time research scientist, father of a 10 month old baby, and partner to a sweet and deserving woman. I’m a family man now, and with that comes responsibility. I’m in no position to take significant time away from work. I’ve got a mortgage and mouths to feed. Vanessa is taking care of baby full time, so our income is already a lot lower than it used to be. Besides, I quite like my job (most of the time at least). I’m hardly going to quit.

Ok, so I want to make games, I don’t want to quit my job, but I don’t have much free time. How can I make this work?

Stop focusing on what I don’t have, start focusing on what I do have

It’s not very productive to fixate on how little free time I have, how tired I am, and how it’s a serious challenge just to keep my head above water. I need to take stock of things in an objective fashion and find a way to move ahead. If it is truly important to me that I make a game in my spare time I need to figure out how to make that possible.

no-time-to-say-no-time

I have skills and knowledge.

I’m a skilled and experienced programmer. I’ve got a PhD in Computing and years of experience implementing highly technical and complicated solutions to very sticky problems. Best of all, because some of my research projects have been in the serious games field, I’m skilled in game development using Unity. I’ve got a head-start over many indie developers, who often need to spend significant time getting up-skilled.

I have many of the tools I need.

Thanks to the aforementioned serious games projects I already have Unity Pro licenses and my Unity store account is already pre-loaded with a good set of useful development tools and assets. In particular, I’m fortunate enough to have a current subscription to Mixamo All Access, giving me near unlimited access to their massive library of humanoid animations and their very nice Fuse character creation tool.

I have some disposable income.

I’ve been working as a full time academic since 2009, and until recently my partner was working full time as well. We live quite frugally, and are generally very financially responsible. This has put us in a comfortable position financially.

I have money, but I don’t have time. I can buy back time by spending money on assets and tools that will save me time. It’s important to me that I make a game, not that I make every little part of the game myself.

I have accrued leave.

In Australia we earn 20 days of annual leave for every year we work. However, I typically only use 10-15 days of annual leave per year. Currently I have 35 days of annual leave in the bank. It’s not much in the scheme of making a game, and my partner will kill me if I burn through it all just to “do different work!”. But I can probably get away with spending 5-10 days of that on my personal projects, while still leaving plenty for proper family holidays and emergencies.

I have public holidays.

In Australia we are fortunate to have a respectable number of public holidays per year. As an academic I’m lucky enough to get a few extra “for free” (read: senior management and the union negotiated extra days of leave as an alternative to a more respectable annual pay increment). We get extra days at Easter and Christmas.

I do have some free time.

We put baby to bed between 7-7:30pm every evening. We are constantly exhausted and go to bed at 9:30pm. There’s a two hour window each evening in which I can potentially do a little work. Most nights I need to unwind and spend some quality time with my partner, or else our relationship can get strained. But on average I can probably squeeze around half an hour to an hour of “work” in the evenings, provided I’m motivated enough… It’s not quite the same as proper, focused, “in the office” work, but it’s something. I can also squeeze a couple of hours most weekends during baby’s daytime naps.

I have a game idea.

If the goal is to make a game, I have to come up with a good game idea first. Importantly, this idea has to be one that is sufficiently exciting to motivate me, yet one that recognises my limited time. I’m not going to make the next Skyrim solo in my spare time. I have to limit scope. Ideally I should probably be making a simple mobile game or arcade game, but I don’t like to play those kinds of games and I really don’t want to make one of those games. No point in trying to start a project I have no passion for.

I have decided I want to make a Diablo style top-down ARPG rogue-like with procedurally generated dungeons. To make it interesting I will use arcade elements instead of a vast world and a rich lore which are outside the scope of what I can reasonably deliver. The player will have a limited amount of time to get as deep into the dungeon as possible, while competitive leaderboards and character customisation elements will encourage replayability. See the WIP draft design documents for (a lot) more detail.

This idea is particularly inspiring to me, as it is the kind of game that I want to play, now that I have so little free time. A game that is inherently designed to be finished in under 15 minutes is perfect when you know that you only have 15 minutes to spare.

Make a plan

Alright I don’t have much free time, so I have to make sure that what little time I do have really counts. This means careful planning as per my previous blog post.

Looking at the calendar, I should be able to use a couple of days of annual leave to turn Easter into a full week break, and I can negotiate with my partner to spend a good percentage of that time working, once all the family obligations are complete.

I am going to use that window to really get stuck into implementation. I need to be able to sit down and focus for hours at a time, with few distractions, and without significant breaks between sessions. Once I’ve got a framework in place and I’m comfortably underway I can iteratively solve minor problems one at a time using my short blocks of free time, and feel like I’m still making progress, but without that initial burst of progress I find it very hard to motivate myself. Your mileage may vary, but this is what seems to work for me.

But now I have a deadline! I need to be ready to start full steam coding by April the 3rd! I’m only going to have a week, and I need to be able to get as much done as possible in that time. So my time between now and then is really valuable. There’s a lot of planning and preparation work that needs to be done to lay the groundwork.

  • I can browse the asset store to find the assets I need, and determine what I have to make for myself. 
  • I can prepare design documents and think about gameplay elements.
  • I can blog.
  • I can recruit Twitter followers.
  • I can prepare my website.
  • I can read up about solutions to the problems I know I’m going to have to solve.
  • I can prepare for marketing and promotion activities. Live streaming? Press releases? Greenlight? Kickstarter? Dev blogs? It all benefits from having some advance planning.

Clearly, I’ve already started doing these things. You can see my WIP draft design documents that outlines the game. My Twitter account has grown from 16 followers to over 350 followers over the last 6 weeks. I’ve been reading a lot about indie game development, greenlight, crowdfunding, dev blogs, blogging in general, marketing, press releases, and video production, and practicing these things where possible. And I’ve already found a great set of assets on the Unity Asset Store that are going to be perfect for my game.

I’ve also got an angle on this week of coding. I want to use this opportunity to showcase the amazing value that the Unity Asset Store offers, by demonstrating just how much one person can achieve in only a week if they make good use of the asset store. How’s this for a blog post title? “How much game do you get for $400 and 40 hours? – An experiment with the Unity Asset Store”.

Get to work?

By now I feel like I’m pretty much ready. I have a clear vision of what I want to achieve, and a plan in place to help me achieve it. There’s still plenty of things that I can do in advance, but I could start work tomorrow and feel like I was using my time productively and efficiently.

There is still one significant problem left to solve though. The game I want to make is still too big. It’s small enough that I can make a good start in my one week coding spree, but it’s not going to be feature complete, and it certainly won’t be consumer ready. I know from experience that if I cannot keep sustained momentum on this project throughout the year then it will eventually be abandoned. This has happened too many times before.

To a certain extent this problem can be solved by cutting scope. But for the style of game it is, the scope is already quite limited… Cutting it any further risks making the game disinteresting, un-fun, or lacking in replayability. Game designs are like plants. Pruning them back can be beneficial if you go about it in the right way, but if you go too far then the plant will simply die.

Stay motivated

This is where you come in, Dear Reader. I need you to want this game to be finished, I need you to put the pressure on. If I know the demand is out there, then the motivation will flow.

Follow me on Twitter, and feel free to heckle. Many of my best achievements have been motivated in part by wanting to prove other people wrong.

Salvador Dali knew how it was.
Salvador Dali knew how it was.

Leap Hand Controller for your player avatar

Now Available on the Unity Asset Store

Leap Motion provide a bunch of Unity assets for integrating Leap motion controls into your game. Unfortunately, the hands they provide are all disembodied hands, with no connection to the player avatar.

I thought this was a bit of an obvious omission, so I made my own solution which drives the avatar character’s own hands using the Leap controller. The arms are sorted out in a more or less natural way using Inverse Kinematics (as such, this is a Unity Pro only feature, sorry Free version users!).

You can see this in action in the YouTube video below.

This is done as a simple extension to the Leap Hand Controller class, and still uses the RiggedHand class Leap provide to drive the actual hand.

Instructions

Adding my solution onto a player avatar in your Unity scene is quite easy, although does require a little bit of configuration for the avatar.

  1. Add a child gameobject to your player gameobject. The player gameobject must be a properly rigged character with 5 fingered and 3+ jointed hands. I did all my testing with characters generated by Mixamo Fuse, and then rigged with the Mixamo auto-rigger.
  2. Position this child gameobject where you want the virtual Leap controller to sit, generally speaking you will want this to be about 10-30cm out from the avatar’s belly button.
  3. Add the IKLeapHandController script to this empty gameobject.
  4. Go to the avatar’s left hand and add the RiggedHand script from the Leap Unity package (v2.0+) to it.
  5. Go to each of the avatar’s fingers and add the RiggedFinger script to them.
  6. Set the finger type on each of the fingers.
  7. Set the bones (transforms) on each of the fingers, you should have 3, with the first one being the transform that represents the base of that finger, the second one being the knuckle, and the third one being the joint between the knuckle and fingernail.
  8. Go back to the avatar’s hand, and set each finger in the Fingers array: Thumb, Index, Middle, Ring, Pinky.
  9. You will also need to set the finger pointing and palm facing vectors for each hand and finger. For reference with my Mixamo characters I had the finger pointing as 0,1,0, and the palm facing as 0,0,0. For each finger I had 0,1,0 and 0,0,0 except the thumb which was 0,1,0 and either -1,0,0 for the left hand or 1,0,0 for the right hand.
  10. Do steps 4-9 for the right hand also.
  11. Go back to the IKLeapHandController gameobject and set the Avatar Left Hand and Avatar Right Hand fields to use the hands you just configured.
  12. Go to the root node of the avatar and add the IKActioner script, and tell it which gameobject you put the IKLeapController onto.
Leap Hands - Connected to your avatar.
Leap Hands – Connected to your avatar.

The IKActioner script passes the inverse kinematics pass from the animator component on the avatar up to the actual IKLeapHandController.

The IKLeapHandController is an extension of the provided LeapHandController, set up to work with avatar hands and inverse kinematics.

Interested?

Let me know if you’d like to see this work polished up and added to the Unity Asset Store. I’d be happy to sell it for only a few dollars if there’s any demand for it.

Failed Experimental First Person Control Scheme for VR

It’s a well established problem at this point. First person control schemes for VR, specifically the Oculus Rift, just aren’t very good. There’s something very unsettling about being turned around without having the associated sensation in your real body. Stick yaw (rotation on the Y-axis) is particularly awful… that means every time you move your mouse, or hit the camera stick on your game-pad. Nausea town.

However, I noticed that it’s relatively comfortable to do roller coaster experiences in the Rift. It’s not too horrible even when you turn corners. The seated “on-rails” experience is relatively manageable, compared to a simulated walking experience.

This gave me a thought: can we just make walking in VR an on-rails experience too?

So I spent an afternoon coding up a system in Unity where you select a waypoint from a list, and your character will automatically walk to that waypoint for you. This was extremely uncomfortable at first, as you weren’t really too sure what route the NavMeshAgent was going to pick to get to its destination.

An automagical navigation system for first person character movement.
An automagical navigation system for first person character movement.

I then added a sparkly particle trail, so you can see where the character is going to try to walk. More equivalent to an on-rails experience.

A sparkly breadcrumb trail of pure first person character VR joy?
A sparkly breadcrumb trail of pure first person character VR joy?

This worked just great in every way except the goal… it made you sick as all hell when your character turned corners.

I experimented with the cornering speed. Tried making the character turn corners really slowly… this actually made it way worse. Fast track to chunder-town.

To make matters even worse, when you turned corners really slowly it made it easy for the character to miss the destination waypoint and start orbiting it, trying to make their way to the destination but constantly missing it. This orbiting behaviour was an incredible puke-fest.

Turning the cornering speed way up helped quite a bit. It was still very uncomfortable though – basically it just got it over and done with faster, so it was less sickening. But it was still sickening.

The lack of active input means that even though you can see the path ahead of you, your body just isn’t really 100% prepared for what happens. It would likely be better if you put the character into a vehicle for this navigation event. The human brain is relatively accepting of being moved by a vehicle. But then it’s not really a first person character control scheme, is it?

Disheartened by this complete and utter fail, I just implemented a teleportation system. Screen fades out, character is teleported to the waypoint, screen fades in. Easy peasy. Quick job.

Teleportation is best.
Teleportation is best.

Turns out teleportation is completely comfortable.

So often the easiest solution is the best solution.

If you want to try either of these solutions out, they’re both included in the latest release of the Music Visualisation Experience.

Oculus Best Practices Guide

Having had further opportunity to reflect on this experience, I thought I’d post an update. Everything is “discovered” here has already been discovered by those who have gone before me. When I first got the DK2 I quickly glanced at the Oculus Best Practices Guide, but didn’t really assimilate it fully. I was in a hurry!

A few months of developing for the Rift under my belt and I took a moment to give it a more thorough reading. They summarise the problem fairly well: acceleration is to be avoided. Your vestibular system doesn’t detect acceleration, but your eyes are telling you there is some. There’s a disconnect between those two systems that causes the discomfort. When you turn you experience acceleration, thus the problems with turning.

The guide encourages movement being done at a constant velocity where possible, avoiding acceleration events. It also points out that head-bob is a series of small accelerations in various directions, and recommends against head-bob. Teleportation is also suggested as a viable option.

I guess I should make a head-bob free version of my first person controller that walks at a constant velocity in straight lines everywhere!