Pull Requests | Game Engine series
The Cherno
·
Intermediate
·7y ago
Key Takeaways
The Cherno demonstrates the use of GitHub for version control and collaboration, explaining pull requests and their importance in software engineering, while working on the Hazel game engine repository.
Full Transcript
Hey look guys my name is trying to welcome back to my game engine series so last time we took a look at github and hazel and how all that kind of work definitely check out that video if you haven't already because today we're actually gonna be continuing on with the whole github thing and taking a look at pull requests and apart from just taking a look at them and integrating some of them today we're also going to discuss how in the future you should collaborate vehicle requests so I think this is like a really useful topic for everyone it's also gonna be very useful outside of hazel because if you're working with github if you're working with kind of teams of people that you're using get an advisor it doesn't really matter what version control system you're really using pull requests and just that whole notion of being able to kind of you know create code as a team and then merge it together and all that and you know break off into your own feature branches or bug fix branches or anything like anything like that really vital for software engineering in general I tend to make a lot of videos on the technicalities of actually writing code but then I realize that a lot of people ask me well how does this work if I'm in a team right if I'm in a team of people and we're all working on the same thing how does this work because all of my videos I'm kind of the only one really working on them and so because of that I don't and because I'm teaching you guys like a specific thing I'm not spending too much time being like well if this was more in a team environment and which did this or that so I'm gonna spend a little bit of time kind of talking about that today as well but hopefully we can just kind of sort through these pull requests we have 7 open full requests other right now don't forget the repository for hazel is in the description of every video definitely check that out if you have code that you want to change or if you notice that I make a mistake and you want to fix it or you want to go ahead and just add something that you think is useful then definitely open a pull request or an issue because at the very least we'll discuss this and the community we'll discuss this with you and then that way you can kind of get to grips with them with just you know the whole software engineering workflow and how we can pull this project together so I'm really excited for all that let's take a look at pull requests so we have seven pull requests this is the hazel repository of course is what it looks like read me wise I'm going to add a readme very very soon and this will have information on how to open pull requests because there's there's a really things that you want to have why do we have two branches what's this it's the first time I'm noticing this to be honest I have no idea what that is 9th of December anyway whatever and so we have we have this raid me file here which will contain information on things like how to build hazel and how to submit pull requests and how to submit issues and just information about general collaboration so that is usually a place and github where you would put such information I haven't done that yet but I will but for now you can see that we have es6 issues and a bunch of pull requests and some of these you can say it is coming in pretty frequently and usually I will kind of read these offline because obviously you know every week we get more and more of these and I can't make an episode every week at least not at this point where I can just go through everything if that's something that you guys want to see at some point I I'm telling you right now it's not gonna happen every week but maybe every month or every two weeks or something like that if you guys just want me to make a video where I'm like okay let's just filter through all these issues and pull requests then I can probably do that but but but in general I just you know what I'm just on the train or something and I have a spare moment I'll look at this on my phone and just reply and just you know kind of kind of keep that discussion going so that's how I kind of handle this stuff right now because obviously I don't really have the time to sit down at a computer and do all this stuff because my life is just hectic anyway so pull requests this is what we're looking at today so let's start from the beginning we've actually got six of them closed already I believe I like even for this one use unique pointers instead of raw pointers yeah like you can see that I responded to this two thumbs down anyway I responded to this quite a while ago actually and I even gave some examples and I you know gave some reasoning as to why I decided to do what I did a certain way so you know you know this is like a pull request that actually doesn't even seem to do any okay so it does I don't know why the file changes there but maybe that barrage has been closed already it doesn't matter the point is this is kind of the spirit of pull request right like you know you know done this and that obviously could have opened an issue instead and asked if this was reasonable to do or if that's the direction we're going in but this is also fine I don't mind doing something like this and then you can see that people just jump in and we have a discussion going and then if I you know don't like something or if I want to discuss it further then I will kind of you know do this and I mean I even like linked to the CBP reference and stuff in certain cases so it's kind of a good exam kind of like s lesson for everyone not actually like lesson like I'm not trying to be like my way is the correct way it's more or less than in terms of like some aspects of this that people might not have thought about it's educational for everyone to kind of just jump into this discussion and participate so I like it when people do that a lot because these six different people but I said in this one specifically and then I didn't even close you know in the pull request so it's not like I'm just like BAM done that's it closed no the original poster close the pull request once I guess they were satisfied that that's fine so again this is really good for those of you who doesn't you actually want to learn how to be on a team and ride a mansion and all of that instead of just watching the videos and copying down the code and trying to do everything yourself jump into this seriously it's really cool it's solid it's gonna give you much more of a team kind of experience and yeah I mean I'm I'm here to just help you guys out and and again there's gonna be so many cases of you guys being like hey Cho know you're completely wrong in this this is the right way to do it or this is a better way to do it I'll be like oh man like thank you so much for showing me I'm not gonna be like oh how dare you like the worst thing about this software engineering community this kind of programming community a lot of the times is that people just get very very like superior and just refuse to listen to everyone else and think everyone's beneath them I'm definitely not one of those people I hate those people to be honest and I wish that they would be better but the point is this is like a safe space like I mean I'm gonna learn a lot throughout this series so you guys let's build this thing together in a nice friendly environment yeah okay so anyway that was just kind of an example of what we can kind of do so or like how pull requests in general are done so anyway I'd see my support of the project this one's huge I don't know fault if I'll tend to this one today because it's got 717 participants and I did I think I think I did reply to this at some point well even guest in his a administrator or my discord replied to this and said that I'm using premake instead of seeming I mean it's kind of redundant and there's a lot of other stuff here but you can see this hasn't been closed yet so there's stuff for me even four days ago and you know he is pretty big so yeah I'm not sure about this I might I'll keep that open for now and it was the very first issue as well which is a very fast pull request which is interesting so he able to go to that okay add Linux support of the project that's quite um ambitious I guess I'm not sure how up-to-date this is um you can see it's got conflicts which means it's not up to date but so that is support for Linux Primack file change Beauvoir to fix the compiler error yeah I mean like I'm obviously I'm happy for like this to be I'm not sure why the same because yeah so like sudden okay sure [Music] can you please update this branch and make sure it's ready to merge and I'd be keen to merge this in and I'll even add a smiley face that's very either a slightly smiling face yes I don't want to be like full unhappy yet but I'll just yeah okay done say you said like this is you know let's do this okay I replace compiler flags with pre make properties so I have two pretty big file with properties the runtime library yes so I think I've already done that I believe so because I think what the thing here was that yeah back when we used MDD and all of that stuff I believe that right now if we look at the pre make file I believe we're not doing that anymore right um yes we're doing wrong time and we're not doing like you know /m DD or about that um the reason I had to check by the way it's not because I'm that stupid that I can't remember what we didn't want we did and just sometimes like I mean I have a hazel development branch this access like accessible to patrons where I do a lot of this kind of development stuff and sometimes I don't remember what I've done kind of for that development branch all of the stuff that I've actually done live in a video so that's why sometimes I just need to double check okay anyway um so this this has been done recently not in there I'll just say obsolete thanks for the suggestion okay cool so there we go start project now I think this is something that I want to do what was that pretty big pile because we don't have a start project I know that there's a pre make flag for that it's called stock project so that looks really good at a star project let's thumbs that up it's not a lot like Universal no really I don't really find that I don't I don't see the exactly this is good look at this little discussion people are having a nice discussion about maybe making this one line of code better like that's fantastic so really good obviously in this case what I need to do that and we can't even do that because yeah it's pretty clear anyway to just mix them boxes start a project I'm happy with that I'm gonna measure sin right now so the merge pull request oh yeah I don't like the this is the title of the of the merge isn't it I'm sure I like this that much but yeah I guess github just likes doing in that way so we'll just merge that in okay that's now merged if you go to the code in github you can see that my latest commit was a merge pull request I'm 22 seconds ago if we look at the commits here as well you can see that there's that commit so now this person is also contributed to hazel which is really cool and also we get the you know we get this code done so I can now kind of pull that verified okay whatever I don't know what that even means but anyway I can now obviously pull the changes into my local depository and I'm happy that they're so I'm not even sure you guys had to do that so um just in case you're unaware so all I need to do now is just pull I don't know if I've got any kind of stuff I probably do have on track stuff I don't know why I do actually ah this is just uh did I not commit this maybe I didn't commit this no I must not have committed this I asked fantastic okay sometimes I forget to communicate as well I really need to propose to promote on my monitor so that I can commit stuff but let's just commit that stuff now so what do we need that and that I think that's it right what else is left don't need that okay well I mean we might as well commit this actually so what do we do we added what was that in court of H we had so if if debug is on and I might actually the first thing on my right the message is what we did regarding the static library so we now link the dynamic library instead of well I like to get my community just pretty accurate so you'll see this live and it's just called the runtime libraries in it yeah multi-threaded do DLL now linking runtime library dynamically and define that okay yeah git push well we also need to pull I wish I pulled fast it doesn't matter we've committed it it should be a easy match and then I can also push so just get that done it's like cool you guys are saving me do some stuff live here which is pretty cool anyway now that's done yeah if we refresh this repository we should see this and it probably had to merge yeah I did a little did a little merge because I ended up committing before I pulled the latest match that we did so that was a little bit of fun there but anyway that's done now cool that's close obviously next one dependencies in a solution folder I grouped all the dependencies together in a solution folder for Less cluttering that's awesome I was One Ring for a long time how to do that I guess you just put it into a group yeah I really like that I'll definitely be using groups more often but in general this is good so this is just um adding a new line at the end of the file that's fine yeah that that's pretty good I like that so I'm going to merge that [Music] no I can't okay cool I can't because I just updated pretty much the primary file myself okay fixed build fairly first time now first check for digital very fault okay cool actually if not exist yeah that's good that's a good idea there was also another one I think which was related spam not sure which one's better there's personal command for hazel project modified this one show that X copy will nor the document who is a folder on a file so I'm not sure but this it was referenced so I'm not sure why like why was this ref like he referenced this right so what does that mean exactly oh that's a different one sorry that's number nine this is 21 okay so there's been a few I mean this what is this dude this this just splits it up so this is instead of one argument it's true but I'm not sure if that like does that fix it okay let's let's quickly report this so we have so the idea is we can delete bin and then if we try and build soundbox it will fail the first time because the folder doesn't doesn't exist yet so let's see if we can actually fix this right now because yeah that's really annoying I agree okay so there it is it's failed over here I hate all of this all of these warnings we really need to suppress them else online because I think that things are that fine I think that they just need to be surprised but anyway okay so where's the arrow there it is so command blah blah failed so let's try let's try do this instead so I'm just gonna copy this and then go to the Premack file and there it is paste this instead and then we need to what do we need to do to go back here when he still like bin we should regenerate the projects I'm able to test our partner for his scope should be one space oh okay well maybe I shouldn't have merged them project sandbox why was that a failure okay this brings me to another point obviously ideally you should definitely test the pull request before you actually merge them in I have a feeling that because this was automatically merged it so it was done before hazel start project sandbox that's interesting I'm not sure maybe needs to be done after but I'm not sure I mean obviously like I imagined that this guy tested it but we can let's just run that again unable set start project and project scope should be like okay so it's in a project scope ask well because we've included this stuff okay cool so this needs to be done in the workspace start so it maybe I'll do it up here so let's try this again okay there we go so we'll move it then that makes sense because you immediately see the start approaching the architecture everything's fine okay cool so now we've done that we'll make sure that in case there's no bin folder let's try and build sandbox and let's see if it fails again I'm not sure if it will no it didn't really built very quickly there let's delete this and let's try again I don't buy it okay there we go that's exceeded okay cool so splitting up the file was really the solution the reason I like that better so okay that's brilliant so the reason I like this a lot better than the other one like cuz this this is more code right so this has to do more it has is doing if not exist blah blah but this is like it's this is literally just like a couple extra characters just splitting up the path into the folder and the actual like it into the directory and the file which is really good is it having like one big path so I'm really happy with that I think that's a lot better actually I don't even know it like because that's the first argument then we have the another path were copying from I guess from and then we're into semo's I don't know anyway well the point is splitting it up into into two arguments that seems to fix it I really like this fix so I'm going to I'm going to do my classic plays update this so I can imagine because I could commit it myself but I kind of want to give this guy credit for doing it because yeah this was an issue that's been bothering me for ages so we'll give him a chance to fix it we'll give him like a couple days to update it and then also one thing I want to do is this I will say that sir Oh blah blah okay cool so this is the one that solution plan change provision number nine how do I reference another issue oh here we go okay I have that links properly it should I don't know if it wants a space there but whatever okay cool so close and comment and then that's obviously I referenced this and okay cool so there we go that's everything done I'm really glad we did that because we fixed up the startup project we fixed that folder thing copying and what else did we do I think that was about it but anyway I kind of took you guys through the whole workflow so now that we have we promoted or addressed everything there's kind of an ongoing discussion but I think I'll close eventually because see make I don't think I'm still not sure if she makes portrait ever be a thing and hazel just because pre make assists and also pre Mac I think can generate see make files anyway so I know pretty much a thousand times better than say making my opinion anyway Linux support again I'd be happy to kind of make sure that works but I want to probably test that on a Linux VM or something first and then everything else we've addressed so that's all the pull requests hope that kind of makes sense as far as opening pull requests really easy all you have to do is kind of fork hazel right so you can fork it into your own kind of into your own account and then once you've done that you can you can do what you want in a branch or just in your master in kind of your copy of the repository and then once you once you have done that you can just go to pull request you pull request and then you can merge you know your copy into my copy right and that's it and this will show you all the different as one might say really smooth is the idea anyway doesn't matter you guys won't get that jerk but the point is you can kind of create that merge that in and you can say that's kind of how it works I will once I do update that readme file I will have more or less like a better kind of like a format for like how you should structure your messages and what information you should provide here because right now it's kind of just like you know write whatever but I would like that to be more structured in the future but yeah that's about it hope that made sense alright so that is pull requests in github you can see how helpful that is and how we could kind of just for now it's really like small changes small fixes because there isn't too much to hazel to begin with but once we have you know massive massive like amount of code and our code base is just huge there'll be so many things here and there that people can improve and fix and implement as well so pull requests obviously going into the future if we can kind of start ramping that up like as it is right now that's perfect we can establish it we can make sure that people are comfortable with that because in the future that's gonna be really important I hope you guys enjoyed this video if you did even hit that like button you can also help support the series by going over to patreon icon for slash the churner huge thank you as always to all the patrons that make this series possible do you guys support there you'll get videos a week early as well as access to that private hazel development repository where you can see like all the code that I've done which is far more ahead of this kind of repository so that's really cool and a little kind of thank you for helping to support this series um next time I think we're gonna probably move on with actual hazel development one thing that I wanted to do for a while is like input and key codes and stuff like that so we can kind of do that yeah we'll probably end up doing that I think so until next time goodbye [Music] you [Music]
Original Description
Patreon ► https://patreon.com/thecherno
GitHub repository ► https://github.com/TheCherno/Hazel
Instagram ► https://instagram.com/thecherno
Twitter ► https://twitter.com/thecherno
Discord ► https://thecherno.com/discord
Series Playlist ► https://thecherno.com/engine
Gear I use:
-----------------
BEST laptop for programming! ► http://geni.us/pakTES
My FAVOURITE keyboard for programming! ► http://geni.us/zNhB
FAVOURITE monitors for programming! ► http://geni.us/Ig6KBq
MAIN Camera ► http://geni.us/t6xyDRO
MAIN Lens ► http://geni.us/xGoDWT
Second Camera ► http://geni.us/CYUQ
Microphone ► http://geni.us/wqO6g7K
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from The Cherno · The Cherno · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
3D Game Programming - Episode 1 - Window
The Cherno
3D Game Programming - Episode 2 - Game Loop
The Cherno
3D Game Programming - Episode 3 - Arrays
The Cherno
3D Game Programming - Episode 4 - Drawing Pixels!
The Cherno
3D Game Programming - Episode 4.5 - How Rendering Works
The Cherno
3D Game Programming - Episode 5 - Playing with Pixels!
The Cherno
3D Game Programming - Episode 6 - Performance Boosting
The Cherno
3D Game Programming - Episode 7 - FPS Counter
The Cherno
3D Game Programming - Episode 8 - Alpha Support and More
The Cherno
3D Game Programming - Episode 9 - Beginning 3D
The Cherno
3D Game Programming - Episode 10 - Floors and Animation
The Cherno
3D Game Programming - Episode 11 - Rotation
The Cherno
3D Game Programming - Episode 12 - User Input
The Cherno
3D Game Programming - Episode 13 - Render Distance Limiter!
The Cherno
3D Game Programming - Episode 14 - Basic Mouse Movement
The Cherno
3D Game Programming - Episode 15 - Textures + More!
The Cherno
3D Game Programming - Episode 16 - Walking, Crouching, Sprinting + More
The Cherno
3D Game Programming - Episode 16.5 - Exporting Runnable Jars
The Cherno
3D Game Programming - Episode 17 - Small Adjustments + Birthday!
The Cherno
3D Game Programming - Episode 17.5 - Creating an Applet
The Cherno
3D Game Programming - Episode 18 - The Beginning of Walls
The Cherno
3D Game Programming - Episode 18.1 - A Few More Things
The Cherno
Episode 18.5 - Creating an EXE File in Java
The Cherno
3D Game Programming - Episode 19 - Rendering Walls
The Cherno
3D Game Programming - Episode 20 - Continuing Walls, Fixing Bugs, and Managing Crashes
The Cherno
3D Game Programming - Episode 21 - Texturing Walls, Fixing Clipping, and Fixing the Mouse
The Cherno
3D Game Programming - Episode 22 - Random Level Generator + Properly Fixing Clipping
The Cherno
3D Game Programming - Episode 23 - Graphical User Interface (GUI) Launcher
The Cherno
3D Game Programming - Episode 24 - Making Our Launcher Work
The Cherno
3D Game Programming - Episode 25 - Writing and Reading Files
The Cherno
3D Game Programming - Episode 26 - Custom Resolutions
The Cherno
3D Game Programming - Episode 27 - Decorating the Launcher
The Cherno
3D Game Programming - Episode 28 - Continuing our Custom Launcher!
The Cherno
3D Game Programming - Episode 29 - Launching The Game
The Cherno
3D Game Programming - Episode 30 - Colour Processing In-Depth
The Cherno
3D Game Programming - Episode 31 - Sprites!
The Cherno
3D Game Programming - Episode 32 - Sprite Mapping
The Cherno
3D Game Programming - Episode 33 - High Resolution Rendering
The Cherno
3D Game Programming - Episode 34 - Entities
The Cherno
Genesis - My Game for Ludum Dare 24
The Cherno
Vlog + Ludum Dare Results
The Cherno
Game Programming - Episode 1 - Resolution
The Cherno
Game Programming - Episode 2 - Threads
The Cherno
Game Programming - Episode 3 - Game Loop
The Cherno
Game Programming - Episode 4 - Window
The Cherno
Episode 5 - Buffer Strategy
The Cherno
Game Programming - Episode 6 - Graphics Initialized
The Cherno
Game Programming - Episode 7 - Buffered Image and Rasters
The Cherno
Game Programming - Episode 8 - The Screen Class
The Cherno
Game Programming - Episode 9 - Rendering Pixels
The Cherno
Game Programming - Episode 10 - Clearing the Screen
The Cherno
Game Programming - Episode 11 - "Out of Bounds, Baby!"
The Cherno
Game Programming - Episode 12 - Negative Bounds
The Cherno
Game Programming - Episode 13 - Timer
The Cherno
Game Programming - Episode 14 - FPS Counter
The Cherno
Episode 15 - Tiles
The Cherno
Game Programming - Episode 16 - The Map
The Cherno
The Walls 2 - Minecraft PvP Survival Map
The Cherno
Game Programming - Episode 17 - Key Input
The Cherno
Game Programming - Episode 18 - Controlling The Map
The Cherno
More on: PM Basics
View skill →
🎓
Tutor Explanation
DeepCamp AI