I Tried Making an FPS Game in JavaScript

  Рет қаралды 122,301

SimonDev

SimonDev

Жыл бұрын

GLSL Course: simondev.teachable.com/p/glsl...
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.org/licenses/b....
"K-VRC | Love, Death + Robots" (skfb.ly/6XCCo) by ArbitraryCanary is licensed under Creative Commons Attribution (creativecommons.org/licenses/b....
"Buddha" (skfb.ly/QGxw) by hullo is licensed under Creative Commons Attribution (creativecommons.org/licenses/b....
"Human Skull" (skfb.ly/6RsWT) by Sergey Egelsky is licensed under Creative Commons Attribution (creativecommons.org/licenses/b....
"Heavy Assault Rifle" (skfb.ly/6RGPy) by pixelgrapher is licensed under Creative Commons Attribution (creativecommons.org/licenses/b....

Пікірлер: 261
@simondev758
@simondev758 Жыл бұрын
Everything in the video, the effects, even the graphs and animations, were all done with GLSL shaders. Learn how to do them yourself with my course: simondev.teachable.com/p/glsl-shaders-from-scratch Support me on Patreon: www.patreon.com/simondevyt
@crowbr
@crowbr Жыл бұрын
nice!
@c0nsumption
@c0nsumption Жыл бұрын
Would you be willing to make a course around this? I’m interested in the GLSL course as well but crafting all this FPS project with an in-depth tutorial is most def something in extremely interested in. Willing to pay and all. You’re literally the only person I’m finding whose documenting three.JS experiments this in depth 🥺
@simondev758
@simondev758 Жыл бұрын
@@c0nsumption Yep, really depends on interest. I'd be happy to make a multi-hour version available.
@c0nsumption
@c0nsumption Жыл бұрын
@@simondev758 👏🏽 awesome. If you end up going for it please make an announcement as I’m for sure signing up!!!
@katsurakotaro
@katsurakotaro Жыл бұрын
voice sounds like text to speech
@Retrofire-47
@Retrofire-47 Жыл бұрын
this guy makes me feel like the label "beginner" is far too generous for my current skill level
@socio637
@socio637 Жыл бұрын
yeah hes a wizard. dont be dejected though, you could be too
@somefin3322
@somefin3322 Жыл бұрын
Do be reminded that this is probably all in many days of work, we don't see his actual process of studying to get something working. We see the process of it WORKING, not fully being worked on.
@programmingjobesch7291
@programmingjobesch7291 Жыл бұрын
You have me fully convinced I can build a "quicky" game engine from scratch in javascript to rival unreal- and I just learned how arrays work...😂
@baguette2652
@baguette2652 Жыл бұрын
Ever since I discovered your channel, I became super motivated by your creations. Thank you for bringing such awesome content to us! 🔥
@Ecrios
@Ecrios 8 ай бұрын
This is one of the few of the most impressive game design videos I've ever seen! Please, carry on! You. Are. Amazing!
@SuperPicolin0
@SuperPicolin0 Жыл бұрын
I'm amazed once again, why are you making this look so easy, like others mentioned, I would definitely pay for a detailed course on all this with threejs. Do I have to separately learn game development and threejs because the info on making games with three is very limited?
@simondev758
@simondev758 Жыл бұрын
Possibly. Game development is it's own thing, and three.js is a nice little 3d graphics library, but if you have 3d experience, then learning three.js specifically isn't required.
@SuperPicolin0
@SuperPicolin0 Жыл бұрын
@@simondev758 I almost figured from the wiki pages you're looking up sometimes, I should leave threejs alone for a bit and focus on actual game dev concepts first, thank you for replying and the good content you're creating for us.
@Desopolis
@Desopolis Жыл бұрын
I’d say use a more solid, game focused engine for a bit to learn and understand the fundamentals. It’s like learning to be a racing driver… you can go out and get a focused team and pre-built car and focus on driving, or you can buy a kit car online and build it in your garage.. Threejs serves a super wide set of use cases, so i needs to be a flexible as possible, where a game engine knows a lot of the core requirements before you’ve even start. I’d push yourself beyond any cordless game ends, “gamemaker” type things, and try at least Unity. If you want a less intense engine there’s stuff like Godot (which has more code requirements) There are good web based game engines too, Pixi and phaser will make EXCELENT 2d games and have a strong legacy and community. For 3D there’s PlayCanvas which is a game engine built on three, it does a lot of the heavy lifting for you but I’m not sure how I feel about it yet.. Lastly there’s BabylonJS which wasn’t burdened by all the outdated shit three has so support and is honestly a pretty great rendering engine. They have an excellent Node system and a good community, although pretty isolated from the rest of the JS world… TLDR: get Unity, buy the stuff you can’t figure out, and go deeper on game #2, or 3 or 4 etc…
@werrutkyupnext
@werrutkyupnext Жыл бұрын
damn I wanna learn javascript this is like really really hard?
@cmcdonough2
@cmcdonough2 Жыл бұрын
Amazing content. Thanks for sharing your knowledge.
@PotatoGodzilla
@PotatoGodzilla Жыл бұрын
I love those three js videos keep it up dude you're awesome! :)
@kosa-tv
@kosa-tv Жыл бұрын
Great idea dude. Like always, not disappointing content.
@chonkydog6262
@chonkydog6262 Жыл бұрын
Wow! This is so cool! I would love to use this codebase as a beginning for a multiplayer FPS game. Running around and destroying people online would be so cool
@chamonmath7688
@chamonmath7688 Жыл бұрын
Simon dev always has great explanation while going through his process, and I always get a good laugh at some of his dialogue. Lol, stay awesome
@hamsteroncoffee
@hamsteroncoffee Жыл бұрын
Woowww, this looks amazing 😍! Wish I had those skills or at least half of them 😅 - you make complicated things look so easy
@nurazizalimustofa5087
@nurazizalimustofa5087 Жыл бұрын
Thank you man for sharing this stuff
@IxZOMBxI
@IxZOMBxI Жыл бұрын
You are very good at explaining things. keep it up thank u
@jchaloupka007
@jchaloupka007 Жыл бұрын
Damn, that’s amazing, love it!
@oaksBFL
@oaksBFL Жыл бұрын
This tutorial is amazing and you are really good at teaching !! great job sir !
@oaksBFL
@oaksBFL Жыл бұрын
hackers in my acc i did not comment this sorry bro
@ViciousViscount
@ViciousViscount Жыл бұрын
That's pretty much Quake III Arena. I LOVE it.
@giorgijankhoteli5803
@giorgijankhoteli5803 Жыл бұрын
damn that sky looks so amazing great job with that
@crowbr
@crowbr Жыл бұрын
Nice!! Amazing work, pls make a video about customize characters, like put armor or clothes in character.
@minayoussef5730
@minayoussef5730 Жыл бұрын
works, keep up the good work man
@LikezYou
@LikezYou Жыл бұрын
Love your videos, keep it up! :D
@covenantersoldier9165
@covenantersoldier9165 Жыл бұрын
Tip of the hat top you, truly. well done. you truly are a great online tutor.
@Skeffles
@Skeffles Жыл бұрын
Looks fantastic!
@TurtleFul
@TurtleFul Жыл бұрын
Love your videos! Keep up the good work. Your experements are always interesting to watch. I would love to see a video about the performance difference between a JS/web based game like this and an in engine one like in Gdot or Unity.
@simondev758
@simondev758 Жыл бұрын
That is an AWESOME idea!
@loun.exXe3
@loun.exXe3 Жыл бұрын
Awesome video! Thank you!
@paulo1940
@paulo1940 18 күн бұрын
I was quite hesitant on the artistic choice of placing random bleak large blocks on the map until you added those effects, dang those were cool!
@cabelogold6687
@cabelogold6687 Жыл бұрын
Very well explained!
@Mohta69
@Mohta69 Жыл бұрын
That's dope dude
@LuisCassih
@LuisCassih Жыл бұрын
Every time you do something it's like those Minecraft videos when they said "I did some mining off camera" and comes with an entirely new scene. Anyways, amazing video, I would like to see a more detail explanation on the skybox, looks really good.
@KamranWali
@KamranWali Жыл бұрын
This is super kool. Really like how you made the game and never knew using Javascript and Browser would give such detailed game. The movement looks good. The shader is spot on. Also the UI are on point. This looks like a really good game. keep it up! :)
@Fallen_Ninja
@Fallen_Ninja Жыл бұрын
Missed you bro
@unicornsteroids
@unicornsteroids Жыл бұрын
The shaders on this video makes your course my next purchase. Amazing video!
@TheAwesomeTrunk
@TheAwesomeTrunk Жыл бұрын
How cool! Good job.
@spaceymen
@spaceymen Жыл бұрын
Excellent stuff
@srsherman7
@srsherman7 10 ай бұрын
Im going to point out and draw focus to how he canadianly says deckulls for decals... only because im jealous of how casual he makes this whole thing feel.. for real though I love watching your dev progress it's next level
@kasali2739
@kasali2739 Жыл бұрын
impressiv! Those spiders brought me to fresh idea for next tutorial, how is about coding on skeletal meshes? (procedural animation, equipment using local matrices of bones for position etc.) This thing can be found for unity but there is nothing for threjs out there
@mulualemtekle6094
@mulualemtekle6094 Жыл бұрын
much respect as always, :)
@Di4Fourr
@Di4Fourr Жыл бұрын
hanks lot Sir.. You helping us..
@wesleytiago4121
@wesleytiago4121 Жыл бұрын
Worked smoothly, tysm
@billcolak5253
@billcolak5253 Жыл бұрын
absolutely unreal!
@ionutrosca6326
@ionutrosca6326 Жыл бұрын
TNice tutorials comnt from you is legendary. Uncomplicated like your video!!!
@ibrahimgaming3587
@ibrahimgaming3587 Жыл бұрын
Will stay tuned to your channal! Cheers!
@tutosrivegamerTRG
@tutosrivegamerTRG Жыл бұрын
thank you so much , it worked
@saberwulf6857
@saberwulf6857 Жыл бұрын
ITS WORK, its really helpful
@swoorp
@swoorp Жыл бұрын
Yay it's finally out!
@amestresys9175
@amestresys9175 Жыл бұрын
WHAAAT A SKILL ... incredible
@Okyo01
@Okyo01 Жыл бұрын
thank u helped me a lot
@maximumcockage6503
@maximumcockage6503 7 ай бұрын
Babylon just implemented Havok physics, and tests show it's got way better performance than ammo. Have you considered giving it a try? Might be fun for something like a Gary's Mod styled sandbox since Half Life 2 (the game Gary's Mod is modded from) uses Havok physics.
@mikaelprevitera9552
@mikaelprevitera9552 Жыл бұрын
this is going to be great!
@NaiyoGames
@NaiyoGames Жыл бұрын
Everything sucks event me. *proceeds to create a masterpiece.*
@mohsinrahman8391
@mohsinrahman8391 5 ай бұрын
Incredible
@yresze2885
@yresze2885 Жыл бұрын
So perfect
@d0c_dev
@d0c_dev Жыл бұрын
Wow you make this look easy even though it is not, got no idea how to write JS though
@bruniomhars
@bruniomhars Жыл бұрын
Man tNice tutorials is on of the best tutorial in general on youtube. Clear, simple, constant, good to listen. Thank you for sharing.
@rajsonu3156
@rajsonu3156 Жыл бұрын
Oh.. these are really good
@wirten69
@wirten69 Жыл бұрын
working fine thank you
@Cos3D
@Cos3D 9 ай бұрын
would this game only work in a browser or also natively on pc ?
@josh_can_annimate3108
@josh_can_annimate3108 Жыл бұрын
You deserve much more recognition. Great video
@ibingeyt6077
@ibingeyt6077 Жыл бұрын
I would title the video “I Tried Making an FPS Game in Java script”
@simondev758
@simondev758 Жыл бұрын
Done :)
@rizoscreativosofficial8
@rizoscreativosofficial8 Жыл бұрын
It's just awesome
@julianeprado9691
@julianeprado9691 Жыл бұрын
I hope you post a video with all the adobe cracks. As always, you are the best, the crack works great
@atharvkumar2564
@atharvkumar2564 Жыл бұрын
It's cool as hell
@godbibo
@godbibo Жыл бұрын
wow what a nice video !
@emreonal8221
@emreonal8221 Жыл бұрын
thx work
@cyrusguest4975
@cyrusguest4975 Жыл бұрын
the way you pronounced decal makes me want to cry
@simondev758
@simondev758 Жыл бұрын
Deckkkkkle
@rodrigofernandes6449
@rodrigofernandes6449 Жыл бұрын
Wow. Can you make a full tutorial on this?
@GregoryTheGr8ster
@GregoryTheGr8ster Жыл бұрын
Also, I really dig your tutorials. The only downside is that I learn how far behind I am in algorithms and whatnot. That has been my problem in game development since I started.
@simondev758
@simondev758 Жыл бұрын
Game development takes a lonngggg time to because of the breadth of knowledge required. The nice thing is, it makes it fun to learn all of it.
@GregoryTheGr8ster
@GregoryTheGr8ster Жыл бұрын
@@simondev758 Oh yes, modern 3D games are so much more complex than when I first started in 1989. Those games are now known as "pixel art" games. How funny!
@GregoryTheGr8ster
@GregoryTheGr8ster Жыл бұрын
@@simondev758 Also, did you ever see Ultima Underworld? It was the first.
@danielfirminovillaverde7794
@danielfirminovillaverde7794 Жыл бұрын
Works good, tnx
@drawmaster77
@drawmaster77 Жыл бұрын
incredible.
@g_a_b_b_o-gabbopower5134
@g_a_b_b_o-gabbopower5134 Жыл бұрын
willing to learn. Unless you already understand setups, then I gues sit's gonna be easier, but as a classically trained pianist I was blown
@robertocarlosfarfansanchez6111
@robertocarlosfarfansanchez6111 Жыл бұрын
where I’d record one track of the soft and than use a second Edison to record scrubbing through the soft to mimic a wave table.
@boot-strapper
@boot-strapper 7 ай бұрын
do you think I could make a low poly multiplayer game with js? I want to recreate an old game I used to love.
@baoleizhao4614
@baoleizhao4614 Жыл бұрын
amazing
@MegalithicEnt
@MegalithicEnt Жыл бұрын
NICE!
@dre4085
@dre4085 Жыл бұрын
Hey simon, nice work!! where can we find the repo?
@nikkossta
@nikkossta Жыл бұрын
"I'm not a violent guy" "I used Doom Ethernal as inspiration". Nice
@Variapolis
@Variapolis Жыл бұрын
More and more engines and frameworks for games seem to be slowly moving to CSS and HTML for UI. It's pretty neat IMO. Some examples include: CS:GO Source 2 Engine Unity's Upcoming UI Toolkit (UXML) S&Box Escape from Tarkov
@joaquindomenech7541
@joaquindomenech7541 Жыл бұрын
Truly? On desktop apps?
@rottenapple9588
@rottenapple9588 Жыл бұрын
That’s only two engines
@zxc3387
@zxc3387 Жыл бұрын
It's so cool, dude! Looking forward to the source code for educational purposes.
@eftifeev
@eftifeev Жыл бұрын
very good
@MartinAlix
@MartinAlix Жыл бұрын
Great video as usual! Have you tried Rapier and React-three-fiber?
@simondev758
@simondev758 Жыл бұрын
Nope
@jasonl9266
@jasonl9266 21 күн бұрын
With javascript you can make an online multiplayer , since it's for the web ,I'm sure it would be like a native language for such workload . Cool tutorial though!
@guccidevel
@guccidevel 11 ай бұрын
bro my ass is still making black scenes with cubes 💀
@stadnikds
@stadnikds Ай бұрын
"The nice thing about JS is that I can do this all in HTML and CSS" - says noone and never :D
@FPdesignfab
@FPdesignfab Жыл бұрын
Awesome. Can you do this with a Rally Car Racing game? Where the player can actually control 4 wheel drive power slides around corners?
@boot-strapper
@boot-strapper 7 ай бұрын
Does anyone have the link to the repo?
@anthonymaacaron2313
@anthonymaacaron2313 Ай бұрын
You just earned a sub Could you make a tutorial or share the code??
@andrewallbright658
@andrewallbright658 Жыл бұрын
Finite state machines... The every man's crude game entity AI.
@Desopolis
@Desopolis Жыл бұрын
Can’t wait to see the code, your first person player controller has evolved into probably the best around so I actually gasped when you said you started from scratch instead of copy pasting your old world like in other videos…
@SchweinchenHorst
@SchweinchenHorst 3 ай бұрын
Wow!
@AwgustRushOfficial
@AwgustRushOfficial Жыл бұрын
You probably get this all the time but…… You did a great job for JavaScript mate well done 5⭐️
@martinemanuel8239
@martinemanuel8239 Жыл бұрын
It's f#$- awesome!!!
@FaislQurishi
@FaislQurishi 2 ай бұрын
I still await the "I make a third person shooter" lol, miss your videos Simon hope life isnt getting too busy
@davidmurphy563
@davidmurphy563 Жыл бұрын
Ok, that was really impressive. JS did a surprisingly good job. Maybe I shouldn't be so mean to it all the time.
@Retrofire-47
@Retrofire-47 Жыл бұрын
everyone knocks JavaScript for no reason... js can literally create Skyrim... if you had an overzealous game dev at the helm
@TopBagon
@TopBagon Жыл бұрын
@@Retrofire-47 so can assembly. it's just not a great choice
@Retrofire-47
@Retrofire-47 Жыл бұрын
@@TopBagon What would be your suggestion for "high-production web" game development? WebGL/WebGPU, Canvas, something else entirely? Or do you just dislike the entire JavaScript language for game dev?
@TopBagon
@TopBagon Жыл бұрын
@@Retrofire-47 nah I think JS (or TS in particular) can be great for 2D web game development but it's way better to create 3D games in unity/ue5
@anonymoussloth6687
@anonymoussloth6687 Жыл бұрын
Hi, how can we add wall banging functionality to this or in general any fps that uses raycasts for shooting? Also, when we shoot, i imagine raycasts are instantaneous calculations. Then how do you get the effect of the bullet firing and taking a fraction of a sec to hit? The motivation for both these questions is valorant when you can wall bang and when u shoot a gun, you can see the trail and it doesn't hit the instance you shoot (the player can sometimes move out of the way and dodge)
@yaboirairai
@yaboirairai Жыл бұрын
I’m a web dev not a game dev but I am guessing the way it works is that the client is always Raycasting a cone in the direction the camera is looking. Then when you fire the shot you already know what you’re looking at, so you can invoke different animations depending on what material or entity you are currently aiming at. Some clues that support this is the fact that there is hit detection just looking at an enemy, if I aim at an enemy they appear on radar. Also I vaguely recall in CS there were commands you could use to see these vision lines
@simondev758
@simondev758 Жыл бұрын
If I had to guess, I'd say that you spawn a bullet that travels forward at X velocity every frame, doing a limited raycast on that line segment.
@yaboirairai
@yaboirairai Жыл бұрын
@@simondev758 I think it’s a cone because of radar detection as well as flashbangs etc
@anonymoussloth6687
@anonymoussloth6687 Жыл бұрын
@@yaboirairai i just saw a video of tenz playing with noobs and it that the spectators had enabled vision lines which were constant raycasts out from the gun's nozzle. Can you explain why it is a cone? I saw your other comment regarding this but didn't quite understand it PS. The video i am referring to is "which pro can kill more noobs?..." If you watch this, u can clearly see the raycasts enabled constantly so u were right about that
@Nubbley
@Nubbley Жыл бұрын
im sooo thankful for blueprints lol.
@simondev758
@simondev758 Жыл бұрын
I dabbled in UE4 a bit. Blueprints are nice but man it takes forever to do anything with them.
@it_is_random
@it_is_random 8 күн бұрын
I ma now use react and tailwind for the ui
@realfl495
@realfl495 3 ай бұрын
Let's do a game in javascript >proceeds to write shader code
@rakshitshetty6958
@rakshitshetty6958 Жыл бұрын
Hi Simon, in this project are you using 'FirstPersonControls' or 'PerspectiveCamera' and then listening to keyboard and mouse inputs.
@simondev758
@simondev758 Жыл бұрын
It's using the first person controls I built in my tutorial.
@rakshitshetty6958
@rakshitshetty6958 Жыл бұрын
@@simondev758 okay, got it 😁
@KatsuoGinjiro
@KatsuoGinjiro Жыл бұрын
Can you use it to resetup s?
@WalmartVaxei
@WalmartVaxei Жыл бұрын
grandpa of gamedev
@simondev758
@simondev758 Жыл бұрын
Aw man, I'm not that old yet.
I Tried Making a 3D MMORPG Game in JavaScript
16:48
SimonDev
Рет қаралды 598 М.
How Games Have Worked for 30 Years to Do Less Work
23:40
SimonDev
Рет қаралды 1,2 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 2,8 МЛН
The World's Fastest Cleaners
00:35
MrBeast
Рет қаралды 133 МЛН
Эта Мама Испортила Гендер-Пати 😂
00:40
Глеб Рандалайнен
Рет қаралды 10 МЛН
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 766 М.
Programming a multiplayer game from scratch in 7 DAYS
18:28
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
How do Major Video Games Render Grass?
9:33
SimonDev
Рет қаралды 331 М.
How One Programmer Created Gaming's Most Complex Ecosystem
28:29
ThatGuyGlen
Рет қаралды 1,4 МЛН
I made an EVEN BETTER Minecraft
12:30
SimonDev
Рет қаралды 317 М.
How Quake Failed their way to Success
21:51
SimonDev
Рет қаралды 127 М.
Ray Marching, and making 3D Worlds with Math
6:28
SimonDev
Рет қаралды 230 М.
4 Months of Game Programming With My Own Engine
21:30
jdh
Рет қаралды 373 М.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
Вы поможете украсть ваш iPhone
0:56
Romancev768
Рет қаралды 522 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 427 М.
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 4,6 МЛН
Внутренности Rabbit R1 и AI Pin
1:00
Кик Обзор
Рет қаралды 2 МЛН