Game Math Theory - SINE WAVES

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 243

  • @natea8126
    @natea8126 8 ปีที่แล้ว +501

    "thats just a theory, a game math theory" dam that got me laughing XD

  • @edd_3539
    @edd_3539 6 ปีที่แล้ว +133

    holy wow, years of school and I finally understood the sine function in a 4:20 min video.

    • @squeakybunny2776
      @squeakybunny2776 3 ปีที่แล้ว +1

      So you just didn't pay attention in school then?

    • @reymarckessaguirre5082
      @reymarckessaguirre5082 3 ปีที่แล้ว +12

      @@squeakybunny2776 schools are like drugs made to cure all diseases in one pill.

    • @Blablablateelbal
      @Blablablateelbal 3 ปีที่แล้ว +2

      Was it your " high"-school?
      Like brackeys said. I need to get out more...

    • @roseywolf7867
      @roseywolf7867 2 ปีที่แล้ว

      For real though

    • @jay-tbl
      @jay-tbl 2 ปีที่แล้ว

      @@squeakybunny2776 yeah I can't believe it when I see comments like this, did your teacher suck that badly?

  • @Tofukatze
    @Tofukatze 8 ปีที่แล้ว +104

    I instantly thought of Game Theorists as you said "Hey, thats just a theory" and i grinned as you really did this joke ^^

  • @felador5959
    @felador5959 8 ปีที่แล้ว +71

    I would love a video about how you manipulated that plane mesh to create a wave.

    • @TheBcoolGuy
      @TheBcoolGuy 8 ปีที่แล้ว +1

      Have a look at the standard water assets in Unity! :)

    • @userlink-12
      @userlink-12 5 ปีที่แล้ว

      That's just a simple shader I assume

    • @magnusm4
      @magnusm4 4 ปีที่แล้ว

      th-cam.com/video/3MoHJtBnn2U/w-d-xo.html
      I did this video last year, it was neat to do it all through code :3

    • @seanlynch4354
      @seanlynch4354 2 ปีที่แล้ว +2

      Probably used perlin noise

    • @CommissarChaotic
      @CommissarChaotic ปีที่แล้ว

      I'm thinking of that procedural mesh generation thingy he made a video for but plug a sine wave in the y instead of just noise

  • @cschott
    @cschott 8 ปีที่แล้ว +81

    Nice ^^ i would love to see one of these about Quaternions :D

    • @HAWXLEADER
      @HAWXLEADER 7 ปีที่แล้ว +5

      Even Brackeys doesn't really understand Quaternions!
      Hell, even the ppl who invented them don't understand them and just made the functions Quaternion.Euler and the inverse function!

    • @Swyse
      @Swyse 6 ปีที่แล้ว +4

      Like... the people who invented them were like... 'It works.. but why?.. NO! DON'T TOUCH IT, LEAVE IT AS IT IS!!'

    • @HYBRIDER-YT
      @HYBRIDER-YT 6 ปีที่แล้ว +1

      Swyse Official We are just inferior beings that will never truly understand Euler's advanced concepts.

    • @fawazaljohani8447
      @fawazaljohani8447 5 ปีที่แล้ว +1

      Brackeys left the chat

    • @PeterAuto1
      @PeterAuto1 5 ปีที่แล้ว +1

      @@HAWXLEADER The Inventor of the quaternions was so happy about his discovery that he carved it into a bridge. (Broom Bridge)

  • @thatKurtis
    @thatKurtis 8 ปีที่แล้ว +113

    PLEASE! BY GOD EXPLAIN QUATERNIONS! even my Math teacher doesen't know anything about them

    • @weplaydthis
      @weplaydthis 8 ปีที่แล้ว +11

      Quaternions are difficult because they're part real numbers and part imaginary numbers (in the form w + xi + yj + zk, where w, x, y, z are real numbers and i,j,k are imaginary numbers). Interestingly, sine is related to the value of the imaginary numbers because the power functions of i,j or k will evaluate (using i as an example) to 1, i, -1, -i ... just like the rotation through the unit circle in this video. The difficult thing with explaining/understanding Quaternions is that they are fundamentally abstract and you can't really point to something and say "See, that's a quaternion in action" (but you can kinda point at everything and say it... such is abstraction). How they work (or how they can be understood to work in practice) depends entirely on what you're using them for.

    • @oraviram
      @oraviram 8 ปีที่แล้ว +4

      Everything he says here is related to math, and not necessarily game development. You can find many tutorials about Quaternions if you don't wanna wait. They won't tell you how to use it in game development (or 3D art, in this case), but they will tell you about how Quaternions work, and then you can assume how to use them in whatever you want to know them for (there might be some tutorials that talk about them specifically for 3D stuff, I didn't check, but there are MANY that talk about them as a math topic).

    • @thatKurtis
      @thatKurtis 8 ปีที่แล้ว +1

      Brackeys makes it easy to understand so I would like him to cover the topic in relation to the transform component or something like that. But I appreciate the comments. Also in a video about making a minecraft clone in unity within a week I saw how he used something that looked like it used a sin wave: Could somebody explain to me how you would use sin waves in world generation?

    • @oraviram
      @oraviram 8 ปีที่แล้ว

      Blue Shadow Because when using Perlin Noise, it asks for a value between 0 and 10, where 10 is white and 0 is black (those are values which will be used later to generate the height, white is the most bumped and 0 the lowest). I am not actually sure why a sine wave, though, since it goes between -1 to 1. The best way is to perlin noise is using Lerp, not sine, so I am not sure... I am probably wrong and you saw sine in a different context. Can you send me the video where you saw it? I am probably wrong, but I don't want the things I wrote to go to waste, so I will keep them...I just want to give you a correct answer.

    • @thatKurtis
      @thatKurtis 8 ปีที่แล้ว

      on second thought it may not have been sin at all

  • @Ahzed11
    @Ahzed11 8 ปีที่แล้ว +46

    It would be super interesting to have a video about Quaternions. Keep the great work going :)

    • @noki1065
      @noki1065 7 ปีที่แล้ว +1

      yes, quaternions!

  • @IndieMarkus
    @IndieMarkus 8 ปีที่แล้ว +13

    I was pretty skeptical about a 4 minute sine function video. However you did a great job explaining the basics and still got straight to the practical usage! Good job ;-)

  • @Ssuperdemi
    @Ssuperdemi 8 ปีที่แล้ว +58

    lol I'm 12 so now I get to be ahead of my maths class by a couple of months

    • @joaocosta7981
      @joaocosta7981 8 ปีที่แล้ว +28

      nope. by a couple years. been there still there

    • @Groggpuffar
      @Groggpuffar 8 ปีที่แล้ว

      NoobStudios, why so negative?

    • @joaocosta7981
      @joaocosta7981 8 ปีที่แล้ว +19

      I'm not being negative. Did you even read my comment?

    • @Groggpuffar
      @Groggpuffar 8 ปีที่แล้ว

      NoobStudios Atleast he's being positive over something and you come with your negative attitude towards his comment.

    • @joaocosta7981
      @joaocosta7981 8 ปีที่แล้ว +23

      Why do realise i was not being negative? I was saying he was ahead of his class by years instead of months...

  • @Anthony-cn8ll
    @Anthony-cn8ll 7 ปีที่แล้ว +6

    A really good use for sine and cosine waves is with an orbiting camera around an object, even if it's moving. In your game loop, take the rotation transform on one axis of the camera and store it as radians in a variable. For example, if your object moves on the X-Z plane, store the rotation about the Y axis. Then find both the sine and cosine of the angle and store those in a variable. The new position of the camera can now be defined by adding these vectors: (Orbital Radius * Sine of the Angle, Y Position of Camera, Orbital Radius * Cosine of the Angle) + (X Position of Object, 0, Z Position of Object).
    You can find the orbital radius by figuring out the initial distance between the camera and the object. You can make the camera orbit by changing the Y axis rotation over time, either automatically or in response to some input.

  • @eyewarsx
    @eyewarsx 7 ปีที่แล้ว +5

    But hey, that's just a theory. A GAME MATH THEORY. Thanks for watching.

    • @rafeeali1203
      @rafeeali1203 7 ปีที่แล้ว

      Beutiful=D sir I really appreciate you hahahha

  • @chiz9954
    @chiz9954 3 ปีที่แล้ว +1

    Yeah! so i can turn my homework to my teacher with unity project hahaha

  • @slashshorts
    @slashshorts 2 ปีที่แล้ว +1

    matpat in the corner thinking about making math theory

  • @MrBrown78
    @MrBrown78 8 ปีที่แล้ว +5

    Damn this is funny and intellectual

  • @shamshersingh5054
    @shamshersingh5054 5 ปีที่แล้ว +1

    I liked the way u pronounce Arun Mehta

  • @samiyas100
    @samiyas100 8 ปีที่แล้ว +6

    this series is awsome keep it up

  • @Mirsab
    @Mirsab 5 ปีที่แล้ว +2

    How can I possibly thank you enough, I just so wanna hug you right now!!!

  • @nope-xh8tb
    @nope-xh8tb 8 ปีที่แล้ว +5

    Nice game theory refrence

  • @donrorlach7337
    @donrorlach7337 5 ปีที่แล้ว

    For applying this to actual (3D) movement see answers.unity.com/questions/781748/using-mathfsin-to-move-an-object.html

  • @alexspeleers
    @alexspeleers 4 ปีที่แล้ว

    finaly I've understood HOW sin/cos func works. It's n*(X) where n = for(n=-3.14/n=0; n

  • @Mr.Adhesive
    @Mr.Adhesive 8 ปีที่แล้ว +1

    you just tought people half a semester of calculus in less than 5 minutes...

  • @pianochannel100
    @pianochannel100 3 ปีที่แล้ว +1

    I have viewed these as shapes which I can use to permute other shapes for a long time now.

  • @youssefgaaloul
    @youssefgaaloul 2 ปีที่แล้ว

    Me after seeing Geogebra: "Yeaaah Baby! Thats exactly what I've been waiting for.

  • @ferna182
    @ferna182 5 ปีที่แล้ว +2

    "that's just a theory!" that alone made me sub

  • @Shdw-zu9ee
    @Shdw-zu9ee 8 ปีที่แล้ว

    I registered on the brakeys forum but when I want to create thread it says i eed to confirm my account :( but I got no confirmation email only 1 at the start but it was empty my name is Sh4d0w and I have the same profile pic

  • @littlecurrybread
    @littlecurrybread 4 ปีที่แล้ว +1

    dude you're so gosh darn good at teaching, it's insane! TY TY TY

  • @spideyninja
    @spideyninja 8 ปีที่แล้ว +1

    Awesome video!
    Nothing new that I didn't know but still a very nice, informative and quality made video.

  • @roseywolf7867
    @roseywolf7867 2 ปีที่แล้ว

    It's just a theory A GAME MATH THEORY
    The Theorists: HECK YEAH!

  • @alphaanar2651
    @alphaanar2651 3 ปีที่แล้ว +1

    Cosine waves... :)

  • @mio-xh1ln
    @mio-xh1ln ปีที่แล้ว

    you're godsent, I finally understood it!! 😭🖤

  • @mortezakarimzadeh4862
    @mortezakarimzadeh4862 5 ปีที่แล้ว +1

    this part 2:04 saved my life now i compeletley know what is it

  • @JuanMolina-tl2xc
    @JuanMolina-tl2xc 3 ปีที่แล้ว

    Amazed that his most useful videos have less likes than other not so important vids

  • @abdopower5913
    @abdopower5913 6 ปีที่แล้ว

    plz you some channel for learning math of game developer

  • @xenic3391
    @xenic3391 ปีที่แล้ว

    Im in class and the game theory joke almost made me laugh out loud 😂😂

  • @subscribeordiediepls4437
    @subscribeordiediepls4437 4 ปีที่แล้ว

    Whats the name if the program used to draw the sine waves??

  • @gamerpotato6667
    @gamerpotato6667 3 ปีที่แล้ว

    good but too basic, 3:41 it's not enough to giving ideas. try discuss more

  • @zekiozdemir420
    @zekiozdemir420 3 ปีที่แล้ว

    Wow I learned something new Thanks

  • @keyyyla
    @keyyyla 3 ปีที่แล้ว

    π = 3.14. Every mathematician left the chat

  • @kristianthaler6525
    @kristianthaler6525 2 ปีที่แล้ว

    I want to use this to make the wings on a butterfly flutter.

  • @marcoseliasmep
    @marcoseliasmep 6 ปีที่แล้ว

    This function is awesome, thanks a lot!

  • @Rommel89
    @Rommel89 ปีที่แล้ว

    epsero algun dia los subtitulos al español XD XD

  • @christopherodunlami3001
    @christopherodunlami3001 8 ปีที่แล้ว

    learning game development and pre-calculus

  • @littlenarwhal3914
    @littlenarwhal3914 6 ปีที่แล้ว +2

    how do you do a sine function in unity though

    • @firnekburg4990
      @firnekburg4990 6 ปีที่แล้ว +1

      private Vector3 _startPosition;
      void Start ()
      {
      _startPosition = transform.position;
      }
      void Update()
      {
      transform.position = _startPosition + new Vector3(Mathf.Sin(Time.time), 0.0f, 0.0f);
      }

  • @SilentLesch
    @SilentLesch 8 ปีที่แล้ว

    Thank you for the video.
    Next time please explain to us:
    - Quaternions;
    - Perlin noise;
    - Different sorting algorithms (I mean effective ones like QuickSort and HeapSort, not the Bubble);
    - Pathfinding algorithms (Dijkstra and other company of travelling sale agents).

  • @lazylazer6716
    @lazylazer6716 5 ปีที่แล้ว

    Ha ha ha please keep doing this game math theory ha ha ha

  • @bkln
    @bkln 8 ปีที่แล้ว +1

    Ha! I loved the bonus fact about the beep sound! Well done!

  • @lamwlgabriel
    @lamwlgabriel 8 ปีที่แล้ว

    Important question. I was developing a microsoft visual studio in C# language. I had to make the obstacles fly in a sine wave function. Where the y coordinate was a sine function of time. Because the product is a long float. eg 3.1556778, the positions only work with integers. Else the motion would look buggy. Do you have a solution

  • @TravelWithDhami
    @TravelWithDhami 8 ปีที่แล้ว

    I have one word for you my friend "AWSOME" if you could make something on quaternions , physics simulation of vehicles like wheel colliders that would be of great help thanks any was great video

  • @strawberries6669
    @strawberries6669 5 ปีที่แล้ว

    I watch the TH-cam channel game therest

  • @floppy9053
    @floppy9053 6 ปีที่แล้ว

    Hey! Loved the video! I have a question. How Would I make waves one a 2D water thing, and A wave like splash at the point of impact when a rigid body hits it? Thanks, Some Guy You Don't Know That's subbed too you.

  • @suraiya21
    @suraiya21 2 หลายเดือนก่อน

    u saved my life. Thank you.

  • @belgianwizard6114
    @belgianwizard6114 8 ปีที่แล้ว +2

    You are amazing, really :o

  • @Codedin97
    @Codedin97 6 ปีที่แล้ว

    ok during Highschool I had trouble understanding Sin curves (Cos and Tan Ones aswell) your video just made it Click thanks so much.

  • @in5pector688
    @in5pector688 7 ปีที่แล้ว

    Funny, I learnt it in my Russian school when I was 13, but Brakeys explained sin more interesting than in my school.

  • @bradzepfan
    @bradzepfan 4 ปีที่แล้ว

    this video deserves SO MANY MORE VIEWS than it has current has! This is the most simple, elegant and easy to understand explanation of this concept I have seen ALL OVER TH-cam. And trust me I have looked at hundreds. The game title must be throwing it off on searchs. But millions of people in high school and college and needing to learn this concept. Maybe the video producer can post an alternative title to this video to help in searches.

  • @ruanncarlos3769
    @ruanncarlos3769 6 ปีที่แล้ว

    how did they create the function "sin (angle)" ?? I know I only need to use "Math.sin (f)", but I want to know how they created this function.

  • @matthewspence7476
    @matthewspence7476 5 ปีที่แล้ว

    Also, except for tan and cosine, the coefficient of sine in a wave function will always produce some sort of exact outline, in x^2 you get plus or minus x^2 as the outline but in x^2+3x-4 the wave function pretty much follows the line, it’s super cool...

  • @torsten9983
    @torsten9983 6 ปีที่แล้ว

    Very Good Video beside Game Development

  • @zach8901
    @zach8901 8 ปีที่แล้ว

    Off topic question:
    Can you try to recreate the iOS game Impossible Road, in unity?

  • @BluePhantomGames
    @BluePhantomGames 3 ปีที่แล้ว

    I had to watch it 10 times to understand

  • @xannypaints
    @xannypaints 6 ปีที่แล้ว +1

    Quick Maffs
    Ok I'm sorry

  • @AZZAMNO1
    @AZZAMNO1 8 ปีที่แล้ว

    So many possibilities from just sin(t)!!! You could make repeating animation and stuff.

  • @hamzanasir1590
    @hamzanasir1590 4 ปีที่แล้ว

    Best Explanation Sir 👍👍👍

  • @duramirez
    @duramirez 4 ปีที่แล้ว

    Feeling enlightened thank you Master hehehe

  • @boredduck231
    @boredduck231 3 ปีที่แล้ว

    smol brackeys: "that just a theory, a game math theory"
    big brackeys: Leaves us 😭😭

  • @developmental3273
    @developmental3273 7 ปีที่แล้ว

    You actually explained it way better than my physics teacher did back in the day. (For those that wonder: yes, I really ment physics teacher)

  • @NyleLevi
    @NyleLevi 6 ปีที่แล้ว

    Thanks for the video! If we want to have our object float up and down but from a starting point of say 3 on the y axis, how could we do this please? Sine always throws the object back to 0 as a starting point

  • @No0pe
    @No0pe 6 ปีที่แล้ว

    That's a just a theory.
    *_A GAME MATH THEORY_*

  • @Hassan_MM.
    @Hassan_MM. 5 ปีที่แล้ว

    What is a Cosine Wave? Please Explain

  • @LordCPUU
    @LordCPUU 7 ปีที่แล้ว

    Hey would you please mind to tell me what software you are using to create those animations?`
    Very much appreciated!

  • @LettuceBunnies
    @LettuceBunnies 6 ปีที่แล้ว

    1st year of high school all over again.

  • @TheYiffingAtheist
    @TheYiffingAtheist 8 ปีที่แล้ว

    I took Trig and never understood where they got the x's and y's of the sin cos and tan functions. Now after one video I finally get it.

  • @SinanAkkoyun
    @SinanAkkoyun 8 ปีที่แล้ว

    OMG WHAT IS THAT FOR GREAT QUALITY?!?!?! You deserve 1.000.000 subs or more!

  • @OFaruk58
    @OFaruk58 8 ปีที่แล้ว

    Nice vid
    But the forum verificatiob doesn't work!!!

  • @cynthiadmello4132
    @cynthiadmello4132 8 ปีที่แล้ว

    can u please create a tutorial on... Like when the player in the game is inactive for a certain period... The next next process is highlighted(for example the finish point is highlighted) so that the player knows where he has to go..

  • @tingleoncrack2167
    @tingleoncrack2167 6 ปีที่แล้ว

    How would you use the sin wave to move an enemy? Would it work in a way that each foot would move based on the wave? So right foot would move at 1 and left at -1?

  • @MrFrostCA
    @MrFrostCA 6 ปีที่แล้ว

    It is possible to create a Sinus rhythm (Heart beat) with sine waves in Unity?

  • @Lizard_geek
    @Lizard_geek 4 ปีที่แล้ว

    reminds me of the brachistochrone

  • @johngrey5806
    @johngrey5806 7 ปีที่แล้ว

    1:22 "THE UNIT CIRCLE!! I need to get out more..."

  • @seifmustafa2004
    @seifmustafa2004 7 ปีที่แล้ว

    is there anyway to use sine waves to make certain level. patterns like sky force (a space shooter game)?

  • @caidenbond1988
    @caidenbond1988 4 ปีที่แล้ว

    Can sine functions oscillate between desired outputs or it is fixed between -1 and 1?

  • @parvezlimon4739
    @parvezlimon4739 7 ปีที่แล้ว

    bro please tell me , how I can be good game developer? i mean how i should do my task?

  • @عمادالتوي
    @عمادالتوي 8 ปีที่แล้ว

    جميل.
    لكن ملاحظة. مراجعة دائرة الوحدة والاطوال الموجية مهم جدا لتوسيع الامر.

  • @ergeorgiev
    @ergeorgiev 8 ปีที่แล้ว

    Awesome, thanks! I never knew how time manipulation was done in video games.

  • @farhaadfarhaad497
    @farhaadfarhaad497 5 ปีที่แล้ว

    You speak too fast . Why? please know that not all of your followers are native .

    • @Chubzdoomer
      @Chubzdoomer 5 ปีที่แล้ว

      Turn on subtitles.

  • @MegaAnakinn
    @MegaAnakinn 8 ปีที่แล้ว +1

    3:33 LOL!! Quaternion pelease!!!

  • @0000Samir
    @0000Samir 5 ปีที่แล้ว

    what software are you using? looks amazing for learning

  • @loganunknown722
    @loganunknown722 8 ปีที่แล้ว

    Brackeys, what's your MBTI?

  • @MrSlug1992
    @MrSlug1992 8 ปีที่แล้ว

    Wow this was awesome. I wish you were my calculus teacher in varsity. Things would've been a lot more interesting. Keep up the great work.

  • @thedoctor5036
    @thedoctor5036 3 ปีที่แล้ว

    BRO !! u are so perfect when u come to explain math !!

  • @khevan5277
    @khevan5277 4 ปีที่แล้ว

    Can you PLEASE continue this series? It is so well explained and I'm sure it will immensely help any aspiring gamedev

  • @hylianfreak
    @hylianfreak 8 ปีที่แล้ว

    I finally understand Sine. Thanks for all the awesome, and informative, videos~

  • @amolvijayachandran
    @amolvijayachandran 4 ปีที่แล้ว

    hmmmm the length of the vid is 4:20

  • @PinikRahman
    @PinikRahman 8 ปีที่แล้ว

    What software did you use to simulate the rotation on unit circle?

    • @PinikRahman
      @PinikRahman 8 ปีที่แล้ว

      Thanks mate..Ill look into it..

  • @elcomecucas2.034
    @elcomecucas2.034 4 ปีที่แล้ว

    Entendí gracias a los dibujitos, el inglés no se entiende ni una caca xD

  • @emberdrops3892
    @emberdrops3892 5 ปีที่แล้ว +1

    GeoGebra ftw XD

  • @satyamjha68
    @satyamjha68 5 ปีที่แล้ว

    Can you make a tutorial on making a player get through loop de loop
    Please

  • @Meithighs
    @Meithighs 5 ปีที่แล้ว

    Great video, Way better than game theory as it has real application and isn't complete hypothetical bullshit

  • @yusuf_kizilkaya
    @yusuf_kizilkaya 4 ปีที่แล้ว

    video starts at 2:38 for all engineering students who share the same fate as me :(

  • @TheCallumFerguson
    @TheCallumFerguson 8 ปีที่แล้ว +1

    Quaternions please