7:00 they are using bitfields so each :1 is one bit of a single shared uint32, and each group of 8 is one byte of that uint32. It's not to enforce 32 bits per bool, it's probably so that the whole thing can be accessed as one uint32 or 4x uint8 for serialization and deserialization, but individual flags can be accessed without having to do bitwise logic See also, the comment on line 113.
Came here to say this, spot on! The groupings have 8 flags each, and it looks like there are 4 groups, so it's safe to say that they're grouped by the bytes of a `uint32_t`.
its really interesting to see how professionals write code for games, or even just in general. in my head i expect it to be some unnatural voodoo but its so simple, but i suppose that's what makes it good. especially with inheritance ive both seen and written some absolute garbage OOP. personally i find enum/struct/buffer relationships easier to reason about for games though. good video as always :)
What would you reccommend to a person trying to learn from source code? I've gone trough all the basics but I still don't have a clue on how people make all of these complex functions or how they know what they need to make in order to have a game run... I've tried reading Quake source code but I just don't even know where to begin... I'd love to program games one day, I've tried everything but can't even make a simple pop-up. I also want to insanely thank you for your videos, you explain stuff very simply and nicely, they helped me a lot.
Let’s start with this: Understanding the Quake source code in a short time frame can be very difficult even for experienced programmers. So, don’t beat yourself if you couldn’t understand it and remake your own quake game. Now, if you are interested in game development, or any other type of programming for that sake, you need to start with something basic. Want to make a game? Start with a 2D game. Once that’s done, raise the complexity of your task. But your main goal should be mastering the fundamentals, for example you have to learn how to break down the problem properly in smaller achievable tasks. In my video „Want to start coding?“ I provided a link for project based learning, its a huge free collection of resources with small projects. You can also find there how to create a doom like game in C++, its called „486 lines of C++“. It also contains projects in many other languages. I hope this helps and I am glad you like my content!
@Tariq10x Thank you for your reply. I've tried many things but I still struggle to see how basic data types like numbers and strings, arithmetic operations, etc... end up creating stuff like renderers or whatever else. I just don't know how to tackle stuff on my own from scratch, I don't understand the (software design? architecture?) side of things and the problem solving, like how can I use an array for something?
I see. Now, the reality is most people get their inspiration from other projects, so rarely will someone start coding a renderer without knowing how the logic of a renderer works. Creating a renderer from scratch would be a non-trivial task to begin with. First learn how something is supposed to work, look at how other people did it, try to understand their reasoning behind their decisions. And then you can try to recreate it, improve it, or even come with a completely different unorthodox approach on how to solve the problem. This goes for anything. So, don't expect to know how to create a renderer because you know how arrays work. You need to understand how renderers work, and then, how you can make one with the tools you have (programming language, standard libraries, third party libraries). If you have the chance to get a software internship somewhere, I would highly recommend it. The guys at my first internship taught me more about practical software knowledge than my university degree.
7:00 they are using bitfields so each :1 is one bit of a single shared uint32, and each group of 8 is one byte of that uint32. It's not to enforce 32 bits per bool, it's probably so that the whole thing can be accessed as one uint32 or 4x uint8 for serialization and deserialization, but individual flags can be accessed without having to do bitwise logic
See also, the comment on line 113.
Came here to say this, spot on! The groupings have 8 flags each, and it looks like there are 4 groups, so it's safe to say that they're grouped by the bytes of a `uint32_t`.
>tariq
>low gdp country accent
>still sounds german
>potatofication.jpg
not being able to buy a house and talk to women is a pretty accurate simulation of things i wish to do in real life but can only do in gta 😂
Would also be cool to see a class diagram where all of this was designed! Great job 🙂
its really interesting to see how professionals write code for games, or even just in general. in my head i expect it to be some unnatural voodoo but its so simple, but i suppose that's what makes it good. especially with inheritance ive both seen and written some absolute garbage OOP. personally i find enum/struct/buffer relationships easier to reason about for games though. good video as always :)
Got a house, talked to a woman. I must be in game real life. 0:12
Sir, you are in the top 0.00001% of all CS guys.
What would you reccommend to a person trying to learn from source code? I've gone trough all the basics but I still don't have a clue on how people make all of these complex functions or how they know what they need to make in order to have a game run... I've tried reading Quake source code but I just don't even know where to begin... I'd love to program games one day, I've tried everything but can't even make a simple pop-up.
I also want to insanely thank you for your videos, you explain stuff very simply and nicely, they helped me a lot.
Let’s start with this: Understanding the Quake source code in a short time frame can be very difficult even for experienced programmers. So, don’t beat yourself if you couldn’t understand it and remake your own quake game.
Now, if you are interested in game development, or any other type of programming for that sake, you need to start with something basic. Want to make a game? Start with a 2D game. Once that’s done, raise the complexity of your task. But your main goal should be mastering the fundamentals, for example you have to learn how to break down the problem properly in smaller achievable tasks. In my video „Want to start coding?“ I provided a link for project based learning, its a huge free collection of resources with small projects. You can also find there how to create a doom like game in C++, its called „486 lines of C++“. It also contains projects in many other languages. I hope this helps and I am glad you like my content!
@Tariq10x Thank you for your reply. I've tried many things but I still struggle to see how basic data types like numbers and strings, arithmetic operations, etc... end up creating stuff like renderers or whatever else. I just don't know how to tackle stuff on my own from scratch, I don't understand the (software design? architecture?) side of things and the problem solving, like how can I use an array for something?
I see. Now, the reality is most people get their inspiration from other projects, so rarely will someone start coding a renderer without knowing how the logic of a renderer works. Creating a renderer from scratch would be a non-trivial task to begin with. First learn how something is supposed to work, look at how other people did it, try to understand their reasoning behind their decisions. And then you can try to recreate it, improve it, or even come with a completely different unorthodox approach on how to solve the problem. This goes for anything. So, don't expect to know how to create a renderer because you know how arrays work. You need to understand how renderers work, and then, how you can make one with the tools you have (programming language, standard libraries, third party libraries).
If you have the chance to get a software internship somewhere, I would highly recommend it. The guys at my first internship taught me more about practical software knowledge than my university degree.
Inheritance? Why does everyone have an inheritance fetish?
Great video !
Still waiting video like this to Official GTA V Source Code :(
What does it say about me, watching a low gdp country guy explaining some code to me I will never look at 😅.
Enjoyed that. Keep it up
What do you mean when you said " Only and Only for educational purposes, what were you thinking we would do ? "
777 Views, ❤