Tools to make a Game Engine in C++

Поділитися
Вставка
  • Опубліковано 22 тра 2024
  • This video is a summary of my favorite C++ libraries and dependencies to create a game engine from scratch.
    Game development has always been a great helper to get my students motivated to learn more about more advanced computer science topics. Creating a game engine is a great opportunity for us to grow as programmers.
    Links:
    Create a 2D Game Engine with C++: courses.pikuma.com/courses/2d...
    Should You Make Your Own Game Engine?: pikuma.com/blog/why-make-a-ga...
    Game Loop (Glenn Fiedler): gafferongames.com/post/fix_yo...
    EnTT ECS: github.com/skypjack/entt/wiki
    Flecs ECS: github.com/SanderMertens/flecs
    Learn OpenGL: learnopengl.com/
    Basic Game Math: gamemath.com/
    Chapters:
    00:00 Introduction
    00:57 What is a Game Engine?
    05:47 Should You Write a Game Engine?
    08:11 Game Development & Computer Science
    11:01 Classic Game Engines
    14:19 How to make a C++ Game Engine?
    16:31 Windowing System and Multi-platform Libraries
    20:18 The Game Loop
    21:17 Input & Event Handling
    22:47 Representing Game Objects in Memory
    24:12 ECS
    28:14 2D Rendering
    29:50 3D Rendering
    32:01 Importing 3D Mesh Files
    33:36 Physics
    35:51 Dear ImGui
    40:00 Scripting
    42:27 Conclusion
    45:50 Useful Resources
    Thumbnail illustration by @WesleySales3d (thanks, Wesley!)
    Hopefully, these recommendations are useful for you to create a good roadmap on how to start coding your own game engine using C++.
    For comprehensive courses on computer science, programming, and mathematics, visit:
    www.pikuma.com
    Don't forget to subscribe to receive updates and news about new courses and tutorials:
    / @pikuma
    Enjoy!
  • Наука та технологія

КОМЕНТАРІ • 69

  • @fernandogoncalves7297
    @fernandogoncalves7297 29 днів тому +1

    Cara pulei de ponta nesse "rabbit hole" já faz 2 meses e nunca me senti mais motivado pra continuar, muito bom finalmente sentir que encontrei a área que quero trabalhar/estudar. Canal sensacional, parabéns pelo trabalho!

  • @godzil42
    @godzil42 Рік тому +13

    I like the fact that albeit having your own lessons about all the topic you talk about in this video, you don't push them until the end, and yet, you are really cautious into saying, this is just the start of a journey, if you want to compete with X or Y, you are probably thinking it wrong. This is really honest from you and quite wholesome actually!

  • @blackcitadel37
    @blackcitadel37 7 місяців тому +4

    Very cool. One of my biggest mistakes when I tried to create a game engine with c++ in the past (in all 2 or 3 attempts iirc) was the endless "feature creep". I always got stuck implementing more and more systems and overcomplicating things instead of focusing on what was really important and forgetting what the end goal was in first place (make a simple space shooter).

  • @__hannibaal__
    @__hannibaal__ 6 місяців тому +4

    Don’t try to understand every thing, just forward till hit wall, hit it again and your mind start moving and work.

  • @playerzero5388
    @playerzero5388 3 місяці тому +2

    Cool video. I would like to point out that a game engine is actually "the part of a games code that can be shared with other similar games". It is often called the 'Engine' or 'Core' library. This is why certain games from studios will use a particular engine over others - depending on which gameplay aspects and features they are trying to achieve (and other decision making, such as ease of use and capability for streamlined collaboration of its editor). Some studios (who may release different unique type of games) may own and manage more than a single engine.
    Next up, you will have your game code. This code (project) will extend/implement the core/engine library (which often contains the majority of functionality). It will then extend upon the engine code with features and functionality that will be unique to the particular game.
    Lastly, you will have the editor. The editor does not need to be written in the same programming language as the engine is. After all, it will be mostly managing asset files. It therefor needs to understand how to create and modify the proper file formats for assets, as the code (engine + game code) will need to read into memory. This program will contain the majority of tool necessary for the creatives (and programmers alike, inc. others) to create and manage project assets, visualize and place items into the scene, and much more.
    Post lastly, sometimes a studio will create one or more specialized tools for particular tasks. The editor will have many bells and whistles in regard to what it can do and how it does it. Sometimes, a simple tool (could even be created in a webpage) can be used for specific complex tasks.

  • @badgerdash
    @badgerdash Рік тому +1

    Wow! You talk with so much passion that I almost want to start writing my own game engine! Thanks for great lecture!

  • @mr_noodler
    @mr_noodler Рік тому

    Awesome video, I watched it all the way until the end and I’m looking forward to taking all of your courses!

  • @yolowex6876
    @yolowex6876 2 роки тому +1

    I watched it all and finally realised its past one hour. Great video i learned a lot!
    Thank you !

  • @ThatBigDon
    @ThatBigDon 4 місяці тому

    This is a fabulous explanation of what and why.
    Thank you sir!

  • @fedotov2d
    @fedotov2d Рік тому +2

    Awesome and very valuable content.
    Thank you!

  • @moeenkamali1288
    @moeenkamali1288 2 роки тому +1

    well done. that is one of the topics that like to follow more as a unity/unreal developer!

  • @AyoubFrihaoui
    @AyoubFrihaoui 2 роки тому +1

    Very informative, thank you !

  • @GaryChike
    @GaryChike 2 роки тому +13

    Great overview Gustavo! So your preference would be 'unmanaged' languages like C/C++/Object Pascal vs 'managed' languages such as Java and C# which have a layer of abstraction.

    • @pikuma
      @pikuma  2 роки тому +19

      I have no real preference. Different problems require different tools. I just think that in this case, since the goal is to learn something, most students will benefit from using a language that forces them to think lower-level. Different people might disagree, and that's fine.

  • @eduardoprasniewski
    @eduardoprasniewski Рік тому +4

    Muito bom! Aproveitar as férias da faculdade para fazer uma game engine como side project

  • @user-ji9ws1zg8n
    @user-ji9ws1zg8n 11 місяців тому +1

    Yes, thank you I want to make a game engine. You have helped!

  • @blyatpitt7030
    @blyatpitt7030 2 роки тому +5

    wow..i found you on youtube after you respond me on quora..nice tutorials man

  • @felipelopes3171
    @felipelopes3171 9 місяців тому

    Nice to see a fellow Brazilian here! In any case, maybe I'm being too honest, but for me the answer to "Should you write a game engine?" is a simple no. There's a very simple way to see this. First, pick any game and try to implement something similar to a very small part of it, like a menu to select the items. Try to implement just that from scratch. You will see that you'll struggle a lot, it will look very bad. Now try the same with an engine and you'll see that it will take you just a couple of days.
    Now pick the tool you used in the engine and try to implement it. With a few months of work and some knowledge you might be able to do it, but at least this is a problem you can attack. If you succeed then you can wonder if you have enough time in your life to actually implement the rest.
    In any case, you're right that it teaches a lot of programming concepts, but there are much more efficient ways to understand them...

  • @vinnyhorgan7186
    @vinnyhorgan7186 Рік тому +2

    Really nice video! Thanks Gustavo

  • @All-of0
    @All-of0 2 роки тому +2

    Thank you 👍

  • @mteo6391
    @mteo6391 6 місяців тому

    I was really helped by your tutorial
    Good lucky Bro

  • @jorik170
    @jorik170 2 місяці тому +3

    very underrated video, literally cleared everything that i was having hard time with

  • @specterent
    @specterent 2 місяці тому

    Love this video and bookmarked the engine course you have so I can buy it should I ever have the expendable income to get it.

  • @NonTwinBrothers
    @NonTwinBrothers 2 роки тому +2

    13:02 Ayyyy shoutouts to Ken Silverman

  • @techbytefrontier
    @techbytefrontier 2 роки тому +4

    Imgino que seja Brasileiro, valeu pelo video é um baita começo, estou escrevendo uma engine em c++ usando sfml e tentando utilizar o ECS na mão.. vamos ver no que dá kkk obrigado pelas dicas abraço!

    • @pikuma
      @pikuma  2 роки тому +2

      Opa Tauan, que legal. 😉

    • @techbytefrontier
      @techbytefrontier 2 роки тому +2

      @@pikuma acabei comprando seu curso por que tinha tudo que precisava, sensacional parabéns por reunir tudo que um iniciante precisava, muito legal mesmo..

  • @Alexander07211
    @Alexander07211 11 місяців тому

    Thanks

  • @yanmoenaing118
    @yanmoenaing118 10 місяців тому

    Can I use SDL for 3D rendering instead of choosing OpenGL or Vulkan or DirectX. Also thanks for this great video explanation.

    • @pikuma
      @pikuma  10 місяців тому +3

      That's a good question. It's one that many beginners get confused.
      You'll see many people use SDL to open an operating system window, read mouse, keyboard, etc. But when it comes to rendering 3D content, you still need a graphics API to communicate with the GPU. OpenGL, Vulkan, Direct3D, etc. are these graphics APIs.
      One interesting thing is that SDL itself will sometimes recognize that you have a graphics card and it will open a window and display graphics using OpenGL or Vulkan behind the scenes. But you still need OpenGL or Direct3D to create a proper hardware-accelerated 3D game.
      I hope this helps.

  • @joaquimjesus6134
    @joaquimjesus6134 Рік тому

    GDI and GDIPlus is good for graphics or too much slow?

  • @jacquesb8774
    @jacquesb8774 Рік тому

    Do you plan to make more courses?
    If it's the case, what topic will these courses cover?

    • @pikuma
      @pikuma  Рік тому +2

      Of course. I have lots of ideas. But I'm focusing on retro programming, since there's a lack of good content on it oht there. Maybe PS1? 🙂

  • @gbant
    @gbant Рік тому +2

    Gustavo, apesar de falar um inglês perfeito eu suspeitei de ser compatriota e escrevo esse comentário em português mesmo kkkk. Muito bacana seus videos! +1 inscrito.

    • @pikuma
      @pikuma  Рік тому

      Grande Gabriel. 👍🙂

    • @skyfallz6464
      @skyfallz6464 Рік тому +1

      o 'tchoo' ao invés de 'too' sempre entrega um brasileiro, não tem jeito kkkkkkkk

    • @pikuma
      @pikuma  Рік тому

      @@skyfallz6464 Ou "fink" ao onvés de think, e "tings" ao invés de things.
      Mas lembrem... se eu falar inglês perfeito, eles ganham. 😅

    • @skyfallz6464
      @skyfallz6464 Рік тому +1

      @@pikuma kkkkkkkk não sei se ja viu um canal chamado Bisqwit. Zoaram tanto o sotaque norueguês dele que ele decidiu fazer uma aplicação text-to-speech do 0 que fala com sotaque igual o dele

    • @pikuma
      @pikuma  Рік тому

      @@skyfallz6464 Claro. Bisqwit é clássico.

  • @a740g
    @a740g 7 місяців тому +1

    You forgot to mention audio - a seriously overlooked part of game development.

    • @pikuma
      @pikuma  7 місяців тому

      Ah, so true. 🙂 Thanks for tge heads up.

  • @wkvvkw
    @wkvvkw 9 місяців тому

    Hi, what font did you use at 40:59(lua code)?

    • @pikuma
      @pikuma  9 місяців тому

      Hermit

  • @Ismoh0815
    @Ismoh0815 Рік тому +1

    Is there a udemy course about this, I can buy? Do you know ENTT and ever used it?

    • @Ismoh0815
      @Ismoh0815 Рік тому

      Ah, found it in your video description! Nice, I am a huge fan of your stuff. Already did your Lua course!

    • @pikuma
      @pikuma  Рік тому +1

      Yes! EnTT is great. I like Flecs as well with my C projects. They are really good ECS frameworks.

  • @mehmetakifgol1707
    @mehmetakifgol1707 Рік тому +1

    do AAA games use the physics library or they implement it from scratch?

    • @pikuma
      @pikuma  Рік тому +1

      Good question. Most AAA studios use some *tested* library (purchased 3rd party or something they have been working for a long time). The only real reason to write one from scratch is if your "physics problem" is very unique/niche or simple enough that you can get away by writing yourself. But again, most studios use something complex and heavily tested, meaning that they don't really need to understand all the math that goes behind every physics computation, and they can be productive only by using the library and its API as a black-box.

  • @CCV334
    @CCV334 Рік тому +1

    I noticed at 18:22 you mentioned SDL, GLFW, and SFML. What are your thoughts on Raylib?

    • @pikuma
      @pikuma  Рік тому +2

      Raylib is a super cool library. I just saw that the author published a comparison:
      gist.github.com/raysan5/17392498d40e2cb281f5d09c0a4bf798

    • @CCV334
      @CCV334 Рік тому +1

      @@pikuma oh wow this was posted just an hour ago!

  • @GonziHere
    @GonziHere 2 роки тому +1

    tldw:
    engines are hard, use whole of computer science and are build up from important parts.
    Since you want to make an engine and not an renderer (for example), you should use libraries for pretty much all the parts and "just" wire them together.
    There are a few libraries mentioned throughout the video, but I'll just add that I would go with BGFX for the rendering (instead of using dx/vulkan directly).

    • @astroid-ws4py
      @astroid-ws4py Рік тому

      Or WGPU for doing the same thing as BGFX

  • @mikedabeast5601
    @mikedabeast5601 Рік тому +1

    Im 15 and trying to make a 3d runners vs trappers game. Never used unity or unreal just now learning c++. Seems out of my scope to make a game engine. I should probably just use an existing one first.

    • @cweasegaming2692
      @cweasegaming2692 10 місяців тому

      Oh for sure. Really, if somebody just wants to make games then you most likely don’t have to make an engine. BUT, if you’re interested at all, it will never hurt you to take a swing at it

  • @darkzeroprojects4245
    @darkzeroprojects4245 Рік тому +2

    First several games I want to make their custom engines more akin between classic Id software engines with a few of modern stuff like the ECS and such.

    • @pikuma
      @pikuma  Рік тому +1

      I think more than ECS, which I agree should not be treated as a one-size-fits-all, is the idea of data-oriented programming and really thinking about data locality and data layout for performance.
      Lots of fancy words but all these ideas were there back in the day when every CPU cycle counted.

    • @darkzeroprojects4245
      @darkzeroprojects4245 Рік тому +1

      @@pikuma
      Indeed.
      The classic engines and the modding and source ports communities done for them fascinate me so much more than most modern engines in honesty.

    • @pikuma
      @pikuma  Рік тому

      @@darkzeroprojects4245 I like them a lot as well. 🙂

  • @kekkler
    @kekkler Рік тому +2

    I’m going for this with Rust

    • @pikuma
      @pikuma  Рік тому +2

      I like this idea a lot! 💪🏻🙂

    • @kekkler
      @kekkler Рік тому +1

      Thank you! Your video is a good resource.

    • @astroid-ws4py
      @astroid-ws4py Рік тому

      The check WGPU, It is a cross platform Rust rendering abstraction layer on top of many platform specific rendering APIs.

  • @jasminaashkar6176
    @jasminaashkar6176 2 роки тому +1

    44🥰4

  • @mikebeats3281
    @mikebeats3281 Рік тому

    This is Clickbait😂

  • @HatGD368
    @HatGD368 Рік тому +1

    I DID NOT MEAN TO CLICK THE DISLIKE I'M SORRY.