First-person character

Unity lesson #1: make a first-person game

You are about to create your first FPS game with Unity.

Preparation

  1. Download, install and open Unity.
  2. Unity Personal Edition is free, but it will ask you to create an account and verify your email by clicking on the special link in an email they send you.

Create your first playable game scene

  1. Create a new project by clicking File Menu / New Project (You can play with Angry Bots later!)
  2. Choose to import just Character Controller to save time, you can import more later from Assets Menu / Import.
  3. (Or choose everything to give yourself more to play with, but this blows the 10 minute thing!)
  4. In Hierarchy’s top left corner click Create and click Cube.
  5. Click Resize, the fourth tool in the top right or hit ‘R’.
  6. Resize the cube wide and flat ( scale 50,1,50 ) as a ground by dragging the colored boxes on its sides.
  7. Click its name in the top right Inspector. Name it “ground“.
  8. Drag a character controller from the Project view to the Scene view or Hierarchy.
  9. Position it above your ground cube.

Test It!

  1. Click PLAY button top center.
  2. Your game is now running! Walk around by pressing W A S and D and look around with the mouse.
  3. Click PLAY button again to stop.
  4. Remember: NEVER edit playing or you’ll lose changes, always stop first.
  5. Click File Menu / Save Scene to save your first level of your game and name it “level1”.

Decorate your scene!

  1. Make more cubes for the player to explore like walls, stairs, ramps and gaps for jumping across.
  2. Add point lights to make it look cool and more cubes to jump around on.
  3. Create a Material in Project / Create button, assign it a different color, and drag it onto some of your ground cubes to make them more distinctive.

It can’t be turtles all the way down

You’ve probably noticed that if you fall off the edge of your ground cube, you fall forever. You could make wider ground cubes and put more bigger cubes below to catch you, but players will always find a way to go where they shouldn’t.

Next, we’ll learn how to add a trigger script to stop yourself from falling infinitely off the edge.

Click to begin the next Tutorial: Triggers

 

Advertisements