Unity game pair programming - Let's code - FunFunFunction #53
Skills:
AI Pair Programming90%
Key Takeaways
Implements a new feature in a Unity game using pair programming
Full Transcript
good Monday morning yeah yay uh hello uh it's actually morning for you uh for me it's not actually actually morning when I'm recording this but for you it's actually what yeah uh Saturday morning but uh to be fair it is uh more like Saturday lunch time now so we're doing a special episode today uh uh we are doing a pair programming episode of a unity game yes clone drone in the danger zone it's the new game that I just made yeah uh I guess that we should start by telling the audience a bit about you uh sure let's do that uh so hello uh audience uh my name is uh Eric Ryman um I am an independent uh game developer uh and I just launched the game clone drone in the Danger Zone on uh it. um and I've been working on the game since uh maybe April uh I'm still kind of working on it and uh adding more features so uh that's what we're going to do today uh to make it more awesome and uh I've known Matias for uh a very long time uh since we were little little kids uh doing theater and acting the we started our first um first company together uh yes that's kind of how we knew each other when we were 177 18 or something and we started this web Consulting agency yeah it was pretty cool uh or I guess it wasn't that cool but uh we learned a lot from it yeah that's true yeah fair enough yeah cool was was a very strong word for what we were yeah but but it was great fun absolutely absolutely it actually uh cool story uh we've done this before uh remote pair programming I think Matias is the only person I've ever done that with uh it doesn't come up very often um but yeah we did that for uh like our second company together uh fat statement yeah that's right where we built this uh website together in much the same way we're gonna uh work now so uh I'm really looking forward to it I know uh it's it's a lot of fun to do it when it when it works so we spent like the last two hours doing like an enormous amount of setup uh TI uh I had some Wi-Fi trouble we uh we mixed up time zones and there were some uh trouble getting the uh project running and all that kind of stuff uh so programming plus video production is a really good way of having everything break in every conceivable way possible yeah but on the positive side uh it took us a lot less time to do that than if uh one of us were to fly across the Atlantic and sit next to each other so uh I think overall it's a it's a net gain all right so what is the uh what is the plan here perhaps I should just demonstrate the game first yep sounds good so this is this is Unity I have worked a little bit uh in unity it's a pretty daunting interface but it's it's generally easy to work with h and I just I'm just going to hit play here over here and that should start the game uh okay it's whoop yes and I click play and robot is constructed turn you turn the sound up to like 10% or something so people get a hint of of what's Happening maybe oh that's going to be tricky because I'm not recording the sound from the h all right that that's way complicated for me okay never mind the sound is really good you can can take my take my word for it this is an awesome game this is hilarious uh and the thing with this game is that uh uh so the if you notied that I've cut off this uh guy's leg uh so you like do this partial uh partial destruction of the robots so they don't they don't have any hit points right mhm yeah that's right so how one point so how do they die so basically um it's a really cool thing actually I'm using voxel to dynamically kind of change the model uh as you cut it so as you can see now yeah you can cut it like anywhere which means that uh it really respects where your uh sword hits so you can cut off like a part of a shoulder doing absolutely no uh damage to the robot at all in like a meaningful gameplay way or you can land a shot that like cuts it in half uh through the spine or the neck or you know diagonally like uh and it kind of just figures out uh how to sever the robot um so basically uh the rules for if you win or not is if you uh hit the head uh the robot dies if you s the head or a body part connected to the head like the Torso uh you also die um you can also cut off like both arms you die because now the robot can't uh attack you uh and yeah that's pretty much uh that's pretty much it in terms of uh how that works can you talk a little bit about uh what voxels are because I don't think that most people know that right so uh sure so I mean a boxel is essentially uh most people know what pixels are right like they are the little uh the little things on the screen that together uh form an image like where the color shifts uh from one to the next uh so voxal are kind of like that but in 3D uh basically if you imagine uh a lot of little cubes sitting uh next to each other uh with uh inside like a coordinate system so uh that's kind of then you have a pretty good idea uh what voxos are so for this robot for example um there's a lot there's a lot of information stored uh about like like the model representation isn't like how you would normally uh store a 3D object saying oh these are like the corners uh like that together form uh the shape uh it's more saying things like on this coordinate uh there there is something there and it is yellow uh in the case of this robot you see fighting right now for example uh like actually Matos if you pause the game uh we can I can you can like highlight a thing and maybe dig into it a little bit um like if you go and select the player hang on I'm gonna there all right there you go there you go okay or this guy okay so how do I how do I oh I did this bug we found a bug where you have to fix it by maximizing and then un maximizing it again it's terrible Unity yeah so if you go to uh world yes uh and then if you collapse Arena final uh because they taking up all the space and uh or actually it might be interesting go to level specific World route uh which is like above World um oh okay world yeah yeah there you go so here here are like all the objects that are currently Associated just with this level uh that we have right now uh so if you click on one of the separate body parts um like uh yeah and then double click it and that will go to it uh in the scene view let's see double click oh in the scene view I need to go all right let's see oh yeah okay so yeah here you can see here's a body part so um I guess there's no easy way to visualize it but uh yeah if you dig into this guy a little bit like how it's built up you can see that there is a uh a volume so this volume has two voxels in it uh it has a white voxel and a blue voxel uh and that's how it's stored in memory right now that's what the game uh knows about this uh about this uh this arm piece um and then there is a uh I'm using a program called called PAB boxal to take this information and uh render it into a mesh to make it into a mesh that is uh rendered in in 3D uh from the kind of more basic representation of just like oh there are this is what makes up the model and then on top of that there's a thing that um connects uh this kind of mesh with uh the lower arm and the hand and all the other things um and that's more of a custom Unity thing that I've written to store information about how the models are connected to uh one another in a way that makes it so if you sever one of them it knows like okay who is uh who are my children essentially like if I'm the upper arm uh and I get cut off I know that I also need to cut off the lower arm as part of me so uh and that's how you kind of get this super Dynamic it looks like there's like really cool physics uh system with connections but it's actually pretty simple in terms of how it fits together sweet not not sure if that made any sense but there's a a taste for you yeah it I think it gives the game a really really satisfying touch because you can actually chop people the the robots off into little it's kind of like destroying Lego figures uh and it just makes it it makes it super satisfying to kill things I really like it it also makes it really fun you can play with uh you know you can play with damaging people in ways that actually deforms them like uh later on there's a spider for example that has really long legs and it doesn't die if you just cut like if you just cut the legs you have to cut the head off the spider um but you have to start with cutting the legs uh in order to uh be able to work your way to the Tuda head so it opens up all kinds of interesting gameplay that I don't think has uh been seen before a lot so uh so that's been really interesting to play with so what is it that we uh we're going to do today because we we you have arranged a task for us for me to do because I am I am doing the coding on your game so this is the first also the first time that somebody else touches your code base right yes I picked a task that I think will be uh small enough that we can actually see uh completed in a meaningful amount of time a small amount of time and see uh See a change in the game so one of the things that people uh request a lot uh is to be able to Sprint to move uh faster oh you lost Matias yes yes you yep oh well oh that happens so yes we're gonna Implement sprinting uh it's gonna work a little bit like uh you hold down shift uh in order to uh move faster uh and while you do that there's there's like uh the concept of energy uh in the game you can see it at the on the screen right now at the bottom of the uh the game screen there's like a not enough energy and there's like a bar down there um and that and the sprinting will uh consume that energy now um as to the design of of sprinting like how will it actually work in the game you might have noticed the player has this uh thing on their back which is shaped a little bit like a jetpack uh I kind of put that in early on in the game but didn't get a chance to do anything with it so how I Envision it will work is you uh you activate sprinting and uh the jetpack engages and pushes the player forward uh in a in like a straight line um so there are a few different ways um that this could work um like you could fly up into the air while doing it or you could stick to the ground um you can hold down uh shift and it will Sprint for the duration and like stop sprinting immediately when you release it or you can trigger it and it will do it for a set amount of time uh I'm not exactly sure which of these versions uh makes the most sense so I think uh one thing you have to do in game development all the time is to just try it uh and that's kind of what we we're going to do today because all of these kind of variants are you know very they're kind of small um and but it's important to experiment and try it to figure out which one of these Banks feels the best and is the least confusing and the easiest to control uh for the player um so that's a thing that we have to that we have to play with cool so which uh which variant is the first one that we're going to try what don't we just try uh you hold on shift and that increases that that propels you forward and when you release shift that stops propelling you forward that seems very simple and will uh will force us to build uh the basics of uh of this ability as well and get some stuff into place for it sweet all right so uh Where Do We Begin let's see so I think we're gonna probably have to see what makes sense here uh we're gonna have to delve into uh a class called uh firsters uh first person controller or is that what it's called I'm getting if you start typing first person you will find it first person mover ah first person controller is one of one of these uh standard Unity classes so this was probably one of the first classes I created in the project um and what it is it's basically controlling um it's controlling any character in the game that has two legs two arms and possibly a sword or a bow okay uh which is most of the enemies so not the spider the spider is another class and so on but it's kind of long uh the class uh and it controls uh yeah kind of controls most of the players's movement and uh status so on so yeah why don't we open it up and mon develop and uh we can have a look at it first person mover so I just double click first person mover that's right that should open develop okay cool uh all right C I have not done C for think 10 years probably it was my first programming language uh or technically PHP was uh my my first programm language but but PHP is not so much a language as it is uh sort of a of yeah collection of garbage that you kind of massage and copy around and eventually uh you know you can make things yeah the computer do something with it but yeah it's sort of like a very yeah no PHP is it's it's it's very uh uh very useful language you can say that yeah it's shouldn't shouldn't uh dis too much it is very easy to uh just like slap something together in but uh I don't know you can you can let's not get into that whole thing that's we're building a game here and we using cop yep okay uh cool so as you can see I think this is like 1,400 lines long or something this class so maybe we don't have to go through all of it in before we start tching it h it's a it's a little it's a little under abstracted I would say um right now but the flip side of that is that hopefully most individual parts of it will be pretty straightforward in terms of uh understanding them and and what they do yeah um let's see it might be uh maybe uh it would be um as an example to kind of get you up to speed with how how it's structured if you search for a jump in it that's a kind of a similar thing that's less complicated uh than than what we envisioned for sprinting but this is kind of how jumping Works uh in the game yeah you can see there's a it's jumping uh let's people know if we're jumping or not stored in a private variable uh and right now I believe you are in the update Loop where basically this is executed uh every frame uh and it checks for uh conditions and and dust stuff so here this is a very common uh pattern in game programming right uh everything runs in this uh this update Loop all the time right I mean um yeah it's uh it's like each individual object typically has its own update Loop where it uh yeah it kind of uh keeps track of uh State and uh and modifies it um like if you look at projectile for example that's much simpler example of how a typical class might be structured that's smaller it's not in this class it's like a different class um somewhere if you do command shift d I believe opens a new if you just want to search for it and mon develop command shift oh no no yes yes yeah start typing projectile believe you will find that guy yeah try check out that guy very this is like a much simpler class for example um I guess it was actually a lot bigger than I imagine but well it's 200 lines okay never mind but it oh yeah here's an update it's like does stuff like oh yeah increase the trans you know the position uh each update uh it's like just things like oh hey uh keeps track of where the player is and if we're near the player we like whoosh make a whoosing sound for dramatic effect and so on yeah sorry it's a bad example and also should probably you'd be using fixed update instead of update but we're gonna just ignore that completely for now that's not important okay great sweet uh okay back right okay so let's start uh looking at jump again just to kind of give you a sense so um yep there's stuff about uh what oh yeah I guess it has all you can just ignore this this is some special Casey kind of stuff um yep so when you land on the floor it checks like oh hey I was jumping stop jumping now uh and you can see that uh the character model here um this is kind of setting the uh some properties on the animator um so this is kind of a thing in terms of like animating the character uh typically you could either say uh play this animation by name or you can say just inform the animator that we are now in the state and it it has its own giant State machine that can transition between states based on uh logic in kind of defined uh inside of it so that's something we're gonna want to do when we do sprinting as well um but yeah that that's a a later concern sweet um um so yeah let's see yeah can continue searching around a little bit jumping oh this is when it jumps on the other leg that's another thing there's yeah maybe jumping was it's funny like in my mind I'm like oh yeah look at this class look at this thing it's so simple but then it's like 20 different uh areas and everything it's not that simple uh this is called having written the code yourself then everything is very simple and straightforward yeah but the the scope of just to give people an idea like this game was written in a very short amount of time right yes since April uh this year so like six months uh more or less or maybe five months I did marketing for like the last month before launching it so uh yeah it's still very uh a lot of a lot of things are maybe uh you know it's the first pass on them so to speak and I think that's a really good thing to do uh I don't think I would be finished if I started abstracting everything prematurely that's a thing I I try to avoid typically um like for example there is no uh weapon class in the game uh because you have two weapons like that's one of those standard things that you might see in your typical shooter your typical kind of game architecture um but because I only have two weapons it hasn't come up yet and those two weapons are so different uh cutting someone with a sword versus shooting someone with a bow uh very different so um they're all kind of a lot large parts of them are baked into uh this class but uh yeah it's a good as a good rule of Thum I think it's good to start in like um in a very concrete way in a very like I'm GNA add it and it's going to do something very straightforward in a very straightforward way and we're going to call it what it is not sort of uh some abstract name that we think might be reusable later uh and if you couple that with uh a tendency to refactor ruthlessly uh when you run into something that uh could be better or like oh now I need this abstraction uh I'm G to break it out from where it is right now that's when you get really fast and really powerful and end up with code that serves its purpose and starts being really uh you know is pretty easy to get into and change I yeah I find that uh especially when it when it comes to object oriented code it's very easy to fall into the uh abstraction hell hole uh where you uh where you start we see like two things that are kind of sort of the same and you start to you feel like oh this is sort of duplication and you start uh generalizing it but once you you start generalizing it you realize that it's not as general as it seemed up front and you end up with this much more convoluted solution um that uh is actually a lot more code and a lot of more moving Parts than the individual solution and the individual duplication was and also it's harder to understand probably because now you're not calling a sword a sword or a jump a jump you're calling it an abstract I action implementer or whatever it is yeah and uh no one understands what it is and you have to read it for 20 minutes before you understand what is happening so of course you get more bugs because no one no one can keep all of that in their mind uh and and and think of cool like edge cases uh because they just don't understand what's happening cool so now that I have defended the honor of my code maybe maybe we can look at uh at modifying it so why don't we just like I know how this code works why don't I tell you roughly what I think we could start doing and uh we start doing it a little bit and then you'll kind of get into uh you you'll learn by doing it and also seeing the surrounding code next to where we will add stuff yeah sure I'll just ask questions when I'm confused and you'll explain stuff that sounds sounds great um and you'll have to because you're typing it so uh you have to you have to know what to what to do uh okay so uh if you go to the top of the file again uh there are a bunch of things for tracking here in terms of what key is down ah Alo it's these uh is moving things these uh uh even further up like to the priv the private the private uh parts of it ah let's see oh yeah so so so there are two things here uh many things but two two main things is like is moving is is kicking is falling is on the floor like all all these kind of things it's like okay this is stuff that we are doing uh there's another part oh wait that's in that's not in this class that is in the Base Class ah if you you did generalize it I did generalize it I have a a goddamn spider uh I have to have some concept of a character or an enemy or something uh oh uh command D command D in the latest want alio go to declaration I don't I try not to use hot keys so that people oh see what that makes a lot of sense all right that sounds great yeah so here you can see uh down key down up key down left key down blah blah blah horizontal cursor movement um and the reason I uh I store that here in this way is because the AI is using the same interface as the player is to control the character uh that's a pretty standard pattern in game development that that's uh really important uh it makes it so that you don't have like a special way for the AI to steer the character um that can be it's just like it's a nice way to you know reuse the same things and you know that you don't have to make anything super special um and it also makes it so hey if I as the player want to suddenly be a spider I can totally be a spider and control it with the normal controls oh that's good and that sort of thing so you can swap out the you can separate oh I am the player and I'm controlling it from what is it doing how what capabilities does it have so this is a simple example of that cool so let's add another Boolean yes uh protected bu uh let's call it Sprint Key down okay so protected that means that it's private but all so that sub classes can access it right exactly it's not public uh you can access it from the outside but yeah every subass can can access it cool and that's what we want okay so now we need to do a little bit of uh Setter logic if you scroll down a bit uh there's like a bunch of very similar looking methods here ah uh yeah just add another one to the end here public void Set uh Sprint Key down miss a Boolean full value and we can already anticipate we're going to want set Sprint Key up as well but let's finish this first set Sprint Key down equals value oh no no it could also be uh false I guess yeah that's true oh actually no no yeah oh we don't need a Sprint Key up then because then we're just gonna use set spring key down false instead that's cool okay okay I miss no oh you don't need a getter for it no no we don't need a getter for it okay that's right uh yeah so this is like C does have like you can do getter and Setters uh more like by Magic but I like just wrapping them myself like this yeah I'm I've never been a fan of the um magic getter and setters it's it's almost like it's like not having one uh it doesn't I don't know like in this case we don't really want like this is at an abstraction level where I don't anticipate any other class in the system saying hey you uh a person over there is your Sprint Key down that's not a thing we're gonna ask we might ask hey you are you sprinting but that's different from it's your Sprint Key down like if you're on the ground for example and you're you've fallen over you can't Sprint that's that's a thing like yeah that's a that's a very good point I think like I I was here I was uh I I I just started doing a getter just out of habit but that code would just been dead code if really didn't use it and dead code is is generally bad to keep in your system because it seems like it's there for some purpose but it's really something that somebody has written and it's not tested or anything it's just a volume of death yeah and I think when it comes to encapsulation like this I think it's good to start with the assumption that it's private and then it's fine if you need a getter for it but now you have to think about it for two seconds uh and like you have a use case now uh and that's just a good way to I don't know it's like a rule of thumb it's not a hard and fast rule but that's my default assumption it's private so now we can if you go back to first person mover now we can uh now we know if the Sprint key is down or not so now we can actually add now I think we're going to need is sprinting at some point so you can add it to the if you go up again a little bit private PO is yeah so at some point later we can anticipate that we're going to say something like is Sprint Key down and see if we can Sprint and then set Sprint into truth so yeah why don't we do that now uh let's go to the update Loop which is down a bit here all kinds of stuff in here yeah yeah so this is basically where we uh we deal with a lot of this stuff um let's move it down further we want to do it before okay uh actually let's see so this blah blah blah blah blah blah blah here you can see we're doing we're we're figuring out uh the movement of uh of the player uh we're doing stuff like oh if we're holding the up key and say this is the move Direction and so on and we have moved and we want to move and blah blah blah blah blah so somewhere in this general area I think might be a good place for uh tracking it cool um I'm not sure where exactly maybe you could actually do it after the move so could we yeah because we have you're checking if the we can't move if we are kicking or on the floor from kick or is falling right so let's think about the rules of sprinting a little bit does does sprinting uh does sprinting suffer from this constraint as well like I guess that you wouldn't want to Sprint when you're kicking or falling falling perhaps I I think I mean so keep in mind this is just triggering it this is not actually doing the sprinting that we want to do first I feel like we can just add it somewhere naively and then move it if it turns out that that's not good okay cool uh so let's just add it what is this if okay this is about going up yeah here is good whatever this is good so we want to say something like if the very basic thing Sprint key is down and we're not sprinting ah and we are not sprinting it's sprinting yep uh then we want to start sprinting so how do we accomplish that let's say is sprinting is true oh and it doesn't do anything uh yet of course but uh okay great now we are sprinting Okay cool so as I as I mentioned before the very basic uh version of this is purely uh that we increase the speed in the forward Direction true so let's look at the move Direction stuff above for a second uh like where it sets the move Direction so we're saying okay um up down left right change the move Direction what don't we uh if you find usages of move Direction that's going to get us to the code uh that we want to look at next okay find references of move Direction yep all right cool yeah that's those guys let see we normalize it to uh make sure that we we don't get a oh yeah so down here uh desired move Vector if you double click on that guy that's uh where we're going okay cool so let's look at this code uh theed move V Vector is the move Direction times the distance moved this Frame can we give people just a super fast Scrat course on what a vector is yes an excellent question so a vector is basically uh it's is it represents uh X Y and Z so a vector three has x y and C a vector 2 has only X and Y so it's basically a uh pH uh or a direction typically it's some some something to do with 3D space uh and it VAR what what it is it kind of depends on what you call the variable and so on but but the values on it is X x XYZ so in in this case on line 354 for instance uh decided move Vector right so this is the how far to move uh this Frame uh and you can see it's using the move Direction which is basically saying uh if we're holding the the yeah like the forward key and the right key for example move direction will be something like um it will it will have an X and a zv value pointing uh in in the direction of of forward and right uh and the sum of it will be one is also important to note uh if you like if you take the distance of uh of the XYZ uh you get one because we've normalized it so that's like the direction that we're pointing at uh and then and then distance to move this Frame is you can uh you can find where this is declared as well um and have a look at that because it might need some context uh yep if you jump up a bit uh so the the distance to move is the elapse time time Delta time between uh this Frame and the last frame times the movement speed that we have times the movement speed multiplier which is like if we're suffering from uh some kind of um some kind of boost or some kind of Slowdown or whatever it might be so that this might be actually be code that we will be touching later to yeah maybe totally absolutely the the naive version would just be to say hey move speed multiplier you are times two or something yeah um that would be a very naive version but that might be be pretty okay uh but we kind of want to do something more complicated than that unfortunately like I it's worth noting I haven't really prepared or done any research on exactly what this code will look like I'm trying to figure it out as we go along as well as well I think that that is the way we should do it because we want to represent kind of like how this would work in in real life actually figuring out huh how we're going to do it we don't want it to be like clean and prepared and we want yeah then no one will learn anything exactly I'm also confronted by by various awkward parts of this code that I've written it's just that uh having to explain it is it's like I don't think that long classes are like ah I don't mind this at all actually uh I'm a person that I I um uh there is one thing that is a lot worse than uh long classes and that is classes where you have to jump around like crazy just to follow a flow uh where like there's just this function that does something and then you had to jump into that function and what's even worse if it's that function has like access to the state that you're dealing with so you have to keep in mind that what that thing was over there while you're dealing with over there where people have AB like extracted things out like not cleanly that's a lot worse than a long class okay so I think what we could do here is to to get to the to the to the kind of thing that we wanna we want to experience we could um we can add a thing to the desired move Vector here like basically what we want to do is we want to change to Target uh position a little bit um yeah this one right exactly we wna we want to like give it a boost in the forward uh Direction so maybe we can even just say here uh Target position like basically say if is sprinting Target position plus equals something or rather if so if we are sprinting um we have like this jetpack engaged and we're boosting Us in the forward Direction so what we could say here is Target position plus equals uh transform. forward uh transform with a small t uh this references the transform component uh on this object uh which kind of thing it's a Unity thing yeah it keeps track of the position in the word in the world and its rotation and scale so if we say transform. forward uh that gives us the direction of uh where how we're facing uh right now oh so what we want to do in addition to this though is to uh multiply it by uh time. Delta time and this kind of makes sure because we're doing this every frame we only wna like do parts of it and the final step would be to add a some sort of speed uh increase as well uh like a a float number that uh could be anything at all but yeah 1.2 why not why not sounds good um so okay so and Delta time this is the time that has passed since the last frame right exactly yeah so so this will be interesting because it will it will kind of boost us in a uh yeah just straightforward so if we're like running to the right and we Sprint we go we're going actually going forward not to the right so it's a little bit uh of a non-standard sprinting mechanic but I'm thinking of it more as a charge mechanic where you're charging forward uh with your sword and uh later on we also want to do things like you have special swings when this is engaged uh and you're just like like gliding through and slicing people nice so that's my that's that's where where we're going with it I mean let's just try this all right so don't we have to like connect the sprint button toal button you're right we do so if you go to let's see what is it it's something like player input something or other uh control shift control shift d I think it's player input controll okay control shift d no command shift d uh command shift d yeah sorry ah yeah uh and controller something yeah player in uh player input controller there you go player in controller there we go right so this is on the player object but not on the enemy object um oh and here you can see what it's up to so we can just say uh here's some stuff yeah exactly it's pretty straightforward so here we can just say character dot uh set sprint button down I believe Sprint Key down yep and input dot uh shift or something like that input I think it's just called left left shift probably no hello S no oh I'm sorry I'm sorry oh no no I'm F it's input. getet key ah get key uh and then key code dot left shift or or shift left sh shift there you go cool okay so this means so every frame it's gonna say is the Sprint Key down uh it is down if left shift is down okay so input get key this is going to return a Boolean yes exactly okay so it's like oh yeah back to yeah because this is so unintuitive for an app programmer like everything runs all the time so whenever I'm holding this down this is so I'm holding down the left shift it's going to run this like 60 times per second and when it hits this code it's going to see that oh he's holding down left shift now and then this going to be true and then it's going to be passed to set Sprint Key down right exactly uh like you can see some other variant of this above like for jumping for example uh this maybe should have been called something a little a little bit different but that that only triggers when you actually press the jump button not when it's held down but because this is uh movement related uh uh right now in our initial version we're envisioning it as okay you hold it down and that's uh the duration of of of you sprinting um cool let's try it I'm curious to see what happens all right all right I'm gonna find a way to switch back to Unity oh I need to save this I guess oh yes save all this stuff yeah and then we go back to Unity and let's see it crash yeah first try it's gonna be [Laughter] great all right uh play play come on play what is happening oh compiler eror has to be fixed I guess you okay wait uh we have foring error what did you maybe leave out a closing space or something oh go back to Unity and double click the error and it will take you to um take you to where it is down key down Falls yeah I think you must have messed up a space or a bracket or something when you added it up no don't touch that hang on I I'll check Tower hang on uh oh my God hang on I did this no that looks fine that looks fine oh I added this yeah 577 in first I I'll just discard that chunk hang on now I'm just going to make sure it's no nothing else is part of that Shunk okay this car changes there we go see if that that changes things let's go back to Unity how can I will it automatically all does not contain oh wait it's me that oh yeah oh you have to add f after it so to indicate that it's a float uh value y cool so going back to Unity all right see if it disappears magically it did let's play so we're playing this H the reason we're using solo resolution is that my computer is doing an insane amount of things it's broadcasting my it's encoding a stream to you of the game while I'm doing Unity while I'm recording the screen for the casts it's like crazy okay I'm going to try sprinting now yep maybe I'm faster I think I'm faster stop if you stop holding down your arrow keys I would expect it to move you forward because we never turn it off oh oh no it doesn't if I hold on shift that's strange it doesn't seem to work uh why not I wonder I get the feeling that it hang on let me just change that the number to something crazy uh like uh yes so if we are sprinting then we are increasing it by a significant amount oh wait yeah yeah yeah no actually I think your movement speed normally is around 12 so yeah it would be in that general order of magnitude for it to have an effect you're right what did you change it to four times four oh okay yeah that's not it's not that crazy but it's a little crazy yeah you look faster I think yeah I'm definitely faster for debugging purposes I'm going to do it even faster or also because I just can like uh 40 yes let's do it let's see this is in general with shoing as well you should you should never just be like Oh I'm gonna add it like if you have four and you wanted to be more than four you shouldn't add five you should add 12 or something you know yeah 20 just to see exaggerate and see if that was too much and then like hone in on it like that so you really feel the difference uh instead of just convincing yourself yourself that you f yes there go yeah so just hang on we have the bug Unity iset Unity is Unity uh and return to game where am I are okay wait I I cannot okay now it's broke ah okay I'm not really sure what I'm doing now I I can't stop oh how does I can't walk backwards now oh yeah it's because when I press backwards it moves forward yeah when forward it's really your backward uh moving movement is the thing it's strange if you just stop moving altogether I would expect you to still kind of drift uh forward because you have we haven't turned sprinting huh must be some statement there saying about oh only change it it for moving all right yeah but okay well it is seems to be working all right so what's the next action here let's see so now we are sprinting we could uh you could maybe Data Drive this value so we can uh tune it more easily uh the way to do that would be to uh declare a public variable at the very top of the class um I believe there is like a move speed or something at the very top um all right and then they become accessible in the unity interface right yep that's right so let's see oh it's on character actually uh but no one else is really moving let's see yeah maybe add it on character and we'll be the only one to use it I think that's fine okay okay uh oh yeah so up there Max Speed public float uh Sprint speed cool that shouldn't have any default value or sorts uh no because uh it's G to get out of date really quickly and uh it's just going to be confusing as to why that's a good value we don't know what a good value is future us will know uh yeah but now we but now but now we do need to assign in a value oh and we also need to swap out uh the uh reference to it uh in here so it's using this it's sprinting here yeah yep so let's say uh Sprint speed cool okay so nice so let's go to Unity again and we're g to find yep in your uh project view down to your left next to the console uh we're going to go to enemies uh the player is also an enemy in this uh this setting oh it doesn't really make uh uh you can see it uh yeah that one prefabs enemies exactly go into that folder okay this one right yeah yeah so here I have pretty much all player exactly so he now has a Sprint speed uh up there there Sprint speed oh so I can I can change this dynamically during the game now right yes you can yeah let's say uh 10 maybe 12 I don't know all right see Hello what happened y it didn't start wait why didn't it start wait you haven't assigned a speed either so all right uh I'm gonna I'm gonna ah okay uh Sprint speed uh if I do like 20 perhaps that's say what hey you just uh made his attack speed zero which is gonna be Troublesome one is the attack speed so this is a good uh a good thing actually about being in play mode it doesn't keep any of these values uh yeah right so just it's really hard to accurately switch between okay so that bug again hang now I don't feel it at all really I need to scen speed 50 I'm just going to do some C okay walking and no I'm holding a shift but it's not this is this is crazy oh okay wait sorry I know why it's because you're editing the prefab right now and the person the player on the screen uh already has the value set when you instantiated it so it won't just pick it up if you change the prefab okay all right so a pre oh a prefab is like the thing that you make in your library in unity exactly so or what is it yeah yeah exact it's the uh yeah it's like the representation of what a player is like uh so we could we could actually we could have five players at once that are copies of the prefab for example and they would all work and they would like you know it would be five cameras it would be confusing but that would totally be there would be instances off the player so we need to find the actual player oh no don't worry about it so now that you've set it on the prefab uh the and you and you run the game again then the player that I just instantiated will have the new speed so now it should be okay so we need to actually set it on the the prefi while we're not in play mode right exactly okay so we go back to project uh Mech player and let's say then Sprint speed uh 30 sure and yeah that was really fast fast yeah this is this is uh okay this is good this is yeah also the the Sprint does not stop when I uh once I release the Sprint Key yes that because we haven't written any code uh to do that yet cool uh perhaps I think it perhaps 15 is okay sure got I feel 15 that is so fast yeah that I think this is let's let's leave it at 15 okay so it's sprinting then we increase the position um that works okay for now we might want to do something more sophisticated with it later but this does in fact move the player forward at a at a good speed oh actually can you go up a bit uh to the top of this if statement whatever it is yeah ah yeah yeah yeah okay so I was confused uh when I saw it because I was expecting it to have this constant forward momentum uh but I see now why that's not the case uh it's because um it's because we have this if statement here saying hey if we moved this Frame uh then change the uh the velocity so let's see if it makes sense to add a a sprinting to these uh kind of else uh conditions here here um okay to to make it so that even if you're not holding down any of the W ASD Keys it's still sprinting okay and that's a little crazy maybe but imagine if you are like it will make sense when we add uh some actual particle systems and things to communicate that this thing is a jetpack so if if we're just standing around and we press it we would expect us to shoot shoot forward instantly that's that's like the vision of where we're going with it even though it doesn't look like that now so uh yeah so this would make uh more sense like this right um let me try that yep so this should now mean that I get movement even when I'm not going forward MH and shift yes excellent shift and now if you uh if you let go of shift I would expect that you just continue sipping around that right yes yeah I'm letting I'm not touching shift that's great yeah so I mean obviously this this is not what we want but this is what we expect we understand the code we have just written this is great okay so great so maybe that's a good thing to uh fix right now uh Sprint Key yeah so uh if you go back to if you search for is sprinting in this file uh we can see where we set it based on if the uh Sprint key is down let's unset it uh when it is not down oh yeah so basically here we can say uh else is sprinting is false for now can I make it in one statement yeah and actually this is a little strange because yeah you could just say I can just say this right yeah yeah this is a little you could just say is sprinting is equal to is the Sprint Key down for now uh and just just remove the if we're not sprinting uh for now okay uh later on we might want to do more like an activation and then a deactivation that happens independently if you holding down shift or not but for now this is like the one toone mapping that we have in the system so it's fine cool cool um let's test that yep sounds good okay play right shift yes nice so now we're like look at that it actually already feels more like a jetpack uh than it did before oh here's the fun thing to try by the way uh if you look up at the ceiling and fly use it does it does it have enough Force to lift you off the ground I don't think it does I think it does it does are you it's like but gra yeah gravity is still it's very hard to see but yeah no no I don't think it does okay but if I raised but it would if I had a higher number I guess yeah yeah totally because we're not uh we're not like removing the Y component which uh we are for the normal move speed why don't we add a particle system yes let's do that let's make it look like a jetpack uh great so let's go back into unity in order to accomplish this and let's see let's go to a new scene so we can uh do some do some work here all right cool I'm gonna create a new scene okay and uh if you go into the uh prefabs folder uh and go to character models uh we want to take the player's character and drag it onto the scene and basically what we want to do is we want to just get a really simple particle system going to indicate that sprinting or in this case the jetpack is engaged uh so here you can see uh this is like the character model uh the the stuff from the intro sequence is actually baked into the model as you can tell it has Giant welding arms on it that uh is is hidden later um so for now I think we can uh we can be okay with uh the player being the only guy who can Sprint and then later I can add it to to other enemies okay so let's let's see what do we want to do here let's add a particle system to the player so if you open up character model uh like in the the hierarchy here sorry in thearchy yeah o sorry yeah yeah so we if you start expanding this a little bit uh you can see that this is like the object hierarchy of what makes up the player what we want to do is legs and leg lower and blah blah blah so if you go if you Dr into the spine uh down there all right I'm gonna collapse the legs open up the spine and here we have the Torso uh programmatically control and then the Torso and then inside here head arms and whatever but the jetpack if you if you rotate the model around or the view around of the model uh in the scene view you can tell that it has like a jetpack on his back so I need to learn how to rotate whoops I shouldn't no no don't don't don't rotate that ah okay I need to rotate the the model oh so hold like that there you you can do that it doesn't matter that much yeah no I mean uh if you hold down alt and I think uh it's the uh middle key on a mouse this this just in my muscle memory I don't actually know what I'm doing when I do this yeah yep okay yeah that's rotating the view uh and I think if you uh scroll up or down you zoom in or out as well yes there you go yeah so this is his jetpack on the back okay so what we want to do now uh I think the simplest thing we could possibly do here is just to add a particle system parent it to the Torso and then turn it on and off uh and we can expand on that later so what you want to do is you want to go to uh file up in your menu you have somewhere file game object new oh sorry no I'm just kidding uh not file game object I just yep 3D object yeah there you go excellent this is the fun part of uh working on games so hey now we have a particle system uh and done okay done but it's but it's uh it's on the root right it's not on the character model yet right so let's just drag it into the Torso uh up there okay like that yep oh uh no not on the head no I think I I it's in the head sorry to P there great uh yes and let's uh let's rename it as well uh just select the name up in the editor there in the inspector and call it jetpack yep jetpack Flames that's what it will be like cool uh yeah you can see uh you're you're given a preview of of what is happening if you zoom out a bit from uh in the scene view you can see that it's a really big particle system yeah um so we want to tweak it to be a little bit smaller so here are like all the tuning values of the particle system uh you can see already that these particles are really big we probably want them to be smaller so maybe just the first thing you can do is change the size the start size two down to be 0 two or something looks kind of good and uh uh also it's like they're flying off into space everywhere so maybe reduce the start Speed to one or something see what that's like now you can see okay they're a lot denser that's cool uh they live forever we don't want that so let's say the lifetime is one as well so we have more of a smaller kind of burst maybe the lifetime or something like that sure uh what else do we want to do ah we can see the emission is happening from a very wide area we want it to be contained inside of the little jetpack thing so if you go to uh I think it's shape under emission oh here uh yeah you can see it's a cone and The Cone the base of the cone is one let's set the base to be 0.05 or something like the radius of it what is it the base oh shape under shape radius oh radius so let's hit that to something very close to zero but not quite zero like yeah like that that's pretty good great and this really highlights that this particle system is rotated the wrong way so let's fix that too um we go up to the transform uh at the very top above all this okay okay this actually controls the rotation oh and I think because you rotated the character model earlier uh it has a really weird rotation right now maybe let's let's normalize this again go to uh in thearchy go to character model player and just set his rotation to zero Z yep Zer z z z I'm putting the oh I accidentally changed the position zero and oh no no so this yeah hold on the right Mouse button you got it yes you got it nice rotate rotate rotate there I think this is going to be good yep okay great so now you can let's just see what happens if you set all the rotation to zero here too what what is that give us zero and zero that's a good starting point okay great yeah so we can see we want it to be rotated 180° so maybe just slap that on the X and that will uh reverse it's uh it's facing Direction there you go this is pretty good okay so now we want to change to position right yep so now we want to tweak that to be uh inside beautiful I think uh yes close close enough close enough we don't have close enough okay so let's go to emission as well uh we want this to be gonna pimp this a bit and uh 40 why not yeah no that's too much 15 I'm sorry uh something I don't know we're just now we're just like tweaking the the general cone of it yeah uh cool but now we can see that hey the jetpack is engaged and of course we can change the color and and that uh actually let's do that let's change the color to be some sort of fiery red or something it's up there that's that color over Lifetime and that sort of thing let's just say where color uh start color up there up there uh in the in the first section I see it I see it I see it completely white let's just pick a cool color uh looks like but that's fine could be I'll let you be the artist yeah sure yeah let's if we just have one color I think turquoise is nice yep exactly normally we later we probably want to add smoke and all kinds of cool effects and stuff but this is a good like prototype this is a great prot because you can use the particle system for a lot of things like making fire essentially and explod exactly and you can like have multiple normally you have M multiple particle systems uh like uh like parented to one another and working together to create a the illusion of something R but this is a good placeholder um so basically now we need to make the player aware that D sping exists so uh we need to go and edit the character model class uh which is kind of uh what's used to uh keep track of uh what is in the character model like the animators and so on so we need to add a field in this class for our particle system so what we want to do now is we want to add a reference to the uh the particle system we just created all right so let's say yeah so I guess I go public particle system uh particle system you might need to like yeah there you go uh sprinting VFX let's call it that cool sounds great so now that we have that here um what we want to do is in the first person mover we want to turn this on and off now it is public here but it would be nicer if the firsters Mover didn't like uh reference it directly maybe um so why don't we uh make a new method in character model that says uh something like uh set sprinting effect visible visible yep and I guess a Bo yep value or visible or something yep so and all this has to do is like for now uh the easiest thing to do is just to say uh sprinting effect Dot Game object. setactive value and this is all Unity stuff right exactly uh set active is a method so you pass value into it and it sets it to be yeah so yeah what this does is it basically um turns the object on or off in the uh in the hierarchy so a lot of the time you want to have something that is uh not active uh that is just waiting to be turned on and doesn't have like it already lives in memory and is ready to go for performance reasons uh we want to have this method be uh have a big S because it is public and that is the naming convention that we have in this project cool cool great so uh oh actually actually so we probably also want to add an if statement here saying if sprinting effect is not equal to null because not all character models has a uh sprinting effect necessarily uh but we still want them to be able to Sprint uh just without showing it perhaps yep okay that's pretty good and yeah this is like uh this is good now the character model is like responsible for keeping track of this uh effect so the in the first person mover um we can now say uh in the place where we set uh if it's sprinting or not we can also say oh right there you have it up there uh we can say uh character model. set sprinting effect active or whatever we called it uh oh underscore character model all right this so we should have a reference to it yeah uh set sprinting effect visible uh is sprinting bam very nice now uh one thing we have to keep in mind is that I would like to interject here that I hate this thing that it adds a space between these that is from the Moon yeah who does that let's you can remove it's fine all right okay there you go okay so another thing we want to do here is we want to make sure that uh when we first uh instantiate a new firstperson mover uh the sprinting effect is not visible so let's go up to the start method at the very top of this uh class and pretty much like right after we instantiate the character model we can also say uh are we doing it in start we might not be doing it in start we might be doing doing it further up um there we go in awake awake so the the difference between uh start and awake is awake is called uh like the second uh you have a new one of these uh within the same frame uh awake is called uh start is called uh also like at the at the very beginning of an object's existence but it's called on the next frame um is a subtle difference but uh it's very important to to Know It uh the rule of fum is basically you want to set up stuff in a wake that is has anything to do with this object that uh it needs to represent itself and be able to provide functionality for the rest of the system and in start you want to start connecting it to uh the surrounding objects uh as a general rule like you can reach out and assume that other things exist and start but not in awake or okay bit of unity Unity lore for you um uh so here we can see we're doing all kinds of initializations so contradicting myself previously these one these things just like don't encapsulated in character model but we've done that now so we can just say character model do uh set Sprint effect visible uh false y That's great this is a good example of where uh pair programming leads to better code because you actually have to explain to someone else and justify what you're doing but you can see I didn't do it down there yeah but it would have been nicer if I did maybe okay yeah I'm a huge fan of par programming uh I think that it's probably one of the most underutilized tricks in the industry it's just scary how much better code you get when you PR program totally yeah you're accountable to someone other than yourself it's pretty good okay so let's try this this should work now this should just work oh sweet actually or actually go to go to go to no I'm kidding it shouldn't just work go to Unity you need to connect it as well right yes I forgot about that step uh character model player if you go to the the the thing in the hierarchy there and select the root of it uh there you go you now see it has a where is itang oh it hasn't hasn't there you go sprinting effect not a sign yep PL frames mhm oh wait I dragged it into the wrong thing Why didn't it that is a particle system so it should work okay hang on I'm just confused here ah clicky clicky clicky so all right so this is sprinting effect there and I drag the pl Flames mhm maybe you need to hold oh no no you one down by the look of it like drag it there you go iOS is trying get wrong that's how you drag I think this is a pretty cool uh this is a pretty cool use of of uh uh static typing actually I think that it just yeah I need to drag a pack uh particle system in there click drag and drop it's pretty cool it's pretty cool I like Unity how it uses it yes here we are okay great so let's click apply to make sure it persists uh and save the project excellent now it should just work let's go back to the other scene well this won't work obviously oh this one okay yeah this is just scene uh let's see how do I find that one uh just go to scenes under assets and uh it will be there scenes oh game play there you go uh don't save this scene mhm all right uh let's try this uh play play okay all right I'm G to press shift now mhm yeah oh you placed it woooo but it actually does it actually does it but we could tweak this in in in QA later QA will they will they will have to file a bug will catch it I mean I thought that was the final look of this effect but I guess it's not guess I'm gonna have to iterate on it a little bit but I think that's like I I think that we uh like the the purpose of this was to give a sense of the process of of making a change a game and how it how it all fits together and I definit think what we did yeah yeah yeah cool so maybe this is a good uh stopping point I think so I think that this was this was this was great it was it was just as fun as I imagine it to be uh yeah game play uh engineering is really fun like you really get uh a lot of feedback on your actions and uh you know they dance on the screen for you it's really it's really cool yeah like Unity is is besides a couple of weird bugs I think that Unity is lovely to work with oh absolutely uh like I used to work with uh Flash before uh and unity is much better uh in terms of just its workflows and stuff uh highly recommend it to anyone who wants to get into uh game development it's really easy to pick up and learn cool so uh uh before I do the outro where do where do people find your game what's its name oh yeah so uh the game is called clone drone in the danger zone and uh you can go to clone drone inth danger zone.com or you could go to itch.io and uh right now at least it's in the top sellers list so that's the easiest way to find it uh or you can scroll down to front page of bit it's St to uh and of course we will link to it in this video because we are goddamn professionals um so that's what I should I I think what I should have said is pointing down right now you can get it from here look here Matias will edit this later so that here you can click and go get the game please buy the game it's great okay also uh we're going to put uh a few getting start good getting started resources uh for uh for Unity in the description if you like want to try out game development yourself yeah that sounds great with uh with that said thank you so much for watching you have watched an episode of fun fun function uh I make these every Monday morning not exactly like this one uh but I release new ones every Monday morning uh so uh you should subscribe uh and uh yes you should do that you should do that uh until next Monday morning stay curious we're weaving goodbye together bye bye bye okay
Original Description
💖 Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction
Me and my good friend and indie game developer Erik Rydeman do a pair programming session implementing a new feature IN THE CODEBASE OF HIS ACTUAL GAME, Clone Drone in the Danger Zone. Stuff mentioned in the video:
The Game itself - Clone Drone in the Danger Zone
🔗 Info: http://bit.ly/clonedrone-fff-67
🔗 Buy: http://bit.ly/clonedrone-buy-fff-67
🔗 Erik Rydeman on Twitter: https://twitter.com/iamdoborog
🔗 mpj on Twitter: https://twitter.com/mpjme
Game development platform - Unity
🔗 Download Unity: http://bit.ly/download-unity-fff-67
📺 Demo reel of Unity: http://bit.ly/mpj-unity3d-demo
📺 Unity tutorial YouTube series: http://bit.ly/fff-unity-tutorial-series
📺 Vectors Explanation - video: http://bit.ly/vectors-explanation-fff-67
Voxels - the "3D pixels"
📺 Voxels in No Mans sky: http://bit.ly/magicavoxel-tutorial-fff-67
📺 MagicaVoxel tutorial: http://bit.ly/magicavoxel-tutorial-fff-67
🔗 Picavoxel: http://bit.ly/picavoxel-fff-67
🔗 Qubicle: http://bit.ly/qubicle-fff-67
📺 Music in the video: Peacock by 7 minutes dead
http://bit.ly/fff-67-music
Playlist
Uploads from Fun Fun Function · Fun Fun Function · 57 of 60
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
▶
58
59
60
Higher-order functions - Part 1 of Functional Programming in JavaScript
Fun Fun Function
Map - Part 2 of Functional Programming in JavaScript
Fun Fun Function
Reduce basics - Part 3 of Functional Programming in JavaScript
Fun Fun Function
Destructuring: What, Why and How - Part 1 of ES6 JavaScript Features
Fun Fun Function
Reduce Advanced - Part 4 of Functional Programming in JavaScript
Fun Fun Function
Closures - Part 5 of Functional Programming in JavaScript
Fun Fun Function
Too many tools and frameworks!
Fun Fun Function
Currying - Part 6 of Functional Programming in JavaScript
Fun Fun Function
Recursion - Part 7 of Functional Programming in JavaScript
Fun Fun Function
Promises - Part 8 of Functional Programming in JavaScript
Fun Fun Function
Staying relevant as a programmer
Fun Fun Function
Factory Functions in JavaScript
Fun Fun Function
Composition over Inheritance
Fun Fun Function
Software needs to be better - FunFunFunction #1
Fun Fun Function
Unit testing: How to get your team started - FunFunFunction #2
Fun Fun Function
Straight-line code over functions - FunFunFunction #3
Fun Fun Function
Clojure - FunFunFunction #5
Fun Fun Function
The growth stages of a programmer - FunFunFunction #6
Fun Fun Function
5 tips to quickly understand a new code base - FunFunFunction #7
Fun Fun Function
Semicolons cannot save you! - FunFunFunction #9
Fun Fun Function
Functors - FunFunFunction #10
Fun Fun Function
Functors: I was WRONG! - FunFunFunction #11
Fun Fun Function
Questions and Answers - FunFunFunction #12
Fun Fun Function
Streams - FunFunFunction #13
Fun Fun Function
Prototypes in JavaScript - FunFunFunction #16
Fun Fun Function
Fast or Flexible? - FunFunFunction #17
Fun Fun Function
Coders are herd animals - FunFunFunction #18
Fun Fun Function
Weekend Kubernetes Shenanigans - FunFunFunction #19
Fun Fun Function
Monad - FunFunFunction #21
Fun Fun Function
Moar Weekend Shenanigans - FunFunFunction #23
Fun Fun Function
Questions and Answers - FunFunFunction #24
Fun Fun Function
Losing motivation - FunFunFunction #25
Fun Fun Function
LONGEST KUBERNETES SHENANIGANS! - FunFunFunction #26
Fun Fun Function
Fast code is NOT important - FunFunFunction #27
Fun Fun Function
Pair Programming a Facebook Messenger Bot - FunFunFunction #28
Fun Fun Function
Writing unit tests for personal projects? - FunFunFunction #29
Fun Fun Function
Let's Code a Pomodoro Button - FunFunFunction #30
Fun Fun Function
What editor do you use? - FunFunFunction #31
Fun Fun Function
Arrow functions in JavaScript - What, Why and How - FunFunFunction #32
Fun Fun Function
Is Programming Art? - MPJ's Musings - FunFunFunction #33
Fun Fun Function
Generators in JavaScript - What, Why and How - FunFunFunction #34
Fun Fun Function
Haskell Basics - FunFunFunction #35
Fun Fun Function
Haskell - Baby's first functions - FunFunFunction #36
Fun Fun Function
Is Big O relevant to you? - Q&A Part 1 - FunFunFunction #37
Fun Fun Function
How much are you allowed to Google? - Q&A Part 2 - FunFunFunction #38
Fun Fun Function
Haskell lists - FunFunFunction #39
Fun Fun Function
var, let and const - What, why and how - ES6 JavaScript Features
Fun Fun Function
Why are some programming languages popular? - MPJ's Musings - FunFunFunction #41
Fun Fun Function
Does a developer need to be nice? - MPJ's Musings - FunFunFunction #42
Fun Fun Function
bind and this - Object Creation in JavaScript P1 - FunFunFunction #43
Fun Fun Function
Examples of this and bind - Object Creation in JavaScript P2 - FunFunFunction #44
Fun Fun Function
Prototype basics - Object Creation in JavaScript P3 - FunFunFunction #46
Fun Fun Function
Separation of concerns RANT - MPJ's Musings - FunFunFunction #47
Fun Fun Function
Cellular Automata - Pair Programming - FunFunFunction #49
Fun Fun Function
The 'new' keyword - Object Creation in JavaScript P4 - FunFunFunction #50
Fun Fun Function
__proto__ vs prototype - Object Creation in JavaScript P5 - FunFunFunction #52
Fun Fun Function
Unity game pair programming - Let's code - FunFunFunction #53
Fun Fun Function
Throw out your tools - MPJ's Musings - FunFunFunction #54
Fun Fun Function
Unit tests vs. Integration tests - MPJ's Musings - FunFunFunction #55
Fun Fun Function
Object.create - Object Creation in JavaScript P6 - FunFunFunction #57
Fun Fun Function
More on: AI Pair Programming
View skill →
🎓
Tutor Explanation
DeepCamp AI