Learn Three.js while building a 3D game with physics

  Рет қаралды 53,535

Hunor Márton Borbély

Hunor Márton Borbély

Күн бұрын

Пікірлер: 97
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
How did you like this tutorial? Is there anything that should be explained better the next time?
@Radu
@Radu 3 жыл бұрын
I didn't quite understand what happens when an overhang with a mass of 5 hits some box with a mass of zero. In your video it behaves as expected, but shouldn't it just push the other box down with it according to physics? I think everything else is really well explained. Thank you!
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
@@Radu Oh great, it's good to hear that everything else was clear. That's very cool. Yeah, this is a case of implicit logic that is not obvious. It's rather an exception. In real life, it's not really possible to have zero mass, so when you set the mass to zero that's rather an indicator that you want your object to be static and not follow the law of physics. But I'm not really the expert, to be honest, I saw Cannon.js for the first time on Wednesday :)
@marmulak4852
@marmulak4852 3 жыл бұрын
it was very well done! i like your teaching style - really professional :)
@denizsulmaz6943
@denizsulmaz6943 3 жыл бұрын
Audio Visualazer with Logic
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
@@denizsulmaz6943 Check out Frank's Laboratory, he just recently published two videos in the topic: kzbin.info/www/bejne/jIm6p5mootWUpqs
@glenns_AI
@glenns_AI 2 жыл бұрын
Great video - was messing around with physics in ammo, had trouble due to lack of documentation, began looking at bullet docs etc etc... This just nailed it in 10 minutes for me, perfect.
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
Thanks. Yeah, documentation is not that great, you have to go by examples
@julianbullmagic
@julianbullmagic 3 жыл бұрын
Thanks for making this, very clear and concise. The other tutorials I've seen so far seem to have been built for people who have some other experience with 3d game development, rather than beginners. This game is something I can understand and mess around with.
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Glad you enjoyed it! It's always a challenge to put together a video that is understandable for beginners, yet it's still engaging. That's one of the trickiest part of making a video like this :)
@moon_tm
@moon_tm 3 жыл бұрын
Wow! Definitely going to watch this tomorrow. Thank you very much!
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Let me know what you think after it! :)
@berkeleymorrison
@berkeleymorrison 2 жыл бұрын
this is literally the best tutorial I've "ever" watched xD
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
Wow, that sounds awesome, thank you :)
@doggo9757
@doggo9757 2 жыл бұрын
Thanks! This video really helped me a lot on making my very own Stack game. I really like the way you explained everything with such detail and the visualisations. However it would be even easier to understand if you typed in code while explaining it, instead of explaining pre written code. You earned a sub :)
@HunorMartonBorbely
@HunorMartonBorbely 11 ай бұрын
Thank you. After a long time, I'm planning to come back at it. The format has rather practical reasons, that I find it harder to type while talking, so I record it this way. I'm still adjusting with timing. I might need to slow down a bit
@konstabelpiksel182
@konstabelpiksel182 3 жыл бұрын
Awesome! I was looking for phaser + threejs combination the other day and stumbled upon enable3d (with ammojs). would definitely check out cannonjs per your example
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
To be honest, actually I’m not sure which library is better or worse. I just found Cannon.js the last week and I figured it’s easy enough for a game like this. But I didn’t try ammojs and I don’t know how does it compare. And I just checked phaser for the first time. That looks cool though :)
@alisajadahmadi978
@alisajadahmadi978 23 күн бұрын
Thank you for this video.
@fiuzzii
@fiuzzii 3 ай бұрын
Nice video! can you make a video to cover something more of three js? Like postprocessing or I don't know
@HunorMartonBorbely
@HunorMartonBorbely 3 ай бұрын
I’m planning a couple more. Still mainly about the basics, and also cover react-three-fiber as well and maybe blender or some simple modeling tool
@christianmoore7046
@christianmoore7046 3 жыл бұрын
Great Video! I have always had trouble with three.js, this video surely helped!
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
I'm glad you liked it. Stay tuned, more is coming :)
@kodlamavetasarım
@kodlamavetasarım 16 күн бұрын
Very good video thnx
@HooGeeN
@HooGeeN 3 жыл бұрын
Very nice video! Well structured and explained. Thanks :) Looking forward to watching more of your videos ;)
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Glad you liked it! I might take a bit of a break now, but check out my latest video, it's also on Three.js :)
@yamansharma9344
@yamansharma9344 3 жыл бұрын
@@HunorMartonBorbely Please Comeback and make more on three.js, we are loving these tutorials
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
@@yamansharma9344 Thank you! 🙏 The next one is going to be Three.js again, but you know I just published a video this week and now it's summer, so things might be a bit slow :)
@ongzz
@ongzz 3 жыл бұрын
omggg just what i was looking for!! love this video 👍
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Glad it was helpful! Check out this one as well: kzbin.info/www/bejne/gJnKc6qAo5aVh9k&ab_channel=HunorM%C3%A1rtonBorb%C3%A9ly
@ongzz
@ongzz 3 жыл бұрын
@@HunorMartonBorbely i will!! thanks man 💖
@RCOA24
@RCOA24 3 жыл бұрын
I'll try this later, thank you and keep up the good work!
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Let me know what you thought of it once you saw it :)
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
I just checked some of your videos where you play guitar. It's cool man!
@RCOA24
@RCOA24 3 жыл бұрын
Hi Hunor, thanks for checking my vids I appreciated it. I'll update you later thanks again for this tutorial, sorry for bad grammar hahaha
@RCOA24
@RCOA24 3 жыл бұрын
I'm already done with the tutorial, I'm happy that I learned new knowledge from you, Keep up the good work!!
@spongycode
@spongycode 3 жыл бұрын
loved it. feeling lucky I find this channel ❣️🙏
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
That's so nice to hear, thank you :)
@DigitalCraftstodio
@DigitalCraftstodio Ай бұрын
Hi, I'm trying to create a game with three.js and cannon But I have a bad problem When I try to create a gameGroup object and adding all the shapes to it and then change its position, the world position of shapes doesn't change and when I apply cannon to it, the position of cannon is the same as shapes old position, I tried everything but it's doesn't change, I tried updateMatrixWorld(); I tried world.position.Matrix4(); But its not working I can share the code with you if you want
@JeffAporta
@JeffAporta 2 жыл бұрын
Amé tu canal amigo, todo muy bien explicado, muchas gracias
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
Gracias :)
@return75
@return75 3 жыл бұрын
awesome. your explanation is really awesome. thanks so mush
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
I'm glad it was helpful! I might cover another game with physics soon!
@猫头-y7c
@猫头-y7c Жыл бұрын
对我之中初学者很有帮助,谢谢你
@HunorMartonBorbely
@HunorMartonBorbely 11 ай бұрын
不客气
@galaxy9689
@galaxy9689 3 жыл бұрын
Really nice video, but I was wondering. In animation function why do you do "boxHeight * (stack.length - 2) + 4" instead of just "stack.length + 2"
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Hi Tomi, (stack.length - 2) is multiplied by boxHeight. 4 isn't. So the two things are not the same :)
@isaacbaruccruzdasilva7701
@isaacbaruccruzdasilva7701 2 жыл бұрын
very good thank you! if I have a multiplayer server, the Cannon logic goes on the server and the three logic on the client, correct?
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
Both is client, but I'm not sure how would you make a multiplayer game out of it :)
@alitaa1154
@alitaa1154 2 жыл бұрын
love your tutorials, i have few notes though , please make the code bigger and make a padding to your video I am having hard time reading and understanding your code because of the video layout.
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
Thanks! Yes, the font size is always a compromise, because I need to put a meaningful chunk of code on the screen, but sometimes that gets longer. I tried to make it better though with later videos.
@MehmetKoseDev
@MehmetKoseDev Жыл бұрын
this is gold
@karamyounes826
@karamyounes826 2 жыл бұрын
can i use three.js as a game engine? i mean can i make a game for phone users, or it just for websites and thank you for these good videos
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
I know someone who made a JavaScript game and got featured with it in Apple's AppStore. Of course he used some framework to make it work natively on the phone, but I'm not sure how exactly did he make it. So I guess it might be possible to pull it off with Three.js, but honestly I never tried. I'm assuming thought that you can use similar patterns even if you switch to other game engine, so it's certainly good practice
@beep1070
@beep1070 Жыл бұрын
crazy late comment, but could you explain how you pulled up the cube. This is my first time ever using three.js
@HunorMartonBorbely
@HunorMartonBorbely 11 ай бұрын
Crazy late reply, but the video literarily starts with that :)
@seemovielove3597
@seemovielove3597 2 жыл бұрын
I would like to know if possible to use the Three.js to move objects in OBJ model file? Thanks
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
I'm not sure if I get the question, but you can use OBJ files in Three.js, yes: threejs.org/docs/#examples/en/loaders/OBJLoader
@taruvarmittal1484
@taruvarmittal1484 3 жыл бұрын
Do I have to include any library for this, to begin with? Is threejs library already included and we cant start right away by declaring its objects ?
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
You have to include three.js. If you use CodePen.io that’s fairly simple, just go to settings and under the JS tab search for three.js at the external libraries
@CS_everywhere
@CS_everywhere 4 ай бұрын
How can we install it in vs code?
@firstacc5442
@firstacc5442 3 жыл бұрын
Amazing You are amazing!!! Very good explanation
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Thank you very much! My second Three.js video is in work, stay tuned! :)
@firstacc5442
@firstacc5442 3 жыл бұрын
@@HunorMartonBorbely really waiting for that ...❤️❤️
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
@@firstacc5442 It's out already: kzbin.info/www/bejne/gJnKc6qAo5aVh9k You haven't subscribed? ;)
@MaybeCya
@MaybeCya 2 жыл бұрын
Hi, Im just wondering how can I change the box colour to my own image. eg: its stacking pizza box instead
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
I never tried, but I'm sure Three.js documentation can help you with that. I would dig into the material options.
@dynamitrex3975
@dynamitrex3975 3 жыл бұрын
Im stuck at the event handling, when i click the screen, i get this error: TypeError: Cannot read properties of undefined (reading 'threejs')
@HunorMartonBorbely
@HunorMartonBorbely 2 жыл бұрын
The one place where this could happen is in the cutBox method because there you try to update the ThreeJs model and you use the threejs object. My guess is that you don't return the correct object in the generateBox function. Check out the original code to see where you differ: codepen.io/HunorMarton/pen/MWjBRWp
@pietronavarro4595
@pietronavarro4595 3 жыл бұрын
why i can't see the game on the codepan.io?, the game screen just show the scores and the block never appear
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
I noticed that sometimes three.js just doesn’t loads. Refreshing usually helps
@codeit9502
@codeit9502 3 жыл бұрын
Bro, May you tell which screen recorder you use ?
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Just the one built in with MacOS
@codeit9502
@codeit9502 3 жыл бұрын
@@HunorMartonBorbely May you suggest a good screen recorder for window.
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Doesnt Windows have a built in recorder as well? Like Xbox Game Bar can be used for any apps you want to record
@jerryjohnthomas1760
@jerryjohnthomas1760 3 жыл бұрын
Hi thankyou for this awesome resource. You are rocking it. Would be great if u can provide some replicas of three js websites too man
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Cool idea, which websites did you think of?
@sepinaco
@sepinaco 3 жыл бұрын
Awesome video, thanks you so much (L)
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Thank you! Second Three.js video in works btw, but might still take a while till I patch it together :)
@unknown-bx8my
@unknown-bx8my 3 жыл бұрын
I hate libraries and engines i need to 3d game devellopment(i am ready to learn Math and physics) how?
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
You can try to learn WebGL, cause three.js also uses it under the hood. But it’s going to be much harder than this
@unknown-bx8my
@unknown-bx8my 3 жыл бұрын
Ok thank you❤☺. Do you know any nice course to learn it?
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Nope. It’s rather for people who want to build their own 3D engine from scratch. It’s not where I would start. If you code a real game for a console you would also use a library like Unreal engine or Unity, so you better start liking libraries ;)
@unknown-bx8my
@unknown-bx8my 3 жыл бұрын
@@HunorMartonBorbely ok thank you❤☺👍
@samadanvarov4264
@samadanvarov4264 3 жыл бұрын
Sheet Three.js documentation is always changed
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Well, I’m web development nothing lasts forever :)
@samadanvarov4264
@samadanvarov4264 3 жыл бұрын
@@HunorMartonBorbely yo bro you ever watch any tutorial from you tube. I watch all video and try. But unfortunately ..... I donʼt try your tutorial yet. I hope itʼs work.
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
@@samadanvarov4264 Well, it also has the source code for reference :)
@samadanvarov4264
@samadanvarov4264 3 жыл бұрын
@@HunorMartonBorbely Thanks man :)
@TheNitaer
@TheNitaer 3 жыл бұрын
Hi, can you please help me?
@HunorMartonBorbely
@HunorMartonBorbely 3 жыл бұрын
Sure, have you stuck somewhere while coding?
How to simulate ball movement within a maze in a JavaScript game
20:28
Hunor Márton Borbély
Рет қаралды 11 М.
Three.js Game Tutorial: Learn Three.js while building a traffic run game
58:08
Hunor Márton Borbély
Рет қаралды 75 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 59 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 21 МЛН
Civil Engineer Builds Nepse Discord & Whatsapp Bot
11:56
Aenish Shrestha
Рет қаралды 4
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
Three.js Optimization - Best Practices and Techniques
17:47
Valentin's coding book
Рет қаралды 36 М.
Nobody Cares About Your Coding Projects
11:02
Tariq10x
Рет қаралды 107 М.
Bedrock. Why?!
22:37
FundyLIVE
Рет қаралды 304 М.
Three.js personal portfolios are amazing...
13:05
Developer Filip
Рет қаралды 449 М.
Making the same game in threeJS and Unity
4:29
Code4Fun
Рет қаралды 72 М.
6 Months of Learning JavaScript Game Dev in 6 Minutes
6:35
Suboptimal Engineer
Рет қаралды 122 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 59 МЛН