Tuesday, July 6, 2010

Physics and Input

Chuck Rock
So, the last couple of weeks have been a real challenge. My physics work is almost complete, but - as ever - edge cases cause lots and lots of problems. I had rocks that forced you back through 1-way walls, balls that went into a non-decaying orbit when thrown, clouds that made you flip into the air as you approached an edge, objects you could swing off causing the player to enter into a non-decaying orbit, and countless others.

The ultimate problem emerged when I realised the player wasn't gaining mass when carrying objects. My little (as yet unnamed) pal wandered around quite blithely, leaping all over the place with a boulder on his head the size of a small 4x4. It seemed a bit silly. When players walked against the boulder and thus pushed it, it felt suitably massive and rolled sullenly, like an overweight cat being shooed off a couch. However, flagging the boulder as 'carryable' allowed the player to loft the massive object into the air with ease.

I fixed this.

And then I realised why I hadn't fixed it before.

In game design there's a constant fight between realism, expectation and fun. Realistically, you shouldn't be able to move a heavy boulder. However, if you could lift it, you'd expect to stagger under its weight. However, that's no fun.

I realised I was going to have to be a little more binary in my treatment of all this stuff, and figure out why I was letting the player do these things in the first place. I always think that once you get into the psychology of game design, a lot of complicated issues become a little clearer.

So, why am I allowing the player to lift the rock? Because it's fun to carry stuff. Because it's necessary for some quests. Because you can throw rocks, and in order to throw them, you need to be able to carry them. See - all this stuff basically says: "Hey! I'm fun! You can do stuff with me!"

So, in this case I decided - even if it is hard to push a rock - if you can lift it, you can move it around with ease. If you try to throw it, it'll arc just like a small pebble.

'But surely that's nonsense!' I hear you cry.

'No,' I respond. The key is in the 'if you can lift it'. It's impossible for any normal person to lift a fecking great rock. However, if we're saying 'you can lift it' then you're super-strong. The end.

I remember the Halo team talking player expectation in relation to AIs, and how 'grey' rules really don't work. If you can make a squad of baddies run by killing their leader, it better happen every damned time, or else don't bother doing it. It'll just confuse the player.

In my case, if you can lift it, you can carry it. If you can throw it, you throw it in a manner identical to every other item you can throw. No exceptions.

Click, Swipe, Press, um... Lick... uh... Fondle?
Have I mentioned how much I hate on-screen controls? The little virtual joysticks that effectively say: "Sorry - I forgot I was designing for the machine you now hold." I think they're awful, lazy, impractical and fiddly.

However, I really wish I were using one.

At the moment, players can do the following, all by pressing, tapping or swiping the screen.

1) Walk
2) Run
3) Jump
4) Pick up
5) Throw
6) Swing

None of these use on-screen controls, nor the accelerometer*.

Balancing all these things involves careful tweaking of interaction radii, the minimum valid distance for a swipe and the maximum period you can keep your finger on the screen before it decides you're pressing rather than tapping

If you make jumping more responsive then you find stuff you're carrying around sticking to you like pathetic industry execs on a booth-babe. Make jumping less responsive and the merest flick of a finger causes stuff to fly off without your say-so. Watching my wife play the game last night was an exercise in frustration. She fundamentally doesn't understand the difference between 'tap' and 'press', nor how 'make the player jump on a press' simply wouldn't work (because that would mean you couldn't move without jumping first).

That's the thing with casual games - there's a lot of training involved because your audience has not had 10+years of tropes and rules to fall back on when faced with a new control system. It's irritating as hell. At some point I'll just draw a line in the sand and say: "Yup... I know. You don't know how to swipe the screen. Quite how you've managed with your iPhone so far, I don't know, but I think you and I part company here.' I'm thinking of giving away 'Act 1' of incoboto and then selling subsequent chapters, so that people who just can't deal with it don't feel too annoyed.

Despite the eventual training issues, it is working - and relatively well. There are no on-screen controls apart from 'Pause'. When you use the machines on the planets, there'll be no mini-game, GUI or other distraction. You'll be manipulating real, physical objects that spin, slide, rotate and otherwise give you tactile feedback.

It's taking a while, but there's the potential for this to be quite awesome.

Now, where's that bloody rock gone.. ow!

*I tried the accelerometer for a bit and then realised that using one on the iPad is no fun at all - and Incoboto is destined for the iPad at some point. Tilting the iPad makes me feel like I'm drunk while in charge of a vehicle, albeit with less lethality, lifelong guilt and prison sentences.


  1. Hrmm...

    While as a player I can see it being frustrating to not be able to move after picking up a rock that I couldn't move, I also wouldn't be that put out if how I moved changed in some way - and as a designer, doing a state change on player action is a great way to add depth. Mind you, this change doesn't have to be logical. So my temptation would be to play with other possibilities other than 'realistic' and 'nothing'.

    In terms of binary behaviour, I really don't agree with that. What's important is for the player to know why something is different, not that a given action always results in the same behavior. Different massed objects can behave differently in the world, as long as the player can make some guess as to how massive an object is before they do anything with it.

    Lastly, if your (small) player base is expecting jumping from a press it might be worth questioning your walk/run. Do these actions allow for gameplay possiblities that jumping does not?


  2. RE: Binary behaviour - my rule is 'if you're going to allow the player to do something, make it meaningful and make it as easy as possible.' In the example with the heavy rock, if I'm allowing them to pick it up, I can't see any good reason to do anything like slow the player down unless I'm really trying to say, "Don't pick up heavy rocks." In my design-view, there can be no middle ground. If it's fun, then it's fine. If it's not, then it's out.

    In a game where time is not a game-resource, being slowed down is just irritating. I could make it squash the player so that they can fit through narrow gaps as well, to take the sting out... but that's not making 'moving that rock more fun' - it's 'finding a way to make an annoying thing useful'. This is very Nethack (not necessarily bad). In this particular case, there's currently nothing to be gained by doing anything other than making movement easy and fun. I could add more inertia for effect, but that would be the whole extent of it: effect.

    Regarding the 'touch=jump' - from a sheer mechanical point of view, there's no way to make touch = jump unless I start adding on-screen icons. Touch='start of movement'. The end. If you were to jump every time you started moving, you'd be annoyed. The problem is that players want *every* action to be the one they want, when they want it. On the iPhone, a touch is like a movement + a click of the mouse. You really can't have something like 'jump' happen every time the mouse is invoked.

    All other options require segmentation of the screen in some way. Once you've done that, you really have to show the player where the segments are... and you end up with buttons. Buttons are a viable solution - just not one I want at this present moment.

  3. In a game where moving slowly doesn't present a complication to the player, mearly an anoyance, moving slowly is certainly stupid. If there is a gameplay reason why moving slowly is meaningful, then having an effect that causes this can be good as long as it's not over done.

    But I wasn't specifically suggesting 'slowing down', merely 'change in way one moves, dependent on the mass of the rock'. Maybe a more massive rock doesn't change your movement speed, but decreces how far you can jump, or how far you can throw. But really, who cares about realism? Maybe carrying massive rocks just increases your own momentum, making it harder to change direction and easier to push other large obstacles. Or they could let you fly. Whatever. Just becasue players expectation of a specific change makes for un-fun doesn't mean that the players expectation should be ignored. Just that it should be handled in a way that creates fun.

    In terms of movement, you said: 'If you were to jump every time you started moving, you'd be annoyed'. I'm not sure I buy it. Why does the player need to be able to run? What does running add that jumping can't do? For that matter, what does walking add that jumping can't do? You've already disliked forcing the player to move slowly because there's no game play reason for it. Surely giving them the choice but providing no reason is almost as bad.

    Precision perhaps? I would think that without run/walk as a differentiated mechanic, there would be more control space to make jumping more precise.

    Then again, you may have reasons to support running that I've not seen - including asthetic reasons. And I'd hate to push your asthetics to the side with my argumentiveness.