Simple way to add local multiplayer without adding a bunch of code?

Hi, I am trying to make a kart racer like Mario Kart and need to add local multiplayer, and I have a lot of code and don’t want to change a lot of it to add a second player. Is there a simple way to add a second player without rewriting a bunch of code? If you can help me do it with Xbox Controllers that would be great. Also, I am totally confused by the Input Manager, so if there is a way to avoid that, if possible. Thank You!

Properly written code that makes one thing (eg, one player) should extend easily to two or twenty players by simply wrapping the instantiate / create stuff in a loop.

Whatever you do, get your current code into source control before you inadvertently wreck it with experiments.

If you want to practice, make a cheese one-player move-the-ball around as fast as you can in 10 seconds game, then try and turn that into a two-player game and you’ll learn a lot of the process.

Like every feature, it will be done one step at a time.

Imphenzia: How Did I Learn To Make Games:

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

Step #2 is particularly critical when learning.

If you are unwilling or unable to do Step #2, just ask someone else to do the whole game for you.

Okay, so I found another tutorial, and the input System worked properly this time. Don’t know what I did differently, but if anyone wants to know what tutorial helped me here it is. And if you want to be a game developer, don’t let anyone tell you can’t do it, just try and try again until it succeeds.