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.
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.
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
.
In terminal clone the project into a directory of your choice then delete the git folder to start fresh.
git clone --depth=1 https://github.com/mohsenheydari/three-fps.git three-fps
cd three-fps
rm -rf .git
pnpm install
To see the changes you make to the project go to the project's folder in terminal and type...
pnpm run dev
This command will bundle the project code and start a development server at http://localhost:8080/. Visit this in your web browser.
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.
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.
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