- Видео 11
- Просмотров 51 675
Code Gains
Добавлен 20 июн 2023
I am interested in understanding how modern computing works.
I am very good at cooking spaghetti.
github.com/Code-Gains/DX11-Engine
X (Twitter): code_gains
I am very good at cooking spaghetti.
github.com/Code-Gains/DX11-Engine
X (Twitter): code_gains
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
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....
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.
i know wer u live
Bro keep going i really love your videos im new to C++ and still learning but i enjoy these videos
Love this channel
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...
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.
I love this. Please don't burn out. Take it easy
Thanks. Will do my best not to ❤️
Great to see a new video!
Finally waited for the new video
On the fourth day, God created the sun, the moon and the stars. Were 3 days away from finished product 😄😅
1:07 No way 😭
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
1.69..k subscribers? I'll fix it.
bro created runescape at 7:04 GG
It actually looks similar, now that I look at it
bros doing gains in both Elden ring and game engine.
its worse than scratch, but better than unity :D
I will definitely use your engine when it is available on linux. I use arch btw
I use arch btw
Guess, I'll need to buy the socks then.
💪💻 🤖
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.
Good luck!!
Thanks! Good luck too!
Subscribed because you use C++. Cool project!
Good. Now make it remote controlled.
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??
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.
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**
visual studio is literally just an editor. it doesnt do anything except integrate.
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)
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.
@@Code_Gains cool😎
I never thought to cook my spaghetti code, good thinking!
build.ps1 > build systems
I love this, hope you make something awesome, im trying to do the same thing
🫡
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.
dxvk and proton exists.
@@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.
@@DeuxisWasTakenRunning dx11 games in proton gives near native performance for many games.
@@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.
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.
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?
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).
I know that with rust it reduces build times by a significant about, might be the same for other languages.
@@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.
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).
Nerd
Excited to see where this goes next!
knowledge acquired (IQ inceased +1 total 69)
💪
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 :)
Nice, another guy who loves low level programming². Oh, I'm already a subscriber to your site, I didn't even notice 🤔
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.
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
Good job man. I've been battling the same problems 😅
you can actually draw a hexagon using just 4 triangles
And now I know. Thank you. I only saw it after you commented and I will not be able to unsee it.
I love your youtube handle as well. You live up to it.
Use tuples instead of vectors. Tuples allow you to have a dynamic array that contains multiple types.
Thanks for the tip. I will be sure to include tuples in my analysis once I come back to this in the future vids.
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.
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.
I found some github repositories that have an executable to remove that pesky menu later.
your engine looks great, with UI, enemies and everything. Very nice!
The only enemy is me. Thanks though.
Mine is worse ahaha
help i am big noob, what programs do i run so i can code in c++ for unreal engine 5
This looks like Silkroad online
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.
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.