
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
A brief overview of the course and its contents.
Most web pages need to download additional resources, images or other assets. If working from your local machine then if the url begins with file:// then this means using the local file system and this is not allowed for security reasons. To work on the game we will develop in this course we need to use a Web Server so we can use http:// - in this lecture I show how easy this is done by using Web Server for Chrome, a Chrome extension that is freely available and makes setting up a local web server very easy. Web Server for Chrome is a Chrome App and Chrome Apps are being discontinued. Instead use Simple Web Server - https://simplewebserver.org/. Created by the same developer it works in the same way.
Create a New Server
Choose the folder
Click the blue link to open in your browser
A brief introduction to THREE.js Scenes, Renderers, Lights and Cameras.
To follow along please download the resources for this course.
Before you can start to develop the code for a 3d game you need assets. Loads of great assets are available at various sites online. In this lecture we look at some of these sites.
The Mixamo website provides great characters and animations that you can use in your game.
Blender is a FREE 3D application program to allow you to create and edit 3D resources. You can import and export using the fbx format that we are supporting in this course. In this short video you get the briefest of introductions to the software and advice about learning more.
3D has hundreds of different file formats in this lecture we look at 5 important ones.
More often than not you will need to make edits to your game assets before they are perfect for your game. In this video we give an overview of this.
Game assets can be quite large and it is important that your users can see how much is downloaded while they wait for the game to load. In this lecture we look at using a useful PreLoader class to handle displaying a download progress bar.
An overview of the THREE.js animation system
FBX files are a great way to export complex scenes and animation from a 3D application program like Blender. In this lecture we'll look at how you can then import them into your THREE.js game.
In this course we are using an on-screen joystick to control our character rather than use short-cut keys. In this way the same code base can be used on mobile devices and desktops. In this lecture we look at a simple JoyStick class that you can easily add to your own game, re-skinning the look by editing the CSS.
THREE.js has a sophisticated animation system that is easily used. This video shows how to use it to control the player character.
3D allows the developer to show their scenes from multiple different camera angles. In this video we look at allowing the user to view their scene from different angles.
How do we stop our character from walking through walls? In this video we look at using Raycasting to keep our character on the right side of the wall.
In this video we add a proper environment for the first time.
To stop your character walking through walls and also make a game that will work on mobile we look at creating a simplified environment just to use with the Raycaster.
As your character moves around the environment you may want her to do custom actions based on standing at a certain position in the scene. Maybe she can collect a useful object or press a button on a console. In this video we look at techniques to facilitate this.
Changing the camera angle for a cut scene helps the player focus on important things in the game. In this video we look at adding a cut scene.
Tweens are useful for changing parameters over time. In this video we look at using a simple Tween class to animate 3D properties.
SFX make a game come to life. Using the SFX class included in the resources for this course it is easy to add them to your game.
As your character moves around the environment it is useful to control sounds base on her proximity to sound sources. We look at the techniques in this video.
If you've followed the course from the start then you've learnt a lot. From the basics of a THREE.js scene to a template for a RPG game with complex scenery and a sophisticated central character.
There has never been a better time to hone your 3D skills by creating games that will run in browsers. Mobile devices are more and more capable of displaying sophisticated content. In this short video I outline two other courses I'm developing to help you.
Creating 3D games is fun. In this course you will learn quickly to create a stunning game. The author has won many awards for his 3D browser based games and he will take you through all the skills you need to create games of your own using the amazing THREE.js library.
THREE.js makes creating WebGL games much easier. You will not need to worry about how to write complex shaders. Instead the shaders will load from the assets you create in Blender.
You’ll learn
To setup your development environment .
How to export 3D assets from Blender, including animation.
Where to source great 3D assets that you can use in your own games.
The basics of setting up a THREE.js camera, scene and renderer.
Adding a pre-loader.
Using the FBXLoader class.
To master the art of blending animations.
Use a custom onscreen JoyStick class you can easily add to your own games so that desktop and mobile users get the same experience.
How to smoothly switch camera angles.
How to use simplified geometry to lock your character to the environment.
How to add cut-scenes.
How to add Sound to your games that responds to the current camera location.
It is exciting and fun and in around 2 hours you will have acquired the skills to create your own games.
Student reviews:
"This course is really awesome ! I enjoyed every second of this learning experience. Thanks to Nicholas Lever ( all the respects ) I can't wait for the next course using cannon.js !"
"This is the most exciting class I've taken on Udemy since joining 7 years ago! The instructor gives examples that he made personally, explains all of the coding thoroughly, and shows you vast libraries to source pre-made objects, characters, and worlds... what more could you ask for!?!"