COMP4300 - C++ Game Programming - Lecture 02 - Intro to C++ (1/2)

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024

Комментарии • 119

  • @Latsu15
    @Latsu15 Год назад +70

    As someone who has come across a post on reddit sharing this course, thank you for making these lectures public.

  • @tomodiero7524
    @tomodiero7524 6 месяцев назад +4

    Absolute King move, stopping the recording to tend to the Ferret appropriately named King George. no edits just real life. I love the video and the teaching.

  • @Blazemore6
    @Blazemore6 Год назад +69

    I really, really appreciate these lectures being available online. This is a great primer, and refresher on c++ and I cannot wait to get into the more meaty parts of the course.

  • @RamRevivo
    @RamRevivo 11 дней назад

    coming from Java, my mind is blown by how easy it is to read data from file, thank you!

  • @Bopek
    @Bopek 6 месяцев назад +6

    I’ve been brute forcing making a game without looking at C++ tutorials but realised I was missing some small details, these quick crash courses were fantastic - I’ve learned to much, thank you!

  • @Constantin_91
    @Constantin_91 Год назад +9

    As a recent MSc Pharmacology graduate looking to learn about game development, design patterns, and engine architecture using C++ (I do 3D modelling and digital sculpting as a hobby), such online content is a godsend. Thanks a lot for this amazing content!

  • @williambigger1545
    @williambigger1545 Год назад +6

    I go to a different university but there isn't a game development course here so this is very interesting. thanks for making it available to the public. I promise I won't post my solutions!

  • @mother_of_crows
    @mother_of_crows Год назад +22

    Give this man an award! I wish I had this style and presentation in my courses.

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

    This channel is hell underrated..You diserve million of subs and views for creating such a wonderfull content.I came accros this channel from reddit...I actually started learning game dev 3 months ago ..But i litreally messed up my time by following complicated books(I'm talking about sfml..),Tutorials etc...If only i could able to go back 3 months ago,I'd advise myself to learn game dev from here..Can't wait to proceed with further lectures of the playlist
    :)

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

      hey just want to let you know im on the same boat lol. started over complicating myself with high level books that i know i wasnt ready for but what i wanted to learn. These video also helped me tone down the complex ideas into more digestible information which has made alot of little things of cpp click in my head in a good way.
      for me i couldnt find a good cpp course to learn it with an interesting style and this course has it the perfect way to learn for those who want hands on.

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

    As a SDE for over 2 decades and mostly in Java, this is an excellent course about C++. I have worked in C++ back in the day when MFC was popular, but this is a great refresher.

  • @lecturecapture
    @lecturecapture 8 месяцев назад +4

    One of the best-taught courses I've ever watched. Thanks for making them available to the public.

  • @ShankingDisaster
    @ShankingDisaster 9 месяцев назад +4

    brother you're helping people go for their dreams here! thank you!

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

    Currently a Computer Science major at a different university. Outstanding lectures thus far, really looking forward to seeing more courses available from you. I've had issues with many of my current professors whom tend to not care, you make the lecture interesting. Thank you so much, can't wait to see more from you Professor Churchill!

  • @yurialbu
    @yurialbu 7 месяцев назад +3

    This is the best C++ class that I've ever watched! Thank you so much, sir!

  • @TrustTheNarrowPath
    @TrustTheNarrowPath 7 месяцев назад +2

    This guy is awesome. Way better than any paid course on Udemy. Dave = the GOAT

  • @Sobioytccc
    @Sobioytccc 10 месяцев назад +2

    I considered myself to be a late to comment here, I am not going to miss this opportunity to show appreciation on how good you have done on c++ introduction. I am a professional developer and I am struck by how you have explained these concepts beautifully. Hats off. 🎉❤

  • @iDorito
    @iDorito 5 месяцев назад +1

    Such a bad thing for me that i missed this classes in live. Im loving how you teach, i can't help but fell asleep while watching other lectures, but with yours i can't do anything more that hear and learn. Thanks, i hope i can code huge games once i finish this course. ♥

    • @Jason-eo7xo
      @Jason-eo7xo 5 месяцев назад +1

      same here. i was watching this horribly boring C++ tutorial on udemy and was falling asleep...and thats what eventually lead me here.

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

    Thanks for sharing! It's nice to have someone experienced go into the c++ specifics that you might not realize when coming from other languages, like using `const std::string&` instead of unknowingly passing by value and creating copies.

  • @maxim_seany
    @maxim_seany 9 месяцев назад +4

    Thanks very much for uploading this playlist! Such a great resource.

  • @jimbo3947
    @jimbo3947 5 месяцев назад

    You're a legend, thank you for posting these online. Greetings from the UK.

  • @troubledtom5250
    @troubledtom5250 7 месяцев назад +1

    honestly from this 2 hr vid i learned alot of concepts that i generally didnt know also had doubts about tnx for helping me also figure out how to do encapsulation and stuff i only did that stuff in java while learing oop but c++ was generally easy to grasp so far tnx alot i'll be atching the rest of your 20 vids now keep at it :)

  • @pawansutar2724
    @pawansutar2724 Год назад +8

    I am an experienced C++ developer and I’ve never seen such a fluid and to-the-point intro to C++. I was wondering if it would be possible to leave only the 2nd and 3rd lectures on this channel after taking down the course. Thank you so much for posting this course! I’m heading to Memorial University’s academic calendar to finish it before the fall sem starts! Also, I would be keen to see if the university approves it sooner to take this course without enrolling into the degree program.

    • @DaveChurchill
      @DaveChurchill  Год назад +5

      These lectures will remain online indefinitely as I have returned to in-person teaching for the fall

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

      @@DaveChurchill That’s great to hear! Excited to explore this course! 🫡

  • @Beygir
    @Beygir 5 месяцев назад

    There is a bunch of tips and tricks in the lectures, it is kinda treasure hunt for me.. Thank you Dave, appreciate it!

  • @ricorobert2848
    @ricorobert2848 6 месяцев назад

    8 years ago , i've learned c++ , i discover c++ , to be the most my favourite programming languange , beside php and many others . Thx for the lectures . I was looking for game programming.

  • @notanomba4598
    @notanomba4598 8 месяцев назад +1

    the file reading could be even shorter by putting everything in the while loop: while(fin >> first >> last >> id >> avg) ...

  • @orynicolas
    @orynicolas 6 месяцев назад

    Wonderful class! I really love your teaching style, Dave. Thank you so much for providing us with such a valuable learning material. Can't wait to watch the other classes - never long enough if you ask me :-)).

  • @zicraftian
    @zicraftian 6 дней назад

    Amazing stuff, I really enjoyed the live coding segent!

  • @bravenick
    @bravenick Год назад +4

    Dave, thank you so much to post this course, I'm currently going through and so far it was just amazing!

  • @denisecastellanos4866
    @denisecastellanos4866 5 месяцев назад

    I am only on the second lecture of this course, which I fully intend on completing, and I gotta say I love your teaching style/attitude. Too many people out there make C++ out to be this daunting mountain or sea that can only be surmounted/crossed if you have the favor of God, like Moses or something. Your casual attitude actually sets up your students to believe that they can indeed learn and make something cool out of the subject matter that you are teaching.
    I already have a few years in the games industry, mostly working with the Unity engine as a creative programmer/engineer. Always had a fascination with learning about the deeper intricacies of game engines. I have no doubt that by the end of this course I will be returning to my work with even greater understanding and confidence in my abilities.
    Thank you very much for posting these. I guess I must have the favor of God/the Goddess for having stumbled upon these lectures. 😇

    • @DaveChurchill
      @DaveChurchill  5 месяцев назад +1

      Thanks for the kind words! Please don't expect our game engine to go into the same level of detail as in the games industry, this is intended for undergraduate students :)

    • @denisecastellanos4866
      @denisecastellanos4866 5 месяцев назад

      @@DaveChurchill Understood, I will treat this as a good starting point in the practical application of building an engine. From which to build off of. 🙂

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

    I am really amazed, thank you Dave.

  • @124k3_
    @124k3_ 8 месяцев назад +1

    i am in my second year and i have only coded in java and python (i haven't done any projects) but i am learning cpp so fast i cant explain (its tricky, since i don't have that much previous experience or knowledge) but its easy to digest 😅 ... thanks again ... appreciate the effort

  • @vijaynyaya
    @vijaynyaya Год назад +5

    I have tried learning cpp multiple times this year to no avail. This course, gives me the confidence that I can do it.
    Previously, I was trying to setup cpp on windows which, as you said, was a "nightmare". So, this time I'm using linux(WSL). Previously, I was learning cpp from people who take the approach of teaching "everything" about cpp before building stuff with it. Your mixed approach is perfect for me.
    BTW, I'm full stack javascript developer in a blockchain firm. I've been exposed to Rust, Golang, Elixir, Javascript and Python during my career. I must say, after watching this lecture, cpp seems to be the most elegant of them all.
    Thanks Dave Churchill! You 🤘

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

      it's weird that you exposed to many similar language, with a good experiences in the field, yet you still feels challenging learning a new language.

  • @GreyReBl
    @GreyReBl 6 месяцев назад

    I find the little challenge about iterating through a text file in less lines than C++ funny because ifstream is a library, which makes the challenge moot.
    In order to read by each string separated by whitespace instead by line, each line must be delimited by whitespace first. The ifstream library is used for this exact behaviour which simplifies it into a single method.
    After that, it's basically an iterator. So with an equivalent method, almost EVERY language could do the same thing in 2-3 lines of code.

    • @DaveChurchill
      @DaveChurchill  6 месяцев назад

      The whole point is that people think C++ is this big scary language and so they never try it. These are just simple examples to show that it's quite approachable for easy tasks. It's not meant to cover ever possibly use case.

    • @GreyReBl
      @GreyReBl 6 месяцев назад

      @@DaveChurchill And I agree with your point. I'm just making fun of the approach. What I like about the example, when comparing other languages, is that it shows C++ is really not that special. People tend on both sides tend to put C++ on a pedestal, when it's really down-to-earth and approachable. It's simply more to learn and more responsibility, because at the end of the day, a programming language is still a programming language.

  • @mahmoudabdel-raouf1354
    @mahmoudabdel-raouf1354 4 месяца назад

    You are truly a very wonderful professor. Thank you for sharing these lectures

  • @ngrader
    @ngrader 5 месяцев назад

    51:06 Gospel
    1:15:31 Hungarian Notation: Finally prompted me to look it up, kept wondering what the prefixes meant when I saw them. Modern tools reduce it's relative utility, imo. My biggest gripe being auto-complete collisions.

  • @joey_g2378
    @joey_g2378 3 месяца назад

    Awesome! Thank you very much for sharing!

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

    Thanks to reinstate c++ in the place it deserves. Best language ever.

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

    vim keymapping to run compile and run cpp file in the current buffer when ctrl-b is pressed:
    map :w :!g++ % && ./a.out

  • @ivankevamo
    @ivankevamo 9 месяцев назад

    Thank you very much, your videos are amazing!
    Greetings from Brazil.

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

    Dave. Happy with this course. I go slow but I just like it. I put attention to every word in this Master. I like the nice energy you put on this. Excuse my english

  • @nuiben7579
    @nuiben7579 8 месяцев назад +1

    51:22 ... *really* wish I had kept watching the video before spending 3 hours last night trying to set up a compiler for VS Code.

  • @JJ-dz2ne
    @JJ-dz2ne 7 месяцев назад

    Wow! thank you for uploading!

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

    I found this from RUclips. Thank you very very much.

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

    I love George!

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

    Fantastic tutorial, keep up the great videos!

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

    Thank you for this video!

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

    getAvg returns an int, m_avg is float.

  • @awaismushtaq5719
    @awaismushtaq5719 6 месяцев назад

    Among C and C++, I find C far more adorable!

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

    lovely lecture

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

    You're a godsend.

  • @Am-pe4iy
    @Am-pe4iy 8 месяцев назад

    I am now scared that the internet collapses these lectures wont be available anymore

    • @DaveChurchill
      @DaveChurchill  8 месяцев назад +3

      I'm pretty sure you'll be fine, but you can use a tool like yt-dlp to download youtube videos just in case it does all blow up

  • @lifeProgramer5023
    @lifeProgramer5023 Год назад +5

    #include
    using namespace std;
    int main(){
    cout

    • @Simple_OG
      @Simple_OG 3 месяца назад

      segmentation fault core dumped

  • @Kerolos_Essam
    @Kerolos_Essam 3 месяца назад +1

    Hey Doc Dave I'm so happy that I've stumbled upon your course but when you started talking about the vectors I didn't understand anything and I can't get it
    what do you think I need to learn before continuing this course?

    • @DaveChurchill
      @DaveChurchill  3 месяца назад +2

      This is meant to be a 4th year computer science course, so linear algebra is an assumed bit of knowledge

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

    note: 1:33:23 I need to find out how to add warnings of this type to Neovim, maybe a pluging to show them before compiling? (if that is even possible)

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

    tried to watch this about 3 month6ago .. didn't knwo how to use vim didn't know java didn't know anything to be honest...i guess finally i can do it (and btw i am switching to linux full-time)

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

    just starting this course and i want to thank you for the amazing lectures.
    I wonder if the memory management you mention at the start is similar to c# dispose/using pattern. I don't know the lifetime of the objects in c++, but if they are local to a method something like the using keyword would be great, or IDisposable if they last as the whole parent object. Maybe it will be even better and will give me ideas at work where i use C#.

  • @faanross
    @faanross 6 месяцев назад

    or Windows: get WSL2 up and running, then g++ or clang.

    • @faanross
      @faanross 6 месяцев назад

      also sorry if i'm starting to come across as a smart-ass here, just a fun fact: a.out stands for ""assembler output".

  • @sweetday0-0
    @sweetday0-0 2 месяца назад +1

    I wouldn't fire George, he can sleep all he wants

    • @DaveChurchill
      @DaveChurchill  2 месяца назад +2

      Unfortunately George passed away last year

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

    a.out - assembler output

  • @faanross
    @faanross 6 месяцев назад

    meme game on point, good sir.

  • @franzheger2871
    @franzheger2871 6 месяцев назад

    I prefer the Allman Version ...

  • @Ptr-NG
    @Ptr-NG 8 месяцев назад

    Imperative, generic, object-oriented; this cpp thing should be powerful of a kind !! Is it functional too?

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

    These lectures are priceless! Thank you sir! And anyone complaining about this, fine. go learn your Python. LOL lmao

  • @Rhino2400
    @Rhino2400 9 месяцев назад +1

    i love the donkey kong music

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

    I LOVE YOU!

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

    Damn, the names "Visual Studio" and "Visual Studio Code" really are confusing. It doesn't help that judging on just the names I'd be more likely to pick the latter one, because having "Code" in it makes it seem as if that's the correct or best one for programming. 😅

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

      I use vs code for c++ with mingw compiler and plugins to run my code and a quick .json setting change to be able to interact with IO functions. Is there a problem with coding in c++ in this way?

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

    Great Lecture, which vim colorscheme are you using?
    edit: i realized its just default one

  • @SayanBanikAuthor
    @SayanBanikAuthor День назад

    34:46

  • @ayoolafelix
    @ayoolafelix 5 месяцев назад

    is it advisable to use xcode? setting up c++ on mac for visual studio code seems to be a challenge.

    • @DaveChurchill
      @DaveChurchill  5 месяцев назад

      It is literally 2 or 3 commands to set up C++ without xcode. Done in lecture 4

  • @KamiSamaPIANIST
    @KamiSamaPIANIST 9 месяцев назад

    Hello, Profesor. I was wondering what books I should read for this course. I understand the notion of C++, but I've been looking for a book that can teach me how to develop games. Do you have any recommendations for decent books on 2D gaming in C++ and for SFML?

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

    Python only needs 4 lines and doesn't need to import anything first:
    def loadfromfile(filename,students):
    with open(filename) as file:
    for line in file:
    students.append(line.split(" "))

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

      You need to convert id and avg to int and float, but it's still easy to write that code in less lines than in the video

  • @egfs
    @egfs 7 месяцев назад +1

    sorry, but i prefer C#
    foreach(string line in File.ReadLines(filename))
    {
    string[] splitted = line.Split(' ');
    string first = splitted[0];
    string last = splitted[1];
    int id = int.Parse(splitted[2]);
    float avg = float.Parse(splitted[3]);
    addStudent(new Student(first, last, id, avg));
    }
    jokes aside, great video

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

    Dev c is simple enough though?

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

    what's your vim theme? I really like it!

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

      I think it's just the default :D

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

      @@DaveChurchill oh, on my computer its different

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

      @@fatgolem69 I really don't know. Just try different themes until you find one you like :)

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

      @@DaveChurchill okay, thanks :)

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

      @@fatgolem69 many people use tokyonight. you might like it.

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

    Piss on it, I'm going to use VSCode with this! :D

    • @ngrader
      @ngrader 5 месяцев назад

      Legend has it, he's still trying to setup MinGW to this day...

    • @Darkfault
      @Darkfault 5 месяцев назад

      @@ngrader I'm a grown up C++ developer now - switched to VS anyway, less getting things to work, more coding. And better Unreal Engine 5 support!

  • @briankoehl6083
    @briankoehl6083 7 месяцев назад +1

    Lol why the donkey Kong music

  • @humbledb4jesus
    @humbledb4jesus 6 месяцев назад

    i hate c and c++
    i was 14 when the commodore pet came out...i self taught basic off of it...
    in university, i took fortran...kicked ass...
    wrote a program on a com64 for 2nd year astrophysics class that predicted the structure of the sun at any point in it's life...
    took 1/2 hr to run (even found a programming error with a specific variable was involved...it would crash the program until i simply added a '1' on the end of it)...the guy next to me ran it in a split second with c++...
    i think: ok, i'm gonna learn c++
    coudn't get past assigning variables...there goes my programming career...
    so i just made galaga games...with peek and poke statements...

  • @lidroxd6869
    @lidroxd6869 6 месяцев назад

    Thank you Jesse Pinkman

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

    fckn superhero

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

    setuping mingw is not that hard btw

  • @user-vd6wb5ef8v
    @user-vd6wb5ef8v 6 месяцев назад

    Great lecture! Just one observation: why all these references to Java?
    For those who knows Java these are redundant.
    For those who do not know Java (the majority, I presume) they are white noise.
    For both these are annoying procrastinations

    • @DaveChurchill
      @DaveChurchill  6 месяцев назад

      Our university uses Java for some of its earlier courses, so I make the comparison for the students

  • @kuijaye
    @kuijaye 8 месяцев назад +1

    Nitpicky comment: C++ standard library != stl

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

      STL = Standard Template Library
      en.wikipedia.org/wiki/Standard_Template_Library

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

      @@DaveChurchill most people usually use thses two term interchangeably while STL is a part of standard library not all of it.

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

    Stroustrup uses the Allman style. Saying otherwise is blasphemy. Source: I have all the books in front of me. Fix the slides! 😂

    • @ngrader
      @ngrader 5 месяцев назад

      Since the books are in front of you. I suggest opening them. ;) But Bjarne does seem to be more style-fluid than most.

    • @PharmacyBrain
      @PharmacyBrain 5 месяцев назад

      ​@@ngraderherp durp

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

    where can I find the macro?

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

      Its a simple macros, start recording by pressing q+b then
      1. :
      2. w
      3. enter
      4. :
      5. !g++ basic.cpp
      6. enter
      7. :!./a.out

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

      also add clear if you like your terminal clean