C# GAME ENGINE BY 16-YEAR-OLD! // Code Review

preview_player
Показать описание


Chapters:
----------------
0:00 - Something different today
7:00 - Nullable reference types
11:49 - Application overview and architecture
27:58 - Renderer architecture
33:45 - A better way to handle environment maps
36:08 - More renderer suggestions
40:00 - Render passes
42:56 - Hey wait, that's my bloom!
45:40 - The other shaders
48:18 - Final thoughts

This video is sponsored by Brilliant.

#CodeReview
Рекомендации по теме
Комментарии
Автор

One question mark broke Cherno for like 10 minutes.

TechRevi
Автор

Every time a video like this is uploaded I feel dangerously stupid.

asmrtv
Автор

Those new non-nullable features are actually a big thing and most modern programming languages are moving towards approaches like this. For example Kotlin, Dart, Typescript. They all work like this, where everything is considered non-nullable until you specifically say its nullable. This is really helpful, because most of the cases you don't need things to be nullable and in the cases you do need them to be nullable, the compiler helps you checking if its null or not before doing operations on it. Also when you do stuff like if (variable != null) {, inside the block after the if, the variable gets promoted and the compiler automatically considers it to be non-nullable, which is just amazing

LRAnimations
Автор

45:00 the moment cherno realised it's his code.
Thanks Sam 🤣 for the code.
*insert Spiderman meme*

tanmaypanadi
Автор

Since you asked about C#, I would be interested to see you talk about your C# scripting integration in Hazel

rpfake
Автор

Im one of the maintainers of OpenTK, and it is really interesting to watch through someone critiquing a project made using a library i have helped so much.

I have spent way more time developing opentk itself than making products with it. So very interesting watch.

frederikja
Автор

C#'s new nullable (which needs to be explicitly enabled) is really nice. Especially for large codebases, you no longer need to check for null in every method that receives a class as argument unless its an Optional (? postfix) type.

ironnoriboi
Автор

Rendering architecture was probably the biggest hurdle after figuring out OpenGL so would definitely be a helpful video for a lot of people!

QckSGaming
Автор

I really enjoyed seeing a dive into a C# renderer and the critiques of the architecture.
It would be great if you made a video about basic openGL rendering architecture like you mentioned.

asherhaun
Автор

I wasn’t sure about the nullability improvement in C#8 but after using it for a few years I’ve became a fan. It forces you to think a lot more about the code you’re writing and you can change the compiler settings to force a compile failure when there is a potential null reference exception. It came after some statistics were released that said something like 80% of all exceptions in C# are null reference exceptions.
But if you don’t like it, you can always turn it off and choose not to use it.

scottwalker
Автор

I was a part of the discussion where Sam helped garlfin with the bloom and he did make it clear that this was your code but slightly modified for better names for garlfin to understand.
He didn't mean to steal your code just saying :D

voxelrifts
Автор

The null-able opt-in is a tad useless in your case but if you declare something as not null then it forces you to set in the constructor. Which is really handy in c# especially when dealing with DI..

ianknowles
Автор

Being mainly a C# programmer myself I'd love to see more C# videos but I would like to see a bunch of other languages too. Also I think the diagram thing you were thinking of was a dependency graph? Its a feature only available I think in the professional or enterprise versions.

TizzyT
Автор

I particularly prefer the C++ reviews, but once in a while is good to have other languages. Awesome review!

rafaeldeconde
Автор

16:52 I'm pretty sure you _can_ start your variables with _ in C++, or at least MSVC supports it

lukefidalgo
Автор

I started watching your channel in learning computer graphics and a bit of interest of C++ programming but I'm mainly geared towards C#. Because of it, I'd love to see more C# code reviews as well!

nitrous
Автор

As mentioned in previous comments, in this case in the code the nullable reference type didn't really mean much and really didn't need to be there. But the feature is a great feature to have turned on in projects. There is actually stories of major libraries turning it on and actually finding bugs that they never knew were there because the compiler could actually tell you that "hey this could be null." Most modern languages are implementing things like this. NULL is something most languages are really trying to force out of the language now. I recently just wrote a library for something at work with the feature turned on and it really helped me out a lot.

I am learning Swift and it's similar, and I love it. I've yet to actually run into a null pointer exception because the compiler will really force you to think about "are you sure you want to do this...I could be null."

chadwad
Автор

I’d love it if you made a rendering architecture video! I’ve been trying to figure out how to use OpenGL in my free time, and been stumped by how to make it more abstract and less hard coded. Right now I just have it hard coded directly in the main loop (really bad design) because I’m using C and have no idea what sort of structures to make to make it work. Am I supposed to make stuff global, and if not, what? Malloc meshes and point to them in an global or static array? Having a tutorial or explanation of how to make a better and more expandable system would be epic!

iaobardar
Автор

I see a big problem with this ECS implementation, since Component is a class, we can not controll where his objects will be instantiated, even when we have a List<Component> behind the hood what we have is just a list of references, the true objects will be spread in the application memory.

ruannilton
Автор

@ 7:33 The NRT feature was introduced in C# 8 to *basically* protect developers from making null reference exceptions.

bity-bite