Code Gains
Code Gains
  • Видео 11
  • Просмотров 51 675
Making My Game Engine More Pretty With Skybox and Directional Light
Hello. Finally found some time to release the video. I have a feeling I made quite some mistakes in this video, so hopefully someone will correct me in the comments.
I am currently working on Vulkan implementation (Help).
Thank you for watching!
Github: github.com/Code-Gains/DX11-Engine
0:00 Intro
0:26 Skybox
1:05 Rendering Order
1:30 Skybox Is a Lie
1:48 Depth Buffer
2:19 Implementing Skybox
3:28 Skybox Result
3:56 Directional Light
5:03 Final Result
5:20 Future Plans and Outro
Music:
Fish Cannot Climb Trees - Ferco
Instrumental Jazz Together With You - JR Tundra
Staycation - Corbyn Kites
One Day Or Day One - Ferco
Retribution - Mehul Choudhary
Просмотров: 588

Видео

Creating a Basic Terrain But I am Dumb
Просмотров 9114 месяца назад
Welcome back! I Finally crawled out of the architecture hole. We will now be able to work on features - starting with terrain. Thank you for watching! Github: github.com/Code-Gains/DX11-Engine 0:00 Intro 0:41 What Is Terrain 1:23 Heightmap Terrain 1:55 Plan For This Video 2:12 I Rewrote ECS 2:55 How We Render Geometry 4:34 Rendering Terrain 5:03 GPU Shader Switching 6:20 Adding Height To Vertex...
What Is a Build System and Why Do I Need it? But I am Dumb - Game Engine ep. #5
Просмотров 5 тыс.6 месяцев назад
One last push in the preparation to start implementing new features. After this I will make spaghetti versions of all game engine features in existence. Huge Thank You for watching! Github: github.com/Code-Gains/DX11-Engine Video from @TheCherno: ruclips.net/video/5glH8dGoeCA/видео.html and his template: github.com/TheCherno/ProjectTemplate LearnD3D11 - graphicsprogramming.github.io/learnd3d11 ...
Why My Game Engine Sucks and How Will I Fix It?
Просмотров 2,4 тыс.7 месяцев назад
A little planning this time around, hopefully it will go well. The fire is not putting itself out. Github: github.com/Code-Gains/DX11-Engine Video from @TheCherno about C Projects ruclips.net/video/5glH8dGoeCA/видео.html 0:00 Intro 0:50 Problems 3:43 Future Features 6:29 Summary and Outro Music composed by @BillBrownMusic linktr.ee/billbrownmusic: Shepherd's Flute (Dion Theme) Crossroad at Dawn...
Creating a Basic Game Engine World Editor but I am Dumb. Game Engine ep. #4
Просмотров 3,5 тыс.7 месяцев назад
First video this year. Hopefully I am becoming smarter. github.com/Code-Gains/DX11-Engine Dear ImGui github.com/ocornut/imgui Cereal github.com/USCiLab/cereal 0:00 Intro Story 0:32 Real Intro 1:03 Editor UI 1:43 Dear ImGui 2:04 World Hierarchy Prototype 2:51 Saving and Loading 3:23 Serialization 3:56 Cereal C Serialization 5:08 The Universe 5:30 JSON File 5:46 Using My Brain 6:19 More Brain 6:4...
A Programmer "Fixes" a 17 Year Old Audio System
Просмотров 3538 месяцев назад
I pretend to be an elementary school electrician making some black hole magic voodoo volume controller. 0:00 Intro 0:44 Surprise 1:20 How I Got it? 1:33 Messaging WaveMaster 2:16 Project Start 2:44 Schematic 3:38 Shopping Time 3:58 How I Think it Works 4:27 Confirming How it Works 6:07 Physics Stuff 6:56 Soldering Attempts 7:53 Troubleshooting 9:06 Functional Component 9:23 3D Printing 10:49 Lo...
Coding basic Entity Component System but I am dumb. Game Engine ep. #3
Просмотров 6 тыс.10 месяцев назад
Am I moving backwards or forwards? Nice to see you again for another time in the C engine series. This was an "adventure" to say the least and I hope that you were pleased. This was more of a theoretical video in terms of what you saw, but we will soon get to use this more in practice. Thank you for watching! Resources: github.com/SanderMertens/ecs-faq - has a lot of general information and lin...
Instanced Rendering but I am dumb. Game Engine ep. #2
Просмотров 2,3 тыс.Год назад
The more I know the less I know. Another episode of me cooking up some spaghetti, and hopefully someone has the appetite for it. GitHub repository: github.com/Code-Gains/DX11-Engine Performance was tested using Nvidia GeForce RTX 3080 & Ryzen 7700x, have in mind that recording high framerate applications reduces the framerate by more than 2x times. The cubes were also rendered from the inside. ...
I Created Windows Pipes 3D Using My Own Game Engine
Просмотров 1,9 тыс.Год назад
I hope you don't mind a little distraction of me re-creating Windows XP 3D Pipes screensaver simulation. I will occasionally do projects like this to showcase the features of the engine and of course to have fun/avoid burnout. If you are interested (not the exact ones I used, but explained well): Sphere generation: www.songho.ca/opengl/gl_sphere.html Cylinder generation: www.songho.ca/opengl/gl...
Lights and Materials but I am dumb. Game Engine ep. #1
Просмотров 10 тыс.Год назад
Thanks for watching. I did not expect to get so much attention from the start :) GitHub repository: github.com/Code-Gains/DX11-Engine Learn D3D11 project: graphicsprogramming.github.io/learnd3d11/ 0:00 - Intro 0:38 - Realism 0:58 - Current Cube 1:38 - Indexing 2:26 - Vertex & Index Buffers 3:44 - HLSL Shaders 5:22 - Interlude 5:54 - Phong Reflection Model 6:15 - Ambient Illumination 6:33 - Diff...
Making a Game Engine, but I am dumb - Ep. #0
Просмотров 19 тыс.Год назад
Watch me struggle. GitHub repository: github.com/Code-Gains/DX11-Engine Learn D3D11 project: graphicsprogramming.github.io/learnd3d11/ 0:00 Intro 0:45 Game Engines 2:06 Graphics APIs 2:34 GitHub Repository 2:42 C 2:50 Learn D3D11 3:35 How Graphics Work 5:16 Final Cube 5:48 Outro Music: Licensed under Creative Commons: By Attribution 3.0 License: • Mining by Moonlight Kevin MacLeod (incompetech....

Комментарии

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

    And this is why we thank c++ for being so messy and fragmented with its tool chain that newer better languages could learn from its mistakes.

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

    i know wer u live

  • @Abdullah-nu4od
    @Abdullah-nu4od Месяц назад

    Bro keep going i really love your videos im new to C++ and still learning but i enjoy these videos

  • @Abdullah-nu4od
    @Abdullah-nu4od Месяц назад

    Love this channel

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

    Hello i just found your series, i think its kinda funny that you watched the video where Cherno talked about my terrible Engine structure 💀. Anyways i have fixed it now...

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

      Lol, didn't expect to see such a comment :D Either way not only you now fixed it, but it is also helping me, so thank you.

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

    I love this. Please don't burn out. Take it easy

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

      Thanks. Will do my best not to ❤️

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

    Great to see a new video!

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

    Finally waited for the new video

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

    On the fourth day, God created the sun, the moon and the stars. Were 3 days away from finished product 😄😅

  • @Felix-we7iq
    @Felix-we7iq 2 месяца назад

    1:07 No way 😭

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

    I suggest you consider creating a generic "Component" type. After that all those individual component vectors could get replaced a single vector holding either component pointers or better yet, smart pointers. Doing that you don't have to create new containers for every new component type. Exploit the features of polymorphism, that way you can write code that's more maintainable and easily expandable with new features

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

    1.69..k subscribers? I'll fix it.

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

    bro created runescape at 7:04 GG

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

      It actually looks similar, now that I look at it

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

    bros doing gains in both Elden ring and game engine.

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

    its worse than scratch, but better than unity :D

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

    I will definitely use your engine when it is available on linux. I use arch btw

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

    💪💻 🤖

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

    I'm back from a previous episode. I remember commenting about my interest in creating my own game engine. I followed through with it and I have a GitHub for it. Development is slow though and it is in a very early state. I only started it 2 weeks ago. As a challenge I'm using Vulkan for rendering.

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

    Subscribed because you use C++. Cool project!

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

    Good. Now make it remote controlled.

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

    Hey i am also dumb so i will ask question to same dubness but more experiencess human entity Is it good idea to make game editor separate programm that will somehow load game code and edit save files itself when running game to show game world and its transforms? Or it is better to somehow implement editor into game loop and idk like turn it off somehow in release version??

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

      I wouldn't dare to say how it SHOULD be done, but I ended up making the Core a static library and the Editor a separate application (with the intent that games are also completely separate and would have no editor code in them). You can check out the latest video to this date.

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

    I just worked on excluding editor/client/server code last night in VS2022. You can use #if IS_SERVER and then in VS2022 you can define it as a variable, and if that variable is set then it will only compile that code, else compile the other. **Thumbs up**

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

    visual studio is literally just an editor. it doesnt do anything except integrate.

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

    It's cool that you finally chose the build system. But I'm interested in one question. Will you make the engine cross-platform? (at least for linux and windows)

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

      Yeah. I have plans for Vulkan in the future once the core architecture settles a bit. The plan is to make some sort of preprocessor code that would allow to compile for all platforms.

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

      ​@@Code_Gains cool😎

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

    I never thought to cook my spaghetti code, good thinking!

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

    build.ps1 > build systems

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

    I love this, hope you make something awesome, im trying to do the same thing

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

    dx11?? but why tho edit: ok I saw the explanation in #0, doing it just to learn because it's beginner-friendly is probably the only sensible reason to use it. It's a shame that by choosing it you've immediately committed to the engine being Windows-only and kinda outdated from the get-go, but it's better than trying to start with Vulkan and then giving up because it's too hard.

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

      dxvk and proton exists.

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

      @@scrapmine yeah, and they're translation layers that introduce overhead and bug surface just to run an outdated (by 8+ years at this point) graphics API meant for Windows by design. It's awesome that they exist and have gotten to the point of working (pretty) well; it's understandable when people fall back to relying on them due to learning or severe time/budget/workforce constraints, but using them is still quite a bit worse than developing for native support using the modern multiplatform API that is Vulkan.

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

      @@DeuxisWasTakenRunning dx11 games in proton gives near native performance for many games.

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

      @@scrapmine many, not all, and that's only because the wine/proton people poured sweat and tears implementing it. "Performance in best case scenario" isn't all there is. Besides, I've seen that some games run faster on Proton than on Windows. That's not due to Proton being magic but due to the linux kernel, drivers and whatnot being more optimised enough to offset the overhead brought about by Proton. Running natively they'd get even better performance.

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

      Vulkan only opens up the possibility for running on Linux which doesn't expand the userbase much at all. It might be a good idea compared to DX12, but it's not worth the headaches caused if it's unnecessary.

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

    8:40 I see a lot of people write code like this, having a pretty much empty main function that just calls another function. I usually think it looks stupid but is there actually a good reason to do it? Did you do it because you know you want other code around the editor?

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

      I don't think there are any hard set rules for this (because the program won't run faster or better), but for me If I have a project and see the main function I want to immediately understand what the entire application does and in this case it runs the editor (this is opposed to reading that messy code to understand that this is the editor).

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

      I know that with rust it reduces build times by a significant about, might be the same for other languages.

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

      @@scrapmine Build time would only be reduced if the code is separated out into another compilation unit (i.e. another file) and that unit is already compiled and you haven't made any changes to it, so if that's the piece of code you're actually working on it would do nothing to build time.

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

      The cherno video he referenced touches a bit on this but it's a combination of DX ergonomics when debugging & having the ability to restart your whole editor "view" without closing your application process completely (which may be a hard requirement for certain features).

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

    Nerd

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

    Excited to see where this goes next!

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

    knowledge acquired (IQ inceased +1 total 69)

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

    💪

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

    Im glad i found this channel. I'm planning on creating a new engine myself since ive matured a lot since my first attempt. I like your style :)

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

    Nice, another guy who loves low level programming². Oh, I'm already a subscriber to your site, I didn't even notice 🤔

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

    Do NOT use Cmake. Cmake is one of the worst programs ever written. Dependency management is hell with it, it’s not backwards compatible and breaks every few years, and doesn’t even allow multiple versions to coexist. The documentation is sparse and often features just… break. Use Premake if you value your sanity.

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

    I’m using Cmake for my game engine and it’s alright. There ar some playlist that you can watch and learn, there is a video called “do you even test? - Cmakel” (or something like that) that you use to add modules to your project. I never tried premake, but whenever o check forum, the results say Cmake is kinda the standard

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

    Good job man. I've been battling the same problems 😅

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

    you can actually draw a hexagon using just 4 triangles

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

      And now I know. Thank you. I only saw it after you commented and I will not be able to unsee it.

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

      I love your youtube handle as well. You live up to it.

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

    Use tuples instead of vectors. Tuples allow you to have a dynamic array that contains multiple types.

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

      Thanks for the tip. I will be sure to include tuples in my analysis once I come back to this in the future vids.

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

      No I don't think this is a good if you want to go with an ECS architecture. You want the components to be stored continuously, for each component type. So going with a single vectors for each component is exactly the right way to go. Then you want to iterate over the components vectors individually when updating the game/simulation state. That way you have the most cash benefits. Code duplication can be avoided with templates. Looking up components can also be implemented with linear or binary search and will probably be fast enough in most cases. Dealing with hash maps brings their own draw back, but I guess it can be done and might be needed in some cases.

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

    Great video, I think there is a way to disable that right-click menu in File Explorer with a registry tweak, I'm not sure though.

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

      I found some github repositories that have an executable to remove that pesky menu later.

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

    your engine looks great, with UI, enemies and everything. Very nice!

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

      The only enemy is me. Thanks though.

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

    Mine is worse ahaha

  • @Sam-rr4ek
    @Sam-rr4ek 7 месяцев назад

    help i am big noob, what programs do i run so i can code in c++ for unreal engine 5

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

    This looks like Silkroad online

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

    I feel your pain. I am currently on my countless'th iteration of ECS for my game. Every time I almost get a Eureka moment, I run into a problem with my ECS system.

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

    I found this video randomly, thanks to the RUclips's algorithm. I wasn't disappointed because I used to be interested in game engines too (and Lineage 2). Nostalgic and educational.