Three FPS Demo
Three.js FPS game using ammo.js and three-pathfinding with ES6 and Webpack.
The project features an entity/component system, FPS controller using ammo.js rigidbody, NPC with root-motion animations and a basic AI.
Please note that the project is still under development.
Install
Before you begin, make sure you are comfortable with terminal commands and have Node and NPM installed. Then either install via a download or with Git.
Install via Download
First download the zip of the project and extract it. Then in terminal at that folder type npm install to set things up. To get going run: npm start.
Install with Git
In terminal clone the project into a directory of your choice then delete the git folder to start fresh.
cd three-fps
rm -rf .git
npm install
Running the development server
To see the changes you make to the project go to the project's folder in terminal and type...
This command will bundle the project code and start a development server at http://localhost:8080/. Visit this in your web browser.
Editing the code
The first file you should open is ./src/entry.js. In it you will find the main application class. This class is reponsible for initializing the libraries and loading art assets, it also handles the main game loop.
Building the project for the web
Running npm run build in terminal will bundle your project into the folder ./build/. You can upload this directory to a web server. For more complex results read this guide.
About the models
Art assets used in this project:
- Ak47 by kursat_sokmen is licensed under CC BY 4.0
- Metal Ammo Box by TheoClarke is licensed under CC BY 4.0
- Mutant by mixamo.com
- Veld Fire by Greg Zaal is licensed under CC0