I Tried Making an FPS Game in JavaScript
ฝัง
- เผยแพร่เมื่อ 9 ก.พ. 2025
- GLSL Course: simondev.teach...
Support me on Patreon: / simondevyt
Follow me on:
Twitter: / iced_coffee_dev
Instagram: / beer_and_code
Here I tried making a 3D first person shooter, all in JavaScript and Three.js. I took some code from a couple of my other tutorials, like first person camera controls and ammo.js stuff, bolted on a few free things from places like Sketchfab, and added some shooter gameplay. The code could totally be used as a starting point for somebody else wanting to make a little browser FPS.
Basically, I tried to code up a first person shooter skeleton in a few days, using nothing more than JavaScript and the browser. All the elements, HUD, etc. are in there and in workable states. There's tonnes more you could do obviously, but I think this can help you understand how you might structure things and use something like Three.js to get started on these types of projects. Making a basic first person shooter, even in JavaScript, isn't too difficult.
Droid Thing from Quaternius: quaternius.com/
"Anubis Bust" (skfb.ly/6RwNp) by lucasthx88 is licensed under Creative Commons Attribution (creativecommons....
"K-VRC | Love, Death + Robots" (skfb.ly/6XCCo) by ArbitraryCanary is licensed under Creative Commons Attribution (creativecommons....
"Buddha" (skfb.ly/QGxw) by hullo is licensed under Creative Commons Attribution (creativecommons....
"Human Skull" (skfb.ly/6RsWT) by Sergey Egelsky is licensed under Creative Commons Attribution (creativecommons....
"Heavy Assault Rifle" (skfb.ly/6RGPy) by pixelgrapher is licensed under Creative Commons Attribution (creativecommons....