Code-It-Yourself! 3D Graphics Engine Part #1 - Triangles & Projection

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • This video is part #1 of a new series where I construct a 3D graphics engine from scratch. I start at the beginning, setting up the project, then discuss vertices and triangles. Next a description of how 3D coordinates are converted into on-screen 2D coordinates using a projection matrix. This results in seeing a cube being rotated in 2-axis and translated.
    Source: github.com/OneLoneCoder/Javid...
    / javidx9
    / discord
    Blog: www.onelonecoder.com
    Twitter: @javidx9
    Twitch: javidx9
  • НаукаНаука

Комментарии • 2,1 тыс.

  • @kakkoiichris
    @kakkoiichris 6 лет назад +1059

    With Visual Studio 2017, the old project options window shows up when you choose the "Windows Desktop Wizard" option.

    • @Ageekything
      @Ageekything 5 лет назад

      Nope same thing except now it throws an exception? Can I send you a screen shot?

    • @keilanknight8513
      @keilanknight8513 4 года назад +8

      @@Ageekything use the wizard and unselect "precompiled header", also select "empty project" this way you just need to add an item (cpp source file) then you're good to go. Just come across this video now and ran into these same problems after upgrading visual studio! There's something dirty about needing to use a wizard! :)

    • @franklemanschik_de
      @franklemanschik_de 4 года назад +1

      @@keilanknight8513 you do not even need to use such wizard I for example simply copy project folder structures into so called template projects then I can copy that folder rename it to my new project name and boom it works :D I can open it in any IDE

    • @vlazm1853
      @vlazm1853 11 месяцев назад

      I have tried coding rotating square once. Took me way more time I want to accept...

  • @taba1950
    @taba1950 6 лет назад +1899

    -"don't click stop just yet"
    -I'm here for the math

    • @javidx9
      @javidx9  6 лет назад +245

      Lol thanks Almujtaba! Im pleased to hear some people are!

    • @fuzzycat3651
      @fuzzycat3651 6 лет назад +58

      If you aren't I would wonder if you really should be here!

    • @aradarbel4579
      @aradarbel4579 6 лет назад +5

      lol thats so true

    • @stanislavzoldak2198
      @stanislavzoldak2198 5 лет назад +6

      Came to the comment section to say this exactly.

    • @Luffi98
      @Luffi98 5 лет назад +6

      @@fuzzycat3651 I expected more literature but only found math, dissapointed :(

  • @iamthebubb
    @iamthebubb 4 года назад +1599

    I once made a square that moved around using c++, it took me a week

    • @richarddukard8989
      @richarddukard8989 4 года назад +486

      Next stop, red dead redemption 2

    • @blatrump
      @blatrump 4 года назад +74

      @@username6338 So easy, that it's still the primary source of bugs in this language.

    • @obinator9065
      @obinator9065 4 года назад +12

      Tompas Trupp yah even with RAII and smart pointers around.
      I’ve created custom allocators for my Game Engine that handle these problems for chunk loading etc.
      I still have leaks from time to time.
      There‘ll be a point in advanced Game Engines where ‚new‘ just isn‘t fast enough. The answer to that is Placement New, bug dangerous for sure.

    • @Odin_Borson
      @Odin_Borson 4 года назад +7

      I csn do that in C with old graphics.h

    • @alalala132whyisthishandletaken
      @alalala132whyisthishandletaken 4 года назад +16

      well if you don't know c++/c with classes too well that's not unimpressive given how shattered your view of arrays and data structures becomes when you move onto it from JavaScript.

  • @Okuhno
    @Okuhno 3 месяца назад +15

    I went through this series years ago, I ended up porting all the code in the series to lua, it legitimately broadend my horizons and general understanding of code and math, I just want to say thank you.

    • @javidx9
      @javidx9  3 месяца назад +5

      I'm pleased you found it useful. Thanks!

  • @MrBranh0913
    @MrBranh0913 3 года назад +346

    I’m a backend developer who has spent most of my career never dealing with anything related to games or graphics. But lately I’ve had a curiosity about the world of computer graphics. This is an awesome introduction. Not going to lie some of the matrix multiplication stuff requires a refresher for me, but this is super solid material.
    Despite coding for 20 years I feel like a total noob again learning programming for the first time.

    • @carloscepeda8663
      @carloscepeda8663 Год назад +25

      Same here, lol.
      In my case I'm really bored of programming /maintaining enterprise applications or making API's and nothing else.

    • @symbioticparasite6268
      @symbioticparasite6268 Год назад +11

      Your only doing a good job in I.T if you're feeling like a n00b....
      It's an infinite loop of knowledge my friend, from 0 to 1 and back again. Nobody knows all, that's why we specialise and collaborate!

    • @prtygrl5077
      @prtygrl5077 11 месяцев назад +2

      you don't need matrix calculations or transforms. he just makes it looks like difficult. Trust me it just takes 15 or less lines of code without any kind of special scenekits or anything. may be he's too d!mb to think. Our eyes only sees anything around us 360 degree any angle, rotated 2d and then rotated 3d. Same can be implemented with simple code.

    • @helloworld4872
      @helloworld4872 11 месяцев назад

      ​@@prtygrl5077I am a noob, we don't need to learn vector and matrix transform for game development ?

    • @deathbyslime6725
      @deathbyslime6725 8 месяцев назад

      ​@@prtygrl5077prove it

  • @amalirfan
    @amalirfan 3 года назад +735

    I was trying to replicate this in python for past couple of hours, it finally worked.. That was soo satisfying 😄😄

    • @vilasd.chawan1769
      @vilasd.chawan1769 3 года назад +22

      But how did you do that

    • @emmettdja
      @emmettdja 3 года назад +37

      Im trying to replicate it in p5 js and I've almost got all the code transferred. Time to think about it as i sleep til tomorrow morning.

    • @vilasd.chawan1769
      @vilasd.chawan1769 3 года назад +5

      @@emmettdja how do you do that ?

    • @emmettdja
      @emmettdja 3 года назад +33

      @@vilasd.chawan1769 mainly the matrix multiplication is what is doing this. You can recreate this kind of math on almost anything.

    • @vilasd.chawan1769
      @vilasd.chawan1769 3 года назад +9

      @@emmettdja ohh , but I didn't get that , as I am new to programming , and I have now only learned python 3 , and made only 3 super simple games

  • @TheTukkia
    @TheTukkia 5 лет назад +281

    those pespective equations are things that make so much sense, but you will never think of unless you break the whole problem down really well. Nice job man, you make my geometry classes actually worth something

    • @javidx9
      @javidx9  5 лет назад +74

      lol thanks Talento, its surprising how much high-school maths has a practical value in programming!

    • @bonbonpony
      @bonbonpony 5 лет назад +5

      Yup, it all boils down to simple geometry of similar triangles ;)

    • @yan-amar
      @yan-amar 5 лет назад +53

      @@javidx9 What's surprising to me is how high school made all those useful maths uninteresting by not telling us it was actually useful somewhere in the real world.

    • @maythesciencebewithyou
      @maythesciencebewithyou 5 лет назад +21

      @@yan-amar Be honest, you never cared to know back then.

    • @nich.1918
      @nich.1918 4 года назад +11

      @@maythesciencebewithyou that's literally what he's saying...

  • @BrisbaneStomp
    @BrisbaneStomp 3 года назад +1

    I've been thinking about this and other programmes you've made for a while but never thought anyone would be making these kind of programmes. So happy I stumbled across your channel, thanks a lot and keep up the good work mate

  • @Lennybird91
    @Lennybird91 4 года назад +149

    As a Junior software engineer whose coverage of graphics consisted of one course utilizing OpenGL in college, I'm very grateful for this series. Exploring the underlying theory devoid of simplifying libraries is exactly what I'm after. Thanks!

    • @user-ri2ms2mm7w
      @user-ri2ms2mm7w 2 года назад

      My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
      ruclips.net/video/7d16CpWp-ok/видео.html

  • @Grandalf3004
    @Grandalf3004 4 года назад +7

    Following along with this in java, and ive had no trouble keeping up so far. You're a great teacher. You're actually one of the only decent free teachers I've found. You're sitting down and telling me something in a language I've never even programmed in, and I understand it better than the guy using the same language as me and 15 more videos.

  • @tsraikage
    @tsraikage 2 года назад +7

    i lost track of how many times i've watched this video series. 3d engines are my favorite field to practice with. even though i'm never able to fully recreate code on all platforms, its still so satisfying to listen to somebody's explanation who for sure knows subject so good even dummy like me can understand

  • @rikittu
    @rikittu 3 года назад +2

    I've always been fascinated how 3d graphics work but couldn't find a good video showing how to make it from scratch. I love that I found this video. Thanks for making it.

  • @CSPlayerDamon
    @CSPlayerDamon 5 лет назад +7

    There is one thing I have to say.. AWESOME! Advanced material like this, presenting both the theory and implementation are quite hard to find. Thank you!

  • @OrangeDied
    @OrangeDied 2 года назад +4

    The thing I like about this tutorial is how Javid explains the actual math behind it in an easy to understand way, so you actually learn about how it works instead of blindly copying code. Great tutorial!

  • @thecakeredux
    @thecakeredux 3 года назад +149

    I coded a 3d engine from scratch this year, without external code examples. Huge headache, but I got it done. Can't wait to see the hundreds of things I did wrong.

    • @lookupverazhou8599
      @lookupverazhou8599 2 года назад +13

      That's one way to get good at something.

    • @tellahsage6477
      @tellahsage6477 Год назад +7

      Fucking cool man, wish i had the guts to do that. Most i've ever done was writing 2D platformers in pure C but never even wet my foot into 3D because bad at algebra and the like. I should pick up a math textbook and then try to do something like this after reading it, must be a rewarding experience once you actually see your code work.

    • @thecakeredux
      @thecakeredux Год назад +10

      @@tellahsage6477 It was amazing when it worked for the first time. I've tried it a couple times in the past and never got it working just right or only under very specific circumstances. Obviously this version bugged out dozens of times, but when it suddenly worked, I was really happy.
      The math isn't the difficult part about it, I'm pretty much a forklift driver, so I'm no math person by any stretch of the imagination.All you have to do is understand the individual steps, put them to code, abstract it away and you can forget about it forever. I couldn't explain to you vector maths or even do it on paper, but I can write code that does it, and I'm certain you can, too.

    • @prtygrl5077
      @prtygrl5077 11 месяцев назад +1

      yeah me too, I also made a 3d engine. This video su!ks though. he make it complex but it's not. Our eyes only sees anything around us 360 degree any angle, rotated 2d and then rotated 3d. Same can be implemented with simple code. just need cos tan and basic trigonometry.

    • @thecakeredux
      @thecakeredux 11 месяцев назад +2

      @@prtygrl5077 No, that would cause constant gimbal locks.

  • @dudubroder
    @dudubroder 4 года назад +2

    Thank you so much! Omg I was so desperate in regards to learning C++ before watching this. You saved me! I know quite a lot of C# but never touched outside big game engines and C++. Now I watch your videos and everytime I have a doubt I stop it, open a tab and find the explanation before continuing. It is working great and also you are the programming bob ross

  • @mojoofc9528
    @mojoofc9528 5 лет назад +1

    I recently started learning the language, and this is my first language, this one video felt like 5 minutes, and I’ve learned soooo much. Going to the part two after the breakfast, I love you man

  • @khrissxander
    @khrissxander 5 лет назад +14

    This is incredible. You continue to amaze me.

  • @BkSMedia
    @BkSMedia 2 года назад +4

    As a student in their 3rd year of a degree program, I'm so thankful that my poor knowledge of Calculus, but somewhat decent understanding of Object Oriented Programming is paying off. Lots of really familiar concepts that have clicked and made me go "ahhh so that's what the lecturer was getting at!". It helps that I also used to 3D model game assets as well. Love that you've really gone to the absolute basics which is what I needed!

  • @adibattie9619
    @adibattie9619 Год назад

    5 years later and this video is still top notch. I followed along a few years ago and got it working in C++. I revisited this today because I wanted to try and get it working using my own programming language, which already has C++/SDL bindings. I wanted to get some 3D action happening but with OpenGL I would need to spend at least a week writing GL bindings, but with this approach I can get some basic 3D stuff happening using only the SDL API I've already written. Amazing stuff, thank you Javid!

  • @joshlovesfood
    @joshlovesfood 3 года назад +4

    This video is actually incredible, I am impressed with your skills, and you are a very strong & serious computer scientist

  • @robertelder6155
    @robertelder6155 5 лет назад +8

    Really cool video. Thank you for taking the time to explain the concepts. The visual descriptions were nice and helped a lot. You also moved slowly and it was easier to keep up with your content and explanations. Keep up the good work!! Just started this series.

    • @javidx9
      @javidx9  5 лет назад

      Hi Robert, great to hear, thanks for your support!

  • @wyleong4326
    @wyleong4326 3 года назад +28

    1 minute in and I’m already loving this; graphics, maths, programming and art.

    • @PinkeySuavo
      @PinkeySuavo Год назад

      1 minute in and im out, too dumb for this. Only forwarded for end results.

  • @santichulito
    @santichulito 4 года назад

    Man i love you, your channel is everything i need and more, just starting to code but this is the stuff i'm most interest on, you have a lot of really good videos with very nice explanation to everything and i can't thank you enough for you work, love from Argentina!

  • @andrewbhamilton
    @andrewbhamilton 4 года назад +2

    I have studied 3d maths for games and written a simple software renderer before
    I can safely say, that is the best explanation of the protection matrix I have ever seen. Extremely useful.
    Thank you javid

  • @renatobritto4096
    @renatobritto4096 5 лет назад +20

    This is amazing. All that computational geometry being put to practice.

  • @hoax-games
    @hoax-games 5 лет назад +29

    For the people that wonder about the z-values in the projection matrix: for linear scaling, to get z in the range 0 to 1 you need to: z'=(z-znear)/(zfar-znear). However it is recommended to have higher precision for lower z values (objects that are near to the camera) than for higher z values (objects that are far away). Therefore z' is multiplied by zfar and divided by z (== the given projection matrix z-values in the video just written differently). This is an important note to fully understand the math behind the projection matrix. Thx javidx9 for this awesome video. I for the first time finally understand how a projection matrix is constructed. Thx to you!

    • @javidx9
      @javidx9  5 лет назад +4

      No problem Kreshnik!

  • @chikokishi7030
    @chikokishi7030 4 года назад +1

    I just found this series today. I instantly subscribed because ive been SO interested in this for years, and your videos seem very well made, thank you!

    • @user-ri2ms2mm7w
      @user-ri2ms2mm7w 2 года назад

      My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
      ruclips.net/video/7d16CpWp-ok/видео.html

  • @TrebleWing
    @TrebleWing 5 лет назад +2

    Great presentation. All this kinda code is way above my head (at the moment) but you are entertaining enough to keep watching and absorbing. Thanks for making these.

    • @blacksage81
      @blacksage81 5 лет назад

      If you really want to learn to code, pick a language, write the most basic of basic programs. "Hello World" I'd recommend C++ since its old and there should be tons of resources and sample code available.

  • @guacamolen
    @guacamolen 6 лет назад +12

    I was trying to find something on how to do this a couple of months ago. I'm glad I subscribed! Nice treat to see it.

    • @javidx9
      @javidx9  6 лет назад +4

      Good stuff! Thanks Michael

  • @vladisoc2866
    @vladisoc2866 4 года назад

    This is pure gold. Your explanation about projection is incredible simple to understand! Thanks for sharing the knowledge!

  • @dz-
    @dz- 2 года назад +2

    Javidx9, your tutorials are fantastic! Thank you so much for them, and also for the magnificently documented olcPixelGameEngine.

  • @jeffreyg6850
    @jeffreyg6850 5 лет назад +183

    When I die... I want to come back as a line of Javidx9's code...

    • @Ghost-gj1bx
      @Ghost-gj1bx 4 года назад +4

      @@MantasXVIII r/unexpectedmonkeyspaw

    • @Notsogaming0108
      @Notsogaming0108 3 года назад

      I mean you don’t come Back but i still like what you would like to be 😂

    • @HalloGaming
      @HalloGaming 3 года назад +5

      Alright you come back as:
      using namespace std;

    • @samljer
      @samljer 3 года назад

      system("pause");

  • @saeed6296
    @saeed6296 3 года назад +5

    I tried to do this projection in a lame way when I was in high school, this video brings back those memories 😭 you're awesome

  • @canitbeapplied2500
    @canitbeapplied2500 2 года назад

    Awesome tutorial ! The amount of depth you go into with everything makes it easy to translate to other languages.

  • @darklaker
    @darklaker Год назад +2

    This is something I made myself during a computer graphics subject some years ago on my computer science degree and It was hard to make it work without help or a simple explanation, I could handle solid objects drawing with polygon shading using the normals but I didn't go further to use textures or other advanced lightning like phong shading or raytracing.
    Even if there are much more advanced libraries and 3D engines It's important to understand where all that come from and make it work from scratch is much more satisfying. A tutorial like this would be a life saver for me those years, I haven't seen something like this before. Thanks for sharing!

  • @ChillBuilds
    @ChillBuilds 4 года назад +13

    I'm not sure how much preparation you put in to your videos, but I would guess it's quite a bit because your explanations are well organized and clear of cluttered language. I appreciate that. Well done.

    • @javidx9
      @javidx9  4 года назад +3

      Thanks Chill Builds!

    • @charlesdjones1
      @charlesdjones1 7 месяцев назад

      I agree. Now go watch a tutorial by King Gath if you want to see the exact opposite, it's impossible to follow along with anything he teaches with all the sidebar stuff.

  • @daviddawkins
    @daviddawkins 4 года назад +5

    Such a good explanation of the projection matrix. Thank you.

  • @christianmoss9196
    @christianmoss9196 3 года назад

    Just came across this and your channel, amazing stuff, as a modern day game dev even just watching the videos helps me understand what my abstracted game engine is doing under the hood

  • @fly7188
    @fly7188 Год назад

    thanks, your illustrations and explicit coding style really help illustrate the different components and concepts for this build. i learned much.

  • @dynamagon
    @dynamagon 2 года назад +2

    Thanks for the video! You are a very great teacher, and especially great since this video is free. I'm following along in C with a 2D graphics pixel plotting engine I wrote from scratch!

  • @josephmills1104
    @josephmills1104 5 лет назад +10

    This is just incredible, man. Wow, thanks for this!

    • @javidx9
      @javidx9  5 лет назад +3

      Thanks Joseph!

  • @SE45CX
    @SE45CX 5 лет назад

    What I like about your style is that you present this in a general DIY approach. Without the annoying snobbish attitude what you see so often.

  • @Pedozzi
    @Pedozzi 5 лет назад

    you are such a smart person. I studied industrial design, and i really appreciated this serie, even if i don't know how to code it is a great way to understand at least what 3d graphic (3D on 2D) engines do on a macro level. Thanks

  • @codecoderr7495
    @codecoderr7495 5 лет назад +4

    Now this is what I call old school math-rasterizer exercise. Brilliant because you have the talent to teach fluently. Same as I. Cheers fellow coder.

    • @javidx9
      @javidx9  5 лет назад

      Thanks Code Coderr!

  • @TheGoldenriff
    @TheGoldenriff 4 года назад +18

    This actually gold. I have a degree in computer science and am employed in the field, always wanted to know deeply about graphics. This puts all the math I have taken into a realistic perspective and im finding myself going OHHH, I can take integrals and use trig identities to play around with the actual physics. I want to generate running water and I now have a new respect for the heavy game programmers!! Such a sick course this is man. Appreciate your effort! Im also glad this was theory based and not coupled with a bunch of assumptions!

    • @wanderingpalace
      @wanderingpalace 2 года назад +1

      this is cool i cant even get into university because i yeeted my entrance exam with a bit of depression
      now im trying to catch up with stuffs like linear algebra to make my own programs but it is particularly overwhelming after all the wasted years
      support you and looking forward to see your game

    • @nevanncopeland8093
      @nevanncopeland8093 Год назад +1

      @@wanderingpalace how'd it go. I hope you got into school and doing well.

  • @Genciak
    @Genciak 4 года назад +2

    I really enjoy this video and will watch through the entire series. Thank you for great job!

  • @duality4y
    @duality4y 3 года назад +1

    I love these videos i never just copy the code I watch the video and try to undestand the concepts and then develop my own solutions which often happen to end up looking like the ones in the videos!

  • @johnjackson9767
    @johnjackson9767 6 лет назад +34

    It'll be interesting to see how far you can get with a software renderer using your framework. It's also great that you're showing the math and concepts behind this - it's surprising to me ( and sad, frankly ) that even in industry there are devs who simply don't know this stuff.

    • @javidx9
      @javidx9  6 лет назад +11

      Hi John, I agree - it's all very well copying code parrot fashion to get a job done, but when it goes wrong knowing how to fix it is where the real talent lies. There will of course be some topics I can't directly cover using a command prompt alone, and as my colour and texture resolutions are a bit low, some techniques we take for granted on GPUs will simply not be applicable.

  • @spicytuna08
    @spicytuna08 6 лет назад +18

    final result is awesome.

  • @erickalvarez6899
    @erickalvarez6899 5 лет назад +2

    You're awesome!! Thanks for these series. I'm learning a lot watching them!!

  • @viirtuose.official
    @viirtuose.official Месяц назад +1

    Your channel is one of the internet’s gems. Thank you for your dedication, clarity, and passion. Far too many coding channels provide zero value according to Shannon's information theory-utterly predictable content-which is never the case with your videos. I always feel inspired simply watching you explore the infinite possibilities of programming. Many thanks, and cheers from France!

    • @javidx9
      @javidx9  Месяц назад +1

      Hey that's very kind of you! Keeps me going too, many thanks!

  • @pendergastj
    @pendergastj 6 лет назад +7

    Just what ive been waiting to see! Awesome!

    • @javidx9
      @javidx9  6 лет назад +2

      Hi jamie i hope it lives up to expectation!

  • @AaronBowley
    @AaronBowley 5 лет назад +14

    Seriously , this is the kind of content I yearn for . True fundamentals

    • @javidx9
      @javidx9  5 лет назад +2

      Hey thanks Aaron!

  • @otacilioribeiro8944
    @otacilioribeiro8944 4 года назад +2

    this is awesome, you are a excellent at what you do and i love your way of explaining stuff;
    I spent some good time pondering about this video and i am amused. Thank you!
    By the way, i noticed that the comments of top and bottom triangles are switched, the bottom is actually the one initialized and drawn first

  • @XoIoRouge
    @XoIoRouge 10 месяцев назад

    I've been following other guides to make a rotating cube on screen using quads and a much simpler projection matrix - it only worked when no one actually looked at the math (a varied rotation to all thetas would be hard for a human to naturally track as "correct"); but when I wanted to give players control over the rotation, or interact with it more, it fell apart very fast.
    I'm going to restart my project from the ground up following THIS method, thank you so much for going more indepth into the math and the use of triangles instead of just points!

  • @manuellehmann267
    @manuellehmann267 6 лет назад +235

    Oh, my god. He just opened pandoras box :-D
    3D graphics is an interesting but sooooo complicated topic. Looking forward for upcoming episodes. :-)

    • @javidx9
      @javidx9  6 лет назад +26

      Thanks donnerbrenn! It certainly does open up lots of opportunities for interesting videos

    • @starinsky2873
      @starinsky2873 5 лет назад +15

      Next time when you play games you will think about furious developer.

    • @jax2059
      @jax2059 5 лет назад

      Tro Ivas k

    • @jax2059
      @jax2059 5 лет назад

      Tro Ivas ok

    • @bonbonpony
      @bonbonpony 5 лет назад

      Well, it's good to know what's in the box if you're gonna use it.

  • @joaquimspeck
    @joaquimspeck 5 лет назад +7

    This is awesome! Nicely presented!

    • @javidx9
      @javidx9  5 лет назад +1

      Thanks joaquimspeck!

  • @RoboMarchello
    @RoboMarchello Год назад +1

    This tutorial is so helpful with your math explanations, so easy to understand 3d with your videos compared to others. Thank you so much!

  • @ffabiang
    @ffabiang 2 года назад

    Thank you so much for this video, I have been learning more about how 3D engines work and this was just what I needed! Greetings from Peru!

  • @aradarbel4579
    @aradarbel4579 6 лет назад +4

    just found your channel, and saw this video! this is exactly what I was looking for! You have a new sub ;D

    • @javidx9
      @javidx9  6 лет назад +1

      Thanks buddy!

  • @Kazdro009
    @Kazdro009 5 лет назад +301

    11:49 Top 10 anime betrayals

    • @trevorthieme5157
      @trevorthieme5157 5 лет назад +7

      LOL I guess that would be true for programmers!

    • @TheBypasser
      @TheBypasser 5 лет назад +4

      Guess it should read "all I want is my program to become my own hell;", yet "using namespace std;" is shorter to type so they substituted it ;)

    • @TheBypasser
      @TheBypasser 5 лет назад +1

      Tro Ivas, Not clear enough - should it be read as "no need to use global-scope #using", or, instead, "no reason to ignore it and keep typing std:: everywhere instead"? If the second option it is, then - think of it - it is just four(4!) damn letters, if it feels too much the next logical step is moving on to non-commented code with single-character variable names ;)

    • @Este44fr
      @Este44fr 4 года назад +3

      @@TheBypasser std::experimental::filesystem::path myPath;
      This is why you use "using namespace"

    • @TheBypasser
      @TheBypasser 4 года назад +2

      ​@@Este44fr If used not on a single occasion, the secret spell:
      #define STD_EFS_PATH std::experimental::filesystem::path
      ;)

  • @rcherrycoke7322
    @rcherrycoke7322 2 года назад +1

    These series of videos are pure gold - thank you so much for the effort you put into them. Your presentation style is spot on - especially how you explain the maths.

  • @father_jordan
    @father_jordan Месяц назад

    THANK YOU for this. I've been getting into development for the Playdate handheld using their C API, and this just helped me write a basic 3D renderer. I'll continue on in the series but wanted to say thanks, this is still *very* relevant!

  • @Wjw129
    @Wjw129 5 лет назад +727

    Finally, a programming tutorial where you cant hear the tutor’s saliva.
    Very helpful though so far, thanks so much.

    • @kenji1856
      @kenji1856 4 года назад +17

      yes, I too am no longer educating myself because the person trying to teach me produce saliva in their mouth, and apparently I can hear it.

    • @kristypolymath1359
      @kristypolymath1359 4 года назад +5

      Maybe if the teachers weren't buried in your lap....

    • @anisnej10
      @anisnej10 4 года назад +7

      @@kenji1856 poor attempt at a verbose meme.

    • @onesubscriberbeforechallenge
      @onesubscriberbeforechallenge 4 года назад

      no homo

    • @shadybandit7
      @shadybandit7 4 года назад +2

      and the damn music

  • @rightwingsafetysquad9872
    @rightwingsafetysquad9872 3 года назад +23

    Episode 2: moving the camera.
    Episode 3: Duke Nukem.

  • @stevenray8737
    @stevenray8737 Месяц назад

    Just spent the day going over your tutorial, using C and SDL, and its brilliant. The projection part reminds me of the code I was writting for a Raycasting demo, a few years ago.

  • @thyandyr7369
    @thyandyr7369 5 лет назад +1

    Oh wow just what I always wanted to see! Exiting hope it's more than just one episode!

    • @javidx9
      @javidx9  5 лет назад

      Lucky you, there's 3 more and some more this year XD

  • @jamesw242
    @jamesw242 6 лет назад +590

    You could charge for these vids.. But i appreciate you not doing. I'm on long term sick and your videos help me do something useful with my time and to better myself

    • @javidx9
      @javidx9  6 лет назад +216

      Hi James, I really appreciate what you are saying, and it pleases me because youve captured the essence of my entire OneLoneCoder initiative in one personal example. Thank you!

    • @starinsky2873
      @starinsky2873 5 лет назад +1

      @@javidx9 Thanks programmer!
      Matrix is useful though.

    • @bonbonpony
      @bonbonpony 5 лет назад +17

      @@javidx9 Those who charge for their courses apparently forgot how they learnt their stuff in the first place (from freely available resources). If they had to pay for their knowledge, they would most likely not have it today. Spreading your knowledge for free means that one day someone else will give you their knowledge for free too. And that's how this world should work. Unfortunately, I see that it is heading in the very opposite direction more and more every day ;/ (because of money-induced greed).

    • @bonbonpony
      @bonbonpony 5 лет назад +10

      @Trys10Studios You see, you fell into the same trap most people do, putting the cart before the horse, that is, money before the thing it is paid for. In a logical world, you would do something because you enjoy doing it, and if someone finds it useful, they reward you with some goods in return to support you and make sure you will do more of it. When you do it the other way around, that is, you demand money or else you won't lift a finger, you're planning your own disaster. Because then, if people don't want to pay you, you blame them for being unfair or ungrateful, or blame yourself / your product for not being good enough, etc. Money takes out all the fun from life, because now you're starting to "work for money", and if you don't get money, you start to think that it is pointless to do something that you would otherwise do with pleasure out of pure boredom :q If people worked that way all the time (that is, do nothing unless someone pays them), no one would ever invent anything, created any piece of art, etc.
      And if you think about it somewhat deeper and on a broader scale, who do we work for, really? We work for each other, exchanging money in circles. So why do we really need that money? Couldn't we just work for each other directly, without this additional burden? Well, we could. And we did, back then in the past, when barter was the only means of economy (as it is in nature in general). Originally, money was just another commodity that could be exchanged for other goods or services, because it had inherent value. But then the tricky banksters come up with an idea of forging fake money (bank notes) of no inherent value whatsoever and exchange them for real value on the market, draining all the goods from it and turning people into their clueless slaves. Now we don't really work for each other that much anymore - we work for THEM now, because when you track where all the currency (which is no longer true money) comes from, you will always end up in some bank. They created a system in which you HAVE TO work for them in order to get money for your life, otherwise they don't let you just live happily and do whatever you want.

    • @pubx2719
      @pubx2719 5 лет назад

      @@javidx9 How to create a game like yourself

  • @EximiusDux
    @EximiusDux 6 лет назад +18

    Ah. thank you for the projection matrix and its explanation. I once made something similar to this, but i never wrapped my head around the Matrix system. meaning: i was staring myself blind at the concept of it.

    • @javidx9
      @javidx9  6 лет назад +5

      No problem TriCore, glad it helped!

  • @Windeycastle
    @Windeycastle Год назад +1

    Thank you very much for this series! I'll happily code along and see where I end up

  • @mr_noodler
    @mr_noodler Год назад +1

    This guy is so awesome because the more I practice programming, every time I watch this I understand more and realize how much he really knows what he’s talking about. Javidx9 is well educated and experienced

    • @Agent56000
      @Agent56000 4 месяца назад

      Any advice for a complete beginner

  • @ILGiullareDiCorte
    @ILGiullareDiCorte 6 лет назад +5

    Very thanks! I am a computer science student and i love all your projects but this, is awesome! Thanks for the time that you spend for share your knowledge!

    • @javidx9
      @javidx9  6 лет назад +2

      No problem! Thanks for your kind words and support!

  • @fckyo333ujhjjkrrrr
    @fckyo333ujhjjkrrrr 6 лет назад +4

    Thank you Javid, very cool

  • @Poeterish
    @Poeterish 3 года назад

    Pleeeeease never stop making videos on RUclips !
    Thank you so much for your effort !

  • @viperforty8450
    @viperforty8450 Год назад +1

    Thanks for the content my guy, watching your videos and getting ready to make a replica of an online childhood game in another game in lua, hope i will find strength to fully make it

  • @ankursharma4827
    @ankursharma4827 5 лет назад +8

    Did I ever tell you this, "You are just awesome, man!" :-)

  • @MuradBeybalaev
    @MuradBeybalaev 4 года назад +160

    21:51 "If I put some *imaginary numbers* next to this..."
    A mathematician gets excited.
    21:56 Basic *integers* are drawn.
    The mathematician gets disappointed.

    • @youssef2366
      @youssef2366 4 года назад +2

      Well in all fairness he didnt say lateral numbers

    • @violenceisfun991
      @violenceisfun991 3 года назад +4

      "Pi is exactly 3!"
      Sorry. I couldn't help myself

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f 3 года назад +5

      @@violenceisfun991 that’s the fundamental theorem of engineering

  • @arsnakehert
    @arsnakehert 2 года назад

    This is probably the best explanation of projection matrices I’ve seen on the internet

  • @vinniciusrosa8284
    @vinniciusrosa8284 4 года назад +14

    Things I have noticed here: 1) I have to study math 2) I have to watch this 500 times to understand the main idea. 3) I have to try it 20 times a day to get there. 4) Ok, it is hard, but this is amazing!

    • @DanielCoutoF
      @DanielCoutoF 3 года назад

      if u cant understand watching it three times, forget about it, your head isnt for programming, specially if u want to work in the field, your productivity will suffer a lot if you take too much time to grasp new concepts.

    • @vinniciusrosa8284
      @vinniciusrosa8284 3 года назад +7

      @@DanielCoutoF You are not a programmer. Maybe you feel like "I am the best of my class". I have worked on some big advanced systems that you cannot even imagine. I am talking about REALLY understand 3d. I know linear álgebra and a lot of complicated things. Please, get out. You didn't understand what I said.

    • @DanielCoutoF
      @DanielCoutoF 3 года назад

      @@vinniciusrosa8284 stop replying to comments and go watch the same video for the 100th time.

    • @javidx9
      @javidx9  3 года назад +13

      Hmmmm. The guy just said he didn't understand something. At least he can admit when he doesn't. That's an underestimated skill. So let's keep things a little calmer eh?

    • @nettoribeiro4267
      @nettoribeiro4267 3 года назад +2

      @@DanielCoutoF "if you can't understand it watching it three times, forget about it, your head isnt for programming"
      That's not how it works. That would be the same as telling a kid who just started to play piano to go and learn an entire symphony orchestra by himself. He wouldn't be able to do it, because he needs to learn the fundamentals about music and try simpler songs first.
      This applies to programming too, in the case of 3D, maybe your background in math is weak and you need to work on it.
      That said, rewatching the video is a good thing ,every time you watch it, you will see things in a new and clear way. Once you grasp a topic, your mind will be free to worry about the other ones you were to busy to care before.

  • @peepwebdev575
    @peepwebdev575 4 года назад +5

    I have just starting watching OLC videos. i have been amateur coding for about 3 years with python and some JS. This is fascinating. I cannot grasp the mathematical concepts but i kind of get whats happening with the C++. I'm going to try and dissect this video series and hopefully come out the other side with a basic understanding.

    • @javidx9
      @javidx9  4 года назад +2

      Glad it was helpful!

    • @user-ri2ms2mm7w
      @user-ri2ms2mm7w 2 года назад

      My friends, search for your life purpose, why are we here?? I advise you to watch this series and this video 👇 as a beginning to know the purpose of your existence in this life ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
      ruclips.net/video/7d16CpWp-ok/видео.html

  • @reubenbridges
    @reubenbridges Год назад +1

    Feels like I just watched a classic PBS show on programming, late 80s early 90s. Excellent video.

  • @AlexGarcia-cr5st
    @AlexGarcia-cr5st Год назад +1

    Love your tutorials man. You are a true computer wizard.

  • @astrahcat1212
    @astrahcat1212 Год назад +3

    “We’re just gonna paint a lil struct over here……..that’s right, just a lil happy struct…” 😂😂😂😂

  • @spjewkes
    @spjewkes 6 лет назад +7

    Nicely done, David. I’m looking forward to the last episode of this series where you demonstrate a spinning, textured Vimto can :)

    • @javidx9
      @javidx9  6 лет назад +6

      Lol Steve, you know what? Challenge accepted!

  • @scritch9549
    @scritch9549 Год назад

    You’re content is absolutely amazing man. Absolute legend

  • @VS-rv5xh
    @VS-rv5xh 4 года назад +2

    thanks to you i finished my bachelor in IT since I really found my love for programming again

  • @gettanned-foureyes2417
    @gettanned-foureyes2417 6 лет назад +10

    This is What I acutually want to know !
    Hope The Next Video will be Uploaded Tommorow .

    • @javidx9
      @javidx9  6 лет назад

      lol, sadly it wont be tomorrow - but I hope to show quite a complete system by the end of the series.

    • @gettanned-foureyes2417
      @gettanned-foureyes2417 6 лет назад +1

      Though it won't be tommorw ,
      it can be uploaded 2 hours later ( exactly not tommorw but today ) .
      ... Sorry , What I wanna say is I like your videos as much as I think so .
      If I can push Like 3.14 times or 2.718 times ...
      But RUclips allow me to push it only once .

  • @JimmyJohanes
    @JimmyJohanes 3 года назад +39

    can you imagine the source code complexity of program like 3ds max, blender ..

    • @javidx9
      @javidx9  3 года назад +40

      Well i believe blender is open source, so no need to imagine it! Go check it out!

    • @javidx9
      @javidx9  3 года назад +33

      github.com/blender/blender

    • @theslavegamer
      @theslavegamer 3 года назад +3

      @Christian Weissmuller like a 3rd of the program is managing the interface, there's so many hotkeys for re-ordering and hiding UI elements. I love blender

  • @nockieboy
    @nockieboy 3 года назад +1

    I'm looking to make a hardware 3D accelerator for my home-made 8-bit computer using an FPGA, and this channel is the first place I came to for details on the maths - and you did not disappoint!!

    • @javidx9
      @javidx9  3 года назад +1

      Sounds like a great project!

    • @nockieboy
      @nockieboy 3 года назад

      It's certainly testing my knowledge of programming and electronics! Keep up the great work - I'm learning loads! 👍

  • @Dhurgan
    @Dhurgan 3 года назад

    Simple and straightforward, think I need to go back and watch your gameengine works :)

  • @kennyotsu4357
    @kennyotsu4357 5 лет назад +3

    I love ur videos, even when i totally cant understand what the heck is going on here, but i love ur videos :3

    • @javidx9
      @javidx9  5 лет назад

      lol, thanks Deku, if you get stuck shout out on the discord server, people willing to help on there!

  • @ChenHuang
    @ChenHuang 5 лет назад +3

    Wish this was available when I was learning about software rendering myself, very good material

  • @dantheman1464
    @dantheman1464 2 года назад

    Finally someone presented this approach to 3D graphics in an approachable manner.

  • @dokoweio988
    @dokoweio988 4 года назад

    nice framework for this, finally some engine intuition and beginning anchors for this subject.....this vid is a Gem!!!

  • @stewartzayat7526
    @stewartzayat7526 6 лет назад +3

    What a coincidence! I just started working on my own renderer too. I'm really looking forward to this series.

    • @javidx9
      @javidx9  6 лет назад

      Excellent Stewart - we should compare notes! :D

  • @summer_xo
    @summer_xo 2 года назад +3

    javid invented computer science, video games, visual studio, 3d graphics and free world class tuition.

    • @javidx9
      @javidx9  2 года назад +3

      That's quite a list... I don't recall inventing all those things, but I do appreciate the thought and support. Thanks Shane!

  • @johnnybegood8531
    @johnnybegood8531 5 лет назад

    Awesome dude! Well explained and the best video I could find!

  • @odedkadshai
    @odedkadshai Год назад +1

    can't thank you enough for this series

  • @uploadschedule
    @uploadschedule Год назад +3

    When he said that he will talk about the theory and the mathematical stuff at 1:06 i knew it was the right tutorial.