If you want to know how to make an FPS video game, the honest answer is this: build a tiny, playable shooter first, then make it look good. Almost every first-person shooter, from a weekend jam project to a big studio title, grows from the same small core: a camera you can move and aim, a weapon that hits things, and something that fights back. This guide walks through that core in order, gives you working code, and shows where AI tools save you real time.
What is an FPS game, and what does making one involve?
An FPS, or first-person shooter, puts the camera at the player’s eyes. You aim with the mouse or a stick, move with the keyboard or the other stick, and the game revolves around ranged combat. (In tech chat, “FPS” also means frames per second, the frame rate. That matters for performance, but it is a separate topic.)
Making a game is a mix of disciplines: programming, design, art, audio and testing, which is how video game development is usually described. For a shooter specifically, the work breaks into a few systems:
- The first-person controller: mouse look, walking, jumping and collision with walls.
- Weapons: firing, a hit check, ammo, reloading and recoil.
- Enemies: simple AI that spots, chases and attacks the player.
- Feedback: muzzle flash, hit markers, sound, screen shake and damage effects. This is what makes shooting feel good.
- Levels: spaces with cover, sightlines and a route through them.
- Presentation: 3D models, materials, music, sound effects, menus and a trailer.
The first four make it a game. The last two make it a game people want to play. Build them in that order.
Which engine should you use for an FPS?
A game engine is the software framework that handles rendering, physics, input and audio so you do not write them from scratch. For first-person games the main options look like this:
| Option | Good for | Trade-offs |
|---|---|---|
| Unity (C#) | Huge library of FPS tutorials and starter templates | Editor to install and learn; C# required for anything custom |
| Unreal Engine (C++ / Blueprints) | High-end visuals, a first-person template, visual scripting | Heavy install, demanding hardware, steep learning curve |
| Godot (GDScript) | Free, open source, lightweight | Fewer ready-made FPS assets and tutorials than the big two |
| Browser (Three.js, WizardGenie) | No install for players, instant sharing, fast prototyping | Less suited to very large, graphically heavy worlds |
For a first project, choose the engine whose tutorials you can actually follow and whose export target matches where you want players to play. If you are going solo and want to be playing something today, a browser-based route is the shortest path. The rest of this guide uses that route, but the steps apply to any engine.

How to make an FPS video game, step by step
Here is the order that keeps a first-time project alive. Each step ends with something you can play.
- Write a one-paragraph scope. One level, one weapon, one enemy type, one goal (“reach the exit” or “survive three waves”). No multiplayer, no inventory, no story yet.
- Greybox the level. A greybox is a level built from plain blocks with no art. Lay out rooms, corridors, cover and a few long sightlines. You are testing space and pacing, not looks.
- Build the controller. Mouse look, WASD movement, gravity and wall collision. Tune speed and mouse sensitivity until moving feels comfortable, because players feel this every second.
- Add shooting. Most beginners should use hitscan: when you fire, cast an invisible ray from the centre of the screen and damage the first thing it hits. Real projectiles (rockets, arrows) come later.
- Add one enemy. A simple state machine is enough: idle, chase when it sees you, attack when close, die when health hits zero.
- Add feedback. Hit markers, a gunshot sound, a small camera kick, enemies flashing on hit. This step turns a tech demo into a game.
- Add the loop. Health, death, restart, a win condition. Now it is a complete game, however ugly.
- Replace the art. Swap blocks and capsules for models, textures and lighting.
- Add audio. Music, ambience and a full set of weapon and enemy sounds.
- Playtest and cut. Watch someone else play without helping them. Fix what confuses them, cut what bores them.
The same structure works if you want to make a horror video game: keep the controller and enemy steps, then slow the player, ration ammo, use darkness and let sound carry the tension.
The core code: a first-person controller in Three.js
This is a complete, minimal FPS in the browser: mouse look, WASD movement and hitscan shooting at five target cubes. It uses Three.js with its built-in PointerLockControls, which captures the mouse so it turns the camera. Load it as a module with an import map pointing three at the Three.js build.
import * as THREE from 'three';
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x202530);
const camera = new THREE.PerspectiveCamera(75, innerWidth / innerHeight, 0.1, 200);
camera.position.set(0, 1.6, 5); // roughly eye height
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(innerWidth, innerHeight);
document.body.appendChild(renderer.domElement);
scene.add(new THREE.HemisphereLight(0xffffff, 0x444444, 2));
const floor = new THREE.Mesh(
new THREE.PlaneGeometry(50, 50),
new THREE.MeshStandardMaterial({ color: 0x555555 })
);
floor.rotation.x = -Math.PI / 2;
scene.add(floor);
// Targets to shoot
const targets = [];
for (let i = 0; i < 5; i++) {
const box = new THREE.Mesh(
new THREE.BoxGeometry(1, 1, 1),
new THREE.MeshStandardMaterial({ color: 0xff5533 })
);
box.position.set((i - 2) * 3, 0.5, -8);
scene.add(box);
targets.push(box);
}
// Mouse look: first click locks the pointer, later clicks fire
const controls = new PointerLockControls(camera, document.body);
document.body.addEventListener('click', () => {
if (!controls.isLocked) controls.lock();
else shoot();
});
// Hitscan shooting from the centre of the screen
const raycaster = new THREE.Raycaster();
const centre = new THREE.Vector2(0, 0);
function shoot() {
raycaster.setFromCamera(centre, camera);
const hits = raycaster.intersectObjects(targets);
if (hits.length > 0) {
const target = hits[0].object;
scene.remove(target);
targets.splice(targets.indexOf(target), 1);
}
}
// WASD movement
const keys = {};
addEventListener('keydown', (e) => (keys[e.code] = true));
addEventListener('keyup', (e) => (keys[e.code] = false));
const clock = new THREE.Clock();
const speed = 5; // metres per second
renderer.setAnimationLoop(() => {
const dt = clock.getDelta();
if (controls.isLocked) {
if (keys.KeyW) controls.moveForward(speed * dt);
if (keys.KeyS) controls.moveForward(-speed * dt);
if (keys.KeyD) controls.moveRight(speed * dt);
if (keys.KeyA) controls.moveRight(-speed * dt);
}
renderer.render(scene, camera);
});
addEventListener('resize', () => {
camera.aspect = innerWidth / innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(innerWidth, innerHeight);
});
Notice two details. Movement is multiplied by dt (time since the last frame), so the player moves at the same speed whatever the frame rate. And shooting casts the ray from screen centre, exactly where a crosshair would sit. From here, the next pieces are a CSS crosshair, wall collision, enemy health and a sound on every shot.




