Car bumps


this is part of a technical writeup, for the initial concept, see Jam Entry

This is a relatively short blog post, showing a small effect added on a whim that I think turned out really well.

It's this wacky code:


On the main map, cars drive back and fourth. (they don't drive up & down to reduce the number of sprites needed) but to stop them looking like they were sliding on ice, I added a few bumps on the road. Especially given the RPG tileset that has dirt roads.

here's a more visual description on how the formula works:

Each time it hits a 'bump', the Y value is jiggled a small amount.

I like to call this kind of code 'juice' - it's small amounts of code that lead to relatively impactful results.

'juice' is from a great video called Juice it or lose it. And a similar video: The art of screenshake I highly recommend watching these for people doing game jams, as they particularly show how programmers can make their games much more appealing with minimal, but but highly focused, effort.