Unity lesson #1: make a first-person game
You are about to create your first FPS game with Unity.
- Download, install and open Unity.
- 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
- Create a new project by clicking File Menu / New Project (You can play with Angry Bots later!)
- Choose to import just Character Controller to save time, you can import more later from Assets Menu / Import.
- (Or choose everything to give yourself more to play with, but this blows the 10 minute thing!)
- In Hierarchy’s top left corner click Create and click Cube.
- Click Resize, the fourth tool in the top right or hit ‘R’.
- Resize the cube wide and flat ( scale 50,1,50 ) as a ground by dragging the colored boxes on its sides.
- Click its name in the top right Inspector. Name it “ground“.
- Drag a character controller from the Project view to the Scene view or Hierarchy.
- Position it above your ground cube.
- Click PLAY button top center.
- Your game is now running! Walk around by pressing W A S and D and look around with the mouse.
- Click PLAY button again to stop.
- Remember: NEVER edit playing or you’ll lose changes, always stop first.
- Click File Menu / Save Scene to save your first level of your game and name it “level1”.
Decorate your scene!
- Make more cubes for the player to explore like walls, stairs, ramps and gaps for jumping across.
- Add point lights to make it look cool and more cubes to jump around on.
- 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.