Build your own first person shooting game!

Build your own first person shooting game!

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/

Git – http://git-scm.com/downloads

 

What tools you will need:

Arduino Module

Arduino Module

breadboard1-150x150

Solderless Breadboard

22-AWG hookup wire

22-AWG hookup wire

potentiometer

Potentiometer

Resistors

Resistors

Switch or push button

Switch or push button

 

 

 

 

 

 

 

 

 

 

So let’s build this!

 

Make sure your resistor is 1kΩ for your switch/push button.

Here is a diagram of the finished product:

redrocket_arduino_bb

 

 

 

 

 

 

 

 

Once you have your Arduino set up, clone this git repository:

RedRocket github repo

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:

println(Serial.list());

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 kmsullivan012@gmail.com. I would love feedback on how easy (or not easy) this was to set up and what could be made clearer.

 

Kat