Porting to a Mobile Touch Interface

It’s tempting to think, when porting a “click-and-drag” game from PC to mobile, that your control scheme update will be as simple as hiding the cursor, but the reality is far from it.

We knew from the start that the first major change in Let There Be Life would be that when selecting a branch for placement, it would need to be offset from the touch position so that the player’s finger doesn’t obscure the branch itself. This is not just important  from a visual standpoint, but essential for being able to see/align each branch’s attach point.

What quickly became apparent is that some branches looked too close to the finger, but others not. We realized that branches pointing away from the finger need a greater offset so the attach point is a comfortable distance from the finger.

Looks almost done…it's not!

That was a good start, but we still had work to do.

The next problem to be dealt with was the inability to consistently place certain branches near the top of the trees without risking the finger leaving the touchable screen area. This was particularly evident when the branch pointed up, such that the attach point was at the bottom. Compounding the issue was if the player clicked on the upper part of the branch-selection-zone (we maintain the touch point offset from the center of the branch, because all efforts to reduce it upon dragging felt awkward).

To combat this, we amplify the branches current y-position with respect to the finger as the player drags it upward. The amount of this amplification is dependent on both the current position of the finger (increasing the higher the finger moves) and the initial touch offset (if the touch is towards the bottom of the selection area, we don’t need to amplify much; if the touch is towards the top of the selection area, we amplify more because the branch is starting off lower relative to the finger).

No/little vertical change.

 

 

 

 

 

 

 

 

 

Note how the branch has moved up.

 

 

 

 

 

 

 

 

 

All these changes have us in a pretty good place. While playing the game on a touch screen is already satisfying, there’s still work to be done refining the controls (and I’ll write about that once we’re done). Nevertheless, it’s already exciting to see the game on mobile and we are super-psyched to introduce Let There Be Life to the mobile arena!

– Jay