Although I’d previously determined that the controls of the cart worked nicely on a touch screen, they were nowhere near perfect yet. This is one of these aspects that can make or break a game, so it’s important to address it as early as possible.

I developed two classes of control schemes:

  • “Absolute” controls are like joysticks. If you put your finger down, nothing happens. If you then drag your finger away from its starting location, the amount of movement results in a force being applied to the cart. The farther away you move your finger, the bigger the force becomes; the force depends on the position of your finger.
  • “Relative” controls are like pushing the cart directly. In this case, the force applied to the cart depends on the speed with which you move your finger. It’s a bit like pushing a slippery piece of paper around on a table.

The program computes the result of both of these schemes simultaneously, and mixes them with a given factor. This allows for combinations of both schemes to be in effect at the same time.

Then, there’s the matter of where to apply the force. If we push the cart on the left side, it starts turning to the right, and vice versa. In the initial version, the entire screen was “mapped” to the cart as it was shown on screen. For example, if you touched the screen at the bottom left, it was like grabbing the cart’s handle on the left side. Since this might be confusing, I optionally limited the number of points that you could grab. For example, the entire left side of the screen would let you grab one point on the left side of the handle, and the same on the right.

To experiment with all these parameters and figure out which worked best, I added a menu:

Menu showing controls settings

I sent this to my brother, who is far better at games than I am. From him, I learned:

  • Absolute controls (joystick-like) are better, because relative controls keep you frantically swiping the screen.
  • Sideways pushing is too sensitive. (This makes sense, because due to the shape of the cart, a sideways push will easily cause it to spin out of control. I doubt that we even need the sideways push.)
  • The surface feels like ice. We need more grip!

Especially the last point is interesting. The whole idea of a shopping cart with four swivel wheels is that it can move in any direction, at any angle, with the least possible resistance. My brother probably expected the cart to make a turn if it was pushed on one side. Instead, it would spin around its axis, but keep moving in more or less the same direction! If you’ve ever played the game Asteroids, you’ll know what I mean:

A screenshot of the game Asteroids (Image source)

Unfortunately, this is a byproduct of the way the controls work right now, and there’s not much that I can do about it. I will need to consider carefully whether this is going to be a real problem, though.