What you’ll be building:
Today you’ll learn how to build your very own first person shooting game. I will be providing all of the code and know how and then you can change, alternate, and edit all you want. And I would love to hear what you do with it!
What you will need installed:
Arduino – http://arduino.cc/en/main/software
Processing – https://www.processing.org/download/
What tools you will need:
So let’s build this!
Make sure your resistor is 1kΩ for your switch/push button.
Here is a diagram of the finished product:
Once you have your Arduino set up, clone this git repository:
Make sure to put all of the files in a folder called RedRocketShooter!
There are two things you need to change to get this working is on the setup method of RedRocketShooter.pde. First, in the second line of the setup method you will notice the line
String portName = “COM4”;
This is probably not the name of your port, so replace it with yours! If you don’t know the name of your port use the following code to figure it out:
This will list all available ports on your machine. Second, open the Arduino file, arduino_rocket.ino and in the top menu panel click on Tools –> Serial Port and select your serial port.
And that’s it! You now have a first person shooting game built from scratch! So play with it, mess with it, break it, and make it better! Please keep me posted on all improvements and alternations that you make. If you have any questions, suggestions, etc just leave a comment here or email me at email@example.com. I would love feedback on how easy (or not easy) this was to set up and what could be made clearer.