Trigonometry | Gamedev Math

  Рет қаралды 23,023

Natsu Games

Natsu Games

2 жыл бұрын

Greatest hits of trigonometry! We learn how to apply trigonometry by exploring how to set up aiming in top-down shooters & by introducing bullet spread!
Kahn Academy Trig series: • Trigonometry
PROOF WE CAN USE SINE & COSINE TO SCALE SPEED APPROPRIATELY: drive.google.com/file/d/1XMv8...
THERE'S A NEW DEMODAY: itch.io/jam/agdg-demo-day-45/... this is the jam I've been submitting my game to, I didn't this time because I'm a little too busy (hence the math videos) but there are some real gems there--something for every taste--so check them out! Also check out Nodev Crab, who AMAZINGLY is reviewing every game submitted AGAIN: / @reviewcrab6841
I swear, this man gets a few extra hours each day compared to the rest of us.
my twitter: / dev_natsu
DEMO HERE! Sic Transit on itch: natsudev.itch.io/sic-transit
*** MUSIC USED ***
Mewmore - Clock Tower (Marvel vs. Capcom 2 Remix) • Mewmore // Clock Tower...
Mewmore - Gerudo Valley (The Legend of Zelda: Ocarina of Time Remix) • Mewmore // Gerudo Vall...
Mewmore - Layer Cake (Persona 5 Remix) • Mewmore // Layer Cake ...
Mewmore - Elegy of Emptiness (The Legend of Zelda: Majora's Mask Remix) • Mewmore // Elegy of Em...

Пікірлер: 74
@macha-leaf
@macha-leaf Жыл бұрын
SOH CAH TOA!
@NatsuDev
@NatsuDev Жыл бұрын
I first took HS trig over a decade ago and I STILL do it 🤣
@mirandaart3012
@mirandaart3012 Ай бұрын
all of a sudden high school math from years ago finally clicks in (loved watching this!)
@NatsuDev
@NatsuDev Ай бұрын
Thank you so much, I'm glad you enjoyed it!
@Leoleonpd
@Leoleonpd 2 жыл бұрын
The algorithm recommended this to me! Thanks for the helpful video! Your channel deserves so much growth. Good on you
@NatsuDev
@NatsuDev 2 жыл бұрын
Thank you for your kind words, I really appreciate it--I still feel like a complete amateur at making videos so hearing that means a lot! And I'm glad you liked the video!
@Leoleonpd
@Leoleonpd 2 жыл бұрын
@@NatsuDev yeah! I was shocked at how few views you had. The quality is really good.
@NatsuDev
@NatsuDev Жыл бұрын
Yeah, I have to start posting on reddit or something lol! After starting to make these I understand why companies have social media positions--it's just a lot of time.
@aldobernaltvbernal8745
@aldobernaltvbernal8745 Жыл бұрын
i genuinely do not understand how a video this good can have less than 100 views (84 at the time of writing) this is a great intro to trig, you deserve way more recognition
@NatsuDev
@NatsuDev Жыл бұрын
Thank you very much, I spend a lot of time deciding how I'm going to cover each topic, so your words mean a lot to me. And why less than 100 views? I guess I gotta start posting on reddit.
@Afreshio
@Afreshio 11 ай бұрын
i don't know, the guy talks to fast and the video and speech is not in sync. this is an intro, it shoud be way slower
@aldobernaltvbernal8745
@aldobernaltvbernal8745 11 ай бұрын
@@Afreshio don't forget you can always rewind if you get lost! these kinds of videos aren't usually a view-once kind of deal
@rohanvishayal8724
@rohanvishayal8724 Жыл бұрын
Underrated af, this is quality content.
@NatsuDev
@NatsuDev 11 ай бұрын
Thank you very much!
@SeanFrancisNBallais
@SeanFrancisNBallais 8 ай бұрын
Almost two minutes in, and I knew this would be fun to watch while learning.
@NatsuDev
@NatsuDev 8 ай бұрын
Perfect!
@user-pf9jv1fl2n
@user-pf9jv1fl2n Жыл бұрын
So underrated Please keep making videos its so fun to watch Maths and how its implemented in games :) plus your voice is so relaxing
@NatsuDev
@NatsuDev Жыл бұрын
Thank you very much! I've got a few more math videos in the pipeline--one about Quaternions that I've been putting off for TOO LONG!
@user-pf9jv1fl2n
@user-pf9jv1fl2n Жыл бұрын
@@NatsuDev Can't wait to see it :) the effort you put into your videos is extremely evident. Good job! And as I've said I can't wait :)
@LighthoofDryden
@LighthoofDryden Жыл бұрын
Ok look the math was fine but I need those macarons
@NatsuDev
@NatsuDev Жыл бұрын
Sorry, but I'm afraid they're long gone!
@dominic_sanchez
@dominic_sanchez 11 ай бұрын
This video is great. I think using motion canvas would help increase the quality but I think what you have is charming in its own way. I like how fast paced everything is and still digestible. Younger me would've appreciated this video a lot when learning about trig.
@NatsuDev
@NatsuDev 11 ай бұрын
Huh! Never heard of motion canvas before--next time I make a video like this I'll give it a try. Thanks!
@RenderingUser
@RenderingUser 11 ай бұрын
​@@NatsuDevmotion canvas is an epic tool made by another gamedev on KZfaq Really cool stuff
@Ra11y
@Ra11y Жыл бұрын
Subscribed! This video gave me the right kind of A level maths flashbacks
@NatsuDev
@NatsuDev Жыл бұрын
Perfect! I'm trying to hit the highlights of all the topics I cover and show how they can be used. I just want to inspire people who might not like math but are interested in gamedev to give math a second chance.
@billy6427
@billy6427 10 ай бұрын
Very much Needed
@xx_gotadam_xx9457
@xx_gotadam_xx9457 Жыл бұрын
This is genuinely so helpful tysm
@NatsuDev
@NatsuDev Жыл бұрын
Glad to hear it 😄
@juliuswaldmann8682
@juliuswaldmann8682 Жыл бұрын
I was also brought here by the algorithm. Normally I am not really the "comment writing person" but I have to say that this video was really well-made, and I had to complement you. I wish you the best of luck going forward. You've gained a new subscriber today :)
@NatsuDev
@NatsuDev Жыл бұрын
Thank you! I really did not this video to take off like it did, and I appreciate your kind wishes! I'll keep on putting out the good stuff for you!
@mr_dodex
@mr_dodex Жыл бұрын
Loved this great intro to trig.
@NatsuDev
@NatsuDev 11 ай бұрын
Thanks :D
@_Egg
@_Egg Жыл бұрын
wait what. i thought i was watching a huge youtuber until I heard at the end you were a small one. huh. great job
@NatsuDev
@NatsuDev Жыл бұрын
Haha, thanks! It was more true when this video first came out, I think back then I only had roughly fifty or so subs.
@_Egg
@_Egg Жыл бұрын
@@NatsuDev very nice. just keep up the quality and youll be golden. I know and respect the grind
@therealaleki
@therealaleki Жыл бұрын
Wow, this is a very good quality video
@NatsuDev
@NatsuDev Жыл бұрын
Pleased you think so! But Hyper Light Drifter is so stylish it might be making it seem better than it really is ;)
@brianwaltse281
@brianwaltse281 11 ай бұрын
I may be wrong, but I believe the arc length formula given is incorrect? Should be s=r*angle, or s=r* (angle/180) for degrees? π * 1 = π so I'll remove it for the unit circle, but as an example, let's try solving for an arc length for the half circle. That could be represented as 180°, 0.5, or π. π*π = 2π π*180 = 180π (or 2π if we convert) π*½ = ½π The correct answer is a length of π of course. Or, alternatively, 180. I may be misunderstanding though.
@NatsuDev
@NatsuDev 10 ай бұрын
Mea culpa! Yes, the formula for arclength in radians would be arclength(theta) = radius * theta & if you want it in degrees it would be arclength(degrees) = radius * pi * (degrees/180). I think I had a brain fart while writing out the formula while listening my VO.
@streamdx
@streamdx 11 ай бұрын
I think you can convert shoot direction vector to a unit vector(vector of length 1) then you don’t have to use sin and cos in order to achieve same bullet speed in all directions. Or may be i don’t get your idea… it is also might be computationally cheaper to normalize vector once instead of calling relatively expensive sin() and cos()
@NatsuDev
@NatsuDev 11 ай бұрын
That's true, you can! But since I cover Linear Algebra & Vectors later on in this series and this video in particular just focuses on trig I didn't want to use a topic I haven't yet covered. As to what's computationally cheaper idk. I'm largely self-taught when it comes to CS. As long as the framerate's high enough I don't really sweat the small stuff.
@streamdx
@streamdx 11 ай бұрын
@@NatsuDev i just got your video as recommended, didnt know vectors are not covered yet
@NatsuDev
@NatsuDev 11 ай бұрын
Oh, don't sweat it! I'm gllad you really engaged with the example problem. The earlier ones are more straightforward with more advanced mathematics.
@Preview43
@Preview43 24 күн бұрын
I tried. I really tried.... but my brain doesn't math. I remain mathless and trig-poor.
@NatsuDev
@NatsuDev 23 күн бұрын
Any better luck with the Kahn Academy Trig series I linked? I cover the greatest hits of Trig at breakneck pace whereas that series goes at an actually reasonable pace.
@theveryloosegoose
@theveryloosegoose 7 ай бұрын
Love the video, but one thing has me confused at about 7:20 in the video; what do you mean by using the signs(sines?) of x and y to find Theta? Every way I've thonked about it, I can't figure out how.
@NatsuDev
@NatsuDev 7 ай бұрын
Right, so, regular arctangent only ranges from -pi/2 to pi/2, i.e. just 180 degrees instead of the full 360. So if you want to figure out the actual angle you'd have to look at the signs of x & y (whether or not they're positive or negative). Or if you're using a programming language with a math library you should have access to an atan2 function that does all of that for you.
@theveryloosegoose
@theveryloosegoose 7 ай бұрын
@@NatsuDev Okay NOW i think I get what's happening; you use normal arctan to get the limited -π/2 -> π/2 angle, then find out which quadrant it's in with the x and y, and then just find the angle that shares that tan with the result of arctan. Right?
@NatsuDev
@NatsuDev 7 ай бұрын
@@theveryloosegoose you got it!
@macronomicus
@macronomicus 2 жыл бұрын
Those macaroons look great! And, wow you're extremely better at math than I am 😳if it weren't for widely available reference materials & tutorials like this, node-"coding", & code libraries, I think the math stuff would be way out for me, i've spent so little time learning maths except on an as needed or curiosity basis. The way I learn I'd have to dive deep for a long time to get math properly embedded, & mastered would take many years of course. Thats why Ive always been more the type that eyeballs things & tinkers until it feels right. 😜
@NatsuDev
@NatsuDev 2 жыл бұрын
Oh don't worry, I've spent years practicing & improving my math skills and I know a lotta people who absolutely smoke me. Thankfully for gamedev you can take little bites out of math as needed & there ARE great libraries that help--I'm a big fan node coding also! Whatever lets you get the hard stuff outta the way and lets you make a game! And I'm just as guilty as tinkering & eyeballing things as you are!
@macronomicus
@macronomicus 2 жыл бұрын
@@NatsuDev Hahaha! Thats great to know, thanks for the encouragement. I have dabbled in 3d for years slowly teaching myself as I get time/inspiration, the code area is wild & so unique, ive been dipping my toes into all the areas, only with learning as the goal since I dont often get the chance to use the skills just yet, except maybe in collateral & art for web projects sometimes. I hope to expand at some point though when inspiration strikes. I love seeing vid's like these because its always adding more bits to my mind map of it all. Thanks for posting & I wish you great luck with growing your channel and projects!💚
@NatsuDev
@NatsuDev 2 жыл бұрын
Thank you kindly! I'm glad I could help fill in the fuzzy parts of your mind map for you--great imagery by the way! It reminds me of how the monsters at the edges of old maps eventually got filled in with the actual geography there.
@macronomicus
@macronomicus 2 жыл бұрын
@@NatsuDev Yea, that is a cool effect for a game map, there's sort of a fog covering it until you explore an area some, I think that helps drive curiosity & keep people playing with a sense of adventure of what may be ahead. I can hardly wait until I have some time to tinker in UE again, its tons of fun creating! Thanks for the inspiration man, I hope your dev stuff is going great!
@TheBunzinator
@TheBunzinator 11 ай бұрын
Technical point, but I believe they are macarons, not macaroons. Macaroons are larger soft coconut cookies without filling.
@NatsuDev
@NatsuDev 10 ай бұрын
im bad at french :(
@YmanYoutube
@YmanYoutube 11 ай бұрын
Wouldn't it be easier to use Vector math for the single shot instead of Trig? Just get the direction vector (mouse pos - player pos) normalized and then multiply that vector by your speed value.
@NatsuDev
@NatsuDev 10 ай бұрын
That'd work & be easier for a single shot but since I also wanted to implement a shotgun-style spread as part of the hands-on demo, which requires trigonometry. Plus I cover vectors later on in the series, so I didn't want to use something I hadn't introduced yet.
@user-rt8jm3xv1d
@user-rt8jm3xv1d Жыл бұрын
Great video! Keep doing this. Just smashed the subscribe button)
@NatsuDev
@NatsuDev Жыл бұрын
Thank you very much! I'll keep on doing the best I can, just don't expect a video on differential geometry anytime soon ;)
@truelifek9221
@truelifek9221 11 ай бұрын
Me in high school: I will never need trig in the real world. Why do I need to know this? Me now: Oh.
@arsnakehert
@arsnakehert 8 ай бұрын
Would've been pretty funny if at the point where you're typing "circumference" you had typed "circumci..." and then corrected yourself :D
@NatsuDev
@NatsuDev 8 ай бұрын
DANG! Missed the opportunity!
@octavioaxel8514
@octavioaxel8514 Жыл бұрын
What languages are you using?
@NatsuDev
@NatsuDev Жыл бұрын
Honestly, it's mostly psuedocode but I am using the C/C++ pointer symbols. Again, I want this to be the well-meaning shove that gets you to do this stuff for yourself! So use whatever language and/or engine you feel most comfortable with!
@DrNabeel20
@DrNabeel20 Жыл бұрын
Great video! I enjoyed it a lot, but the background music is distracting and loud :(
@NatsuDev
@NatsuDev Жыл бұрын
Ah, sorry about that! I always have a tough time dialing it in properly. I'd be happy to give you a pdf of script that includes the equations & works if that'd help☺
@DrNabeel20
@DrNabeel20 Жыл бұрын
@@NatsuDev thanks for that, keep making these useful videos and that is all I want 🔥
@NatsuDev
@NatsuDev Жыл бұрын
Here you go! drive.google.com/file/d/1cSorJdsOIFE0mcWSGR9ADJsPWp-bihtd/view?usp=sharing Let me know if you have any problem accessing the file or any questions regarding the material covered!
@DrNabeel20
@DrNabeel20 Жыл бұрын
@@NatsuDev Thanks! 🌹🌹
@uthkarshm6390
@uthkarshm6390 Жыл бұрын
e understand tNice tutorialngs in better depth. I didn't even realize i was just scratcNice tutorialng the surface with tNice tutorials DAW. I'm using soft and soft one and I
@NatsuDev
@NatsuDev Жыл бұрын
Glad I could help out, bud! Thanks!
@XS-03_Apollo
@XS-03_Apollo Жыл бұрын
What is this comment💀
Shader Functions Galore | Gamedev Math
10:46
Natsu Games
Рет қаралды 1,8 М.
Vectors & Matrices | Gamedev Math
21:51
Natsu Games
Рет қаралды 5 М.
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 23 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 71 МЛН
Quaternions & 3D Rotations | Gamedev Math
32:34
Natsu Games
Рет қаралды 10 М.
Beautiful Trigonometry - Numberphile
12:07
Numberphile
Рет қаралды 807 М.
The Two Types of Mathematics
9:29
Aaron Welson
Рет қаралды 44 М.
The Folded Polynomial - N64 Optimization
14:26
Kaze Emanuar
Рет қаралды 228 М.
This one mistake is killing my game
14:02
AIA
Рет қаралды 184 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 687 М.
Boids | Gamedev Math
15:43
Natsu Games
Рет қаралды 965
The Math behind (most) 3D games - Perspective Projection
13:20
Brendan Galea
Рет қаралды 374 М.
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 23 МЛН