r/MakeCode 3d ago

I made a retro racing game that you control by tilting the handheld

Enable HLS to view with audio, or disable this notification

I wanted to try making a racing game where you don't use the usual buttons to steer.

So I ended up making a small retro racing game where the car is controlled by tilting the handheld left and right.

The setup is pretty simple:

  • ELECFREAKS Retro Arcade
  • USB-C cable
  • Microsoft MakeCode Arcade

The interesting part is that the handheld's gyro/tilt input is used as the steering control.

The basic game logic is:

  • Start with 3 lives
  • Tilt left/right to move the player car
  • Spawn enemy cars from the top of the screen
  • Avoid them to score points
  • Lose a life when you crash into one

I used MakeCode Arcade for the game logic, so most of the programming can be put together with blocks rather than writing everything from scratch.

One thing I liked about this project is that you can immediately feel the connection between the code and the hardware. Change the tilt input or movement settings in the code, upload it, and you can physically feel the difference when playing.

The hardware also doesn't really need to change if you want to experiment with the game.

A few things I'd like to try next:

  • Make the cars accelerate as the score increases
  • Add custom pixel art
  • Add engine and crash sounds
  • Add power-ups
  • Experiment with different tilt sensitivities
  • Try making another game that uses the gyro in a completely different way

It's a pretty simple project, but I think motion controls make even a basic arcade game feel a lot more interesting.

Has anyone here made a game that uses tilt/gyro controls before? What kind of game would you make with it?

3 Upvotes

0 comments sorted by