How to make Doodle Jump in Unity (Livestream)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone.welcome to this tutorial this is a live stream tutorial on making a replica of the pretty publi doodle jumps so if you haven't played this yourself I will show you now what it looks like so if we play here it's going to generate a level with these randomly placed platforms and we can move to the sides in order to jump on them um this game has been remade in so many different versions such as puppy jumpin yada yada yada and it's really a fun and classic game that I thought would be really fun to recreate in a live stream so here is the base mechanics we have some player movement from the side to side we have the jumping on the platforms and the placement of the platforms and then of course we have the camera following along and that's basically what we're going to be making today so without further ado let's jump right into it so let's go file new project and here we can go ahead and choose a location for our project along with the name and we're just gonna call it doodle jump please don't sue me and then we're going to click 2d and hit create project and this is going to open up a new empty unity project if you for some reason have trouble following along or if you want to just grab some scripts or use my project in any way all you need to do is go to the github link that I will upload along with the video to youtube so you can check out everything there so now unity has opened up so we are ready to start on importing some sprites and I've gone ahead and created a few sprites to make them look like the original we have the doodler person we have the background and we have a platform and I'm just going to take all three here and import them into unity you can of course use any sprite that you want you probably don't want to be creating tools jump again but just using the same mechanics but I just thought I would use the original sprites so the first thing that we'll do is take our background here and maybe change the pixels per unit to something like 90 just to scale it up a tiny bit let's hit apply on that and let's drag it into the hierarchy and now we should see that even when we maximize our game view everything is filled by this background let's also go and change the order in to something like negative 10 to make sure that it will always be layered underneath and your other sprites that we might be importing finally we can take our background here and we can drag it under our main camera and this will just mean that when we move our main camera up our background is going to follow along with it and so we're not going to have a case where our camera will move up and you will reveal whatever is behind the background we really don't want that to happen so now our background moves with our camera I'm also going to hit save here control s and I'm going to save this as a scene called main or main level level 1 whatever you want yeah I'm just gonna call it main because I save all the time and it's really nice to have done that now so I can just spam control s whenever needed let me just have a look at the chat here to see if everything is alright looks like it that's awesome so now we are pretty much ready to start importing our first sprite and let's just get the doodler in here right away and you can see he's way too big so that's actually going here and adjust the sprite pixels per unit to something like 200 maybe actually hit apply have a look in the game view here whoops the game you yeah I think that that's a much nicer size and one thing that I also want to do is take a game view and dock it to the right here so we can see both of our scene and our game view at the same time because the game is often viewed in this very vertical format with a very with a very tall screen size and not that wide so I thought we would do that here as well and now we're pretty much ready to start to add some functionality to this guy so currently when we hit play of course we're only seeing a sprite cue but he isn't really doing anything at all the first thing that I want to add to him is physics so that's going here and add a rigidbody 2d component and this will now enable physics on this game object so if we now hit play is going to fall down the next thing we want is of course for him to collide with our environment but in order to for that to happen we have to first create an environment so let's go and select a platform here and let's place him on one of these platforms so here we have a platform and I'm just going to drag this down here to the bottom for screen so he starts at the bottom of our screen and I'm just gonna place our doodler somewhere on top of this so he will fall down on it and now we can select our platform and in order for a doodler to collide with it we need to also add a Collider to our platform so we'll go into your add component and we are going to add an edge Collider 2d now the edge Collider is basically just whenever you want an object to collide with a line you can go ahead and add point to this line here so you can actually stretch the edge Collider in any way that you like but the collider is not a box or a sphere it's just a symbol line and this also really easily allows us to add collision to the top of our platform here and that's really the only place where we want our doodle to collide with because we don't want him to be able to collide with the sides and we actually also want him to be able to pass on top of platforms and then land on them from the top so whenever he comes from underneath the platform here we want him to just go past it and then be able to bounce off it again so that's why we're using an edge Collider because it's really really simple to do this with so I'm just gonna stop editing the collider here now that I'm satisfied with it and maybe actually I want to make sure that my points are using the exact same y-value I just think that makes sense I'm just gonna copy the Y value from one of the points and now it should be completely horizontal cool so now when we hit play we should see that our doodle still falls below our platform and the reason for this is that our doodle o still doesn't have a Collider so we'll go ahead and add another component here and this time we want a box Collider 2d we don't however want this to fit our entire duel we don't want his nose cannon thing to be stuck in on platforms and we have they don't want his head to collide with anything either we really only want to focus this on the feet area so let's go in here and hit edit Collider and we can now drag the same here so somewhere along those lines somewhere around here and we can go ahead and drag it down here and just take the bottom part of our dude we don't want to make this too thin then we could have collision errors so let's just have it be somewhere around here and now we can stop editing the collider and we should see that when we hit play or doodle will fall and land on the platform yes all right that was kind of the first part of getting some physics working in our game the next part is bouncing and there are really multiple ways to go about this one some of you might think well unity actually has a built-in function where a built-in component or acid that allows us to define physical properties of materials and one of these properties is bouncing s so we could go in here and create a physics material 2d call it bouncy and then in here increase the bounciness to say 1 and then on our doodler we'll simply drag in our bouncy under the material and now we should see that when we hit play our doodler will bounce on top of this platform however how much we bounce is going to completely depend on from from where we fell so our current velocity and you can see that with a bouncing s of 1 will always bounce the exact same amount as we fell so if we fill from up here we would return to this exact position and that might be with some errors because you can see our doodler is currently jumping even higher if this is because of a rounding error or because of some of the properties of these materials I actually don't know but that is the general rule so the amount of force that you hit something with is also the amount of force that you will have leaving it but we don't want this we want it so that no matter how hard we hit a platform will always get shut off of it you see force that we specify using a constant force so instead of using this material here we'll select none instead and remove it from our project we can go ahead and add a script to our platform so that select our platform let's hit add component and let's go in here and add a platform script and under new script here we'll go and select c-sharp and hit create and add now if we double click this it will open up in Visual Studio and let me check if everything's right in the chat looks like it and I think it's opening in my secondary monitor here let's go and drag this over cool and the first thing that we want here is to get notified whenever something bounces on a platform so whenever our platform gets hit by another object well then we want something to happen so let's remove our two functions here and let's go in and create a void on collision enter 2d and you can actually see it wants to autocomplete that here and if I do that it is going to fill out our entire function but this might look a bit confusing for beginners I'm going to remove the first word here it's not needed and in here you can see that it gathers some information about what reaches collided with so this function on collision on collision entered 2d it's a callback method used by unity that gets triggered whenever our object collides with another object whenever this happens unity will execute whatever code is in between these two brackets however something that is often useful is getting some information about the collision that just occurred the velocity of the objects what object we just collided with and so on so and that is what we store here in a variable called collision so now we can actually go in here and get information about our collision by simply going collision dot then you can see we have the collider that we just collided with we have contact points we have relative velocities and so on so what we want to do here is go in and get our collider and we actually want to get a component on this Collider and the component that we want to get is the rigidbody because this will allow us to add forces to that rib so we're going dot getcomponent whoops f-type rigidbody2d and we can then store this in our own variable called again of type rigidbody2d and let's just call it RB now of course we might get a situation where two platforms collide in which case there would be no rigid body on the colliding object or that we just collide with something other than the player that doesn't have a rigid body therefore we want to go in here and check if our P is not equal to no so if we actually find a not rigid body on the on the object that we collided with well then we want to go ahead and add a force so now we can actually go in here and go our beat add force and we could go in here and add a force in the upward direction the problem however with using add force is that add force takes into consideration the velocity that we are currently moving with so if we are falling really quickly downwards and adding a force in the opposite direction so upwards we are we are actually competing with our downwards force and so if we are falling quickly down and then adding a force we will only jump very slowly upwards whereas if we are only falling very slowly and then adding the same force will then move upwards really quickly so we really competing with the downwards force instead of this well go ahead and modify the velocity of a rigid body directly so velocity is the result of our forces meaning that if we set the velocity directly we will simply set the speed that we want our object to travel upwards in directly instead of adding all these forces and them cancelling each other out the way to do this is by creating a vector tube we'll call this one velocity and we'll set it equal to RP toward velocity so now we've gotten the velocity of a rigid body in its current state then we're going here and set velocity dot y equal to and this is where we can control the amount of force that we want our platform to give the tool or at least the velocity the Y velocity of the doodle after it's our platform and we can control this using a variable so public float and let's call this jump force and set it equal to about ten by default then down here we can set velocity to dot y equal to jump force and then we simply need to go our B double ASSA T equals on the velocity vector the reason why we are doing it in three steps instead of just setting artbeat velocity dot y equal to jump force is that this will actually throw an error because we can't modify a component of our vector without changing the entire vector so we're really just getting the vector modifying a component of the vector and then setting it back to this vector and that's how we're doing it so if we now were to save this and go into unity and wait for this to update there we go we have a jump force and if we now hit play we should see that as soon as our duel collides with our platform we start jumping and this doesn't matter where we jump from or the amount of force that we're moving with before then you can see no matter where jump from our tool is going to land in the same place pretty cool right so of course we need to modify this a bit to make it feel better one thing is I think the jumping is a bit too slow I want this game to be moving a bit more quickly so let's go under edit project settings and then physics 2d and let's increase our gravity to something like negative 15 now we have more pull on a doodle which means that we don't job miss high and we also we can also see that gravity works a bit quicker you could also see there that we glitched into the platform a little bit and the reason for this is probably that if we go under our doodler or collision detection is currently set to discrete I would recommend going in and setting this to continuous which should mean that unity will use a different method of checking if we hit objects that isn't as faulty so that should get rid of some of those vehicle itches and you can now see that we're just jumping on top of this platform pretty cool right so that is kind of the base of the platform jumping but there is a very very important thing that we haven't really taken into consideration yet and that is of course if we go ahead and make a prefab out of our platform and we go ahead and duplicate it and we move it up and now we try now we try and hit play and see what happens when okay so this is actually working one second let me move it down here there you go so now you can see that we are actually colliding with our second platform as well we are hitting it's collider bumping on to it and it's throwing us back in the opposite direction this is not something that we want to happen if we go here and take our platform and move it down so we can replicate the same instance let's try a net play here and luckily unity has a component that is super odd that works really well for this particular situation and that is if we go and hit add component on our platform I'm just going to do it on our prefab here so it adds it to both platforms at the same time and the component that I'm talking about is the platform effector 2d so if we go ahead and select our platform effector 2d here and we use one way everything is good yeah you pretty much don't need to set anything up the only thing you need to do is go to the edge Collider and click used by a vector and this way our platform effector 2d knows that it should use this Collider and what this does is it basically says to our platform if we go ahead and select one of them that you only need to collide with stuff within this arm arc here so if something is collided colliding with our platform from the top we'll go ahead and actually do the collision but if it's coming from the bottom will completely ignore it and if we're now at play we should see that we simply pass through we simply pass through our platform you will also see that it went ahead and actually applied the upwards force so it is registering a collision but we aren't axe colliding with the object so all we need to do is go into a script here and check whether or not our object is coming from the from below or from above and the easiest way to do this is using the collision dot relative velocity and this gives us the relative velocity between the two colliding objects and we can actually use this to say if collision relative velocity dot Y is less than or equal to zero well then we are coming from the top in which case we can actually go ahead and do all of this stuff and if not well then we simply don't want anything to happen so now we should see that this only triggers only triggers not the first time but the second time there we go and now we actually have the proper physics implemented for our character and all platforms yeah that went surprisingly well we haven't had a glitch yet that's awesome cool so the next thing that we should and the next thing that we should prob'ly implement here is some actual moving around of the player so let's go ahead and do that now so if we select our doodler we can go ahead and add a component and this component will just call something like player let's like C sharp hit create an ad and let's let's open this up in unity and this is just going to be a very very simple movement script so the first thing that we want is to get a reference to our rigidbody 2d so we'll create a rigidbody 2d call it RB and inside of our start method we'll set our be equal to get component of type grated body 2d then just to make sure that there will will always be a rigidbody component on the game object we'll go to the top of our class here and at the attribute require component of type rigidbody to V there we go so now we know that there's always going to be a rigidbody along with the script here and we are now getting it in the start method then we can go ahead and get some movement input and we'll do this inside of our update method so we can use input that get access and the access that we want to get is the horizontal movement axis we of course need to store this in some kind of barrel because we could of course just stored here call it movement and then go ahead and add all of our movement code here but remember whenever we are dealing with physics and unity we don't want to do movement inside of update we want to do it in fixed update so we'll go on instead of doing all this will create a separate function fixed update and this is where we'll do the actual movement however we still need to get our input inside the update so let's go up here and let's create a public float called movement and set it equal to zero by default well then inside of our update set movement equal to whatever input we get and then inside a fixed update we can go and set our peak velocity and this is where we want to change the X velocity so again we need to first get our velocity so vector to velocity equals our P dot velocity and we're doing this the exact same way that we did it before with the platform we're now modifying the X part of our velocity and setting it equal to our movement variable and then we are setting our P dot velocity back to our velocity our velocity vector so now if we save this we should see that if we hit play we are able to really really slowly move from side to side and indeed we are let's go ahead and multiply this with some kind of speed variable and actually I don't want this to be public at all I don't want us to be able to edit that in the inspector and I don't want to see it so instead let's create a public variable here public float call speed or movement speed let's do movement speed instead of equal to about ten by default then let's take this variable and multiply our input with this variable so whenever we get our movement here we we multiply our input by movements speed and now we should see that when we hit play when we have play we can much much quicker move from side to side you will also see that we get some crazy spinning on our doodle it looks really fun but it's not really intentional what we'll do here to get rid of that is simply go to our rigidbody and add a new constraint to freeze the rotation on the z-axis that's all you need to do really so just the play and now our doodle cannot rotate in any of the axes but you can see that we can control him and the movement actually works pretty nice cool so that's the base of our movement or physics pretty much the base of our games mechanics next is just generating a level for our player to move through and then of course having our camera follow him so what do you guys want to start with let me know in the chat Eiffel will pick whatever you want also if you have any questions at this point definitely let me know let's see here things are looking good so you guys are saying camera cool actually you're probably saying both camera and level but I think most people are saying camera so we'll go with camera so this is actually really easy all we need to do is go to our camera at a camera follow script and of course open this up and the first thing that we need is a variable that references our players so the target that we want to follow will create a public transform and we'll call it target and I can see something is wrong here with my autocomplete so I'm just gonna restart visual studio sometimes that happens in the new version I haven't quite figured out why yet so now we have our target and we'll just reference this through the inspector we can then delete our start method and inside of our update here what we want to do is check if our targets y value greater than our or at the cameras y-value in which case we want to move our camera because if you have ever played doodle jump you know that our camera will follow our player but only when the player moves upwards if he falls down the camera stays stationary and it won't move with him on the x-axis so it will really only move on the positive Y and that's why we're going here and check if our target position dot y is greater than our transformed up position dot Y well then we're ready to go ahead and move and the way that we'll move is we'll simply set transformed up position so a camera's position equal to a new vector3 and here was put 0 on the X we wanted to completely be centered on the X we'll input our target position Y on the Y and then we'll give it say negative 10 on the Z so of course you could also go in here and use transform position dot X and transform position dot Z if you just want to be able to adjust that in the inspector and this is a bit better to do it that way because this way you're not hard-coding in numbers so if we now save this and hit play we should see that whenever our doodle moves oops okay we also need to reference our target here so that's our doodler so whenever our doodler move above the center of our camera our camera starts switching or moving with him and that's that might actually be clearer over here so you can see that when he moves up here he takes the camera with him cool of course this movement is currently very sharp and we probably want to smooth it out a little bit to do this we can simply use transform vector 3 dot loop so if we go and take our new desired position here and stored in a separate variable vector three new paths and set it equal to this calculation here well then instead of just setting transform top position equal to the new position directly we'll go in and use vector 3 dot lerp and this is something also I also show how to do in the smooth camera follow video so if you want to learn more about looping and exactly what's going on here and how to get really smooth camera behavior definitely check that out but for now let just said vector3 or set a position equal to vector $3 first we give it the position that we are smoothly transitioning from and that's our current position so transform that position then we give it the position that we're transitioning to which is our new position your past and then we give it this smooth speed so here we'll go and create a public float call it smooth speed and set it equal to something like point three I will then give it our smooth speed here if we now save this and go into unity and hit play I'm sorry hit play here you can see that our camera is moving up in a much smoother fashion however we are getting a tiny bit of jitter you can see here that it looks like our doodle is jumping a little bit in air the reason for this is that we're currently moving our camera in the same method or in the update loop and where we want to move our camera is in the fixed update this is because fik not in fixed update I'm sorry in late update this is because late update is called late update because it updates later than the normal update method this means that first we move our character in update and fixed update and then we go ahead and move our camera inside of later update and we only want to move our camera after our player has moved so that we don't get any mixing back and forth between the two we don't want to move our camera and then move the play a little bit and then we move the camera to where the player was before and then we move the player again now we want our camera to always be sort of say behind our player and that's why we use the late update here instead if we're now going and hit play here we should see that our camera smoothly will move that wasn't too smooth these sort of things always mess up come on Yesi this is not smooth behavior I should watch my own video it's probably a reason for this I'm not sure I'm going to spend too much time debugging this um today I definitely recommend you check out this smooth camera behavior video do you guys have any idea of why this is happening in the chat definitely let me know I think the main problem here is maybe that vector3 that loop wasn't built for this sort of use what you should use instead is smooth damp and I believe that's part of physics 6 that smooth damp nope Victor 3 dead smooth them smooth and okay it's here and this is actually much better for doing this sort of calculation we can try and use this on the go you added to that yeah we can transition to this so our current position is the first one so let's transform dot position the next one is to target position so that's a new paths we then Rev our current velocity so we need to go up here and create a private float called current velocity and simply default this to zero or is this bad this is a victor three of course make the three current velocity and we don't need to default back to anything we'll input our current velocity here and then our smooth time and that is our smooth speak here there we go and this is of course a ref alright let's try with this instead and see if that works better let's hit play here and I think now that we should get much smoother behavior in T no God darn it why is this happening to me let's try and have a look at our player here so we are moving him inside of the fixed update maybe it has something to do with the fact that we are modifying his velocity directly and so it needs o Delta time that's why ok so inside of our camera follow here we need smooth speed multiply it with time that Delta time and now hopefully we'll get smooth behavior I think that was smooth you guys tell me I think it was yes this looks much smoother now and I think if we go ahead and increase our smooth speed here so two two maybe yeah then it starts jumping a bit again okay I think we're kind of getting past the way or past the amount of time that we can can spend on this I've always found smoothing like this really really weird you know what I think it's much nicer if our game actually just you know snaps to the position I think this doesn't get in in the way of gameplay it just it just works no one is referencing any variables we can just say that he'll play and yeah I mean this this is the sort of behavior that we were looking for I'm sorry about that guys that tested it before maybe it has something to do with the fact that I'm recording and that Messi that's messing with the framerate I don't know why this is happening but definitely go watch my video it was smooth on that one and and you answer about that but we kind of have to move on here so yeah we'll get rid of the smooth speed variable because otherwise it will just be staring us in the in the face and we'll be all thinking about it and yeah all right let's move on so the final part of this a nice thought camera behavior was going to be easy anyways we are moving on the final part of this is much more important and that is generating a cool level so to do that we need to go and create an empty game object that's reset the transform and let's name this something like level level generator let's move it to the top here move it to the top let's add a component called level generator let's choose C sharp hey create an ADD and let's double click this to open it up in visual studio and let's quickly get past our camera follow script please please remove it from my screen there we go we'll cut that out in YouTube all right so oh I'm kidding so the level generator basically there are a billion gazillion million ways to do level generation in unity and pretty much in programming in general and of course there are good ways and there are bad ways and their mediocre ways but really the easiest way to do it is by generating the entire level at one time not procedurally as we go through but just generating it at the start and that's what we'll be doing in this video what I recommend is if you're creating this game here and you want to publish it at some point is that you generate the level as the player is moving through it the good thing about this is that your get your level will be infinite and that you will loading the level as you're playing it and so you don't have to store a huge level at once but only maybe everything near the player again this is this is maybe a better way of doing things but it's also a lot more tricky what we'll want to do here's just a simple introduction to how you can use randomness to layout a level and to do this we first need a reference to our platform so we'll go plot public game objects we'll call it platform prefab we'll also need three other variables the first one is a public integer with the number of platforms that we want to spawn the second one is going to store the width of our level so level with I will default this to something like our node 3 and then finally we'll have to public floats one for the minimum why and we'll set this to something like point two and one front for the maximum why and we'll set this to something like 1.5 now what do these different variables mean well let's go through them as we start to generate our level the first thing that we want to do is only generate up to the number of platforms we specify and that means that we can create a for loop where we loop through where I set to 0 and we increase I and loop through until we've reached our number of platforms so this will loop through 200 times then what we can do is go in here and create so we'll instantiate a platform prefab and of course we need to specify a position for this prefab so we'll give it some kind of spawn position and this is what will define in a second we'll also give it a rotation but for that will just use quaternion third identity which means that we won't rotate the object at all now we can go ahead and create our vector three this is going to be our spawn position and let's just set this to a new vector3 five to four then right before we instantiate each platform we'll go ahead and increase spawn position on the Y by a random value so we'll increase this so plus equals random range and we want this random value to go between our minimum Y and our maximum Y so now every time we create a new platform we increase our Y value with the with something between 0.2 and 1.5 and we then instantiate a plat a platform at this position and we then loop through again if we go ahead and save this we should see we should see that we generate 200 platforms oops we have to first off specify a platform here we have to set the number of platforms to a hundred or 200 maybe even 200 and we can actually give it a default value here of 200 so if we now I play we should see that we generate 200 platforms with varying you can see here with varying distance between them but all on this with the same exposition of zero and we can actually jump through all of these platforms right now it's not too exciting or hard but you can see that the base of the game is now working and this is going to be 200 platforms tall what we can then do is simply go ahead and give them a random x value so we can go in here and say spawn position dot X and then we can set this equal to a random value between negative level width and positive level with and this means now then that for every platform it's going to pick a totally random x-value and you can now see that this actually looks like doodle jump we get to jump between these platforms they're totally random distances between them which means that things look varied and you can see that we can sometimes jump from one screen one side of the screen to another so there you have it that's actually all I wanted to show you how to create today I'm sorry about the little mess-up with our camera follow but I think this is really the core of what dual jump is all about and if you want you can go into your and randomize what platforms you create if you wanted to create a special platform so if we wanted to make this platform here special we could go in here and change the sprite renderer here to a blue okay this is not pretty but just an example and then we could go in and simply add or up the amount of jump force to something like 40 and now whenever we jump on this platform hey we jump really really far so you could place these in random parts of the level and simply have them function as boost in the same way that the original doodle jump uses Springs it would also easily do something along those lines with a jetpack or you could have platforms break in the same way that Dula jump does by simply removing the platform script and then instead simply destroying the platform whenever it's it gets touched by the duel yeah and I think that's pretty much where we're going to stop for today I just I was sick not long ago so my my voice kind of stops functioning around this time and I've been talking quite a bit I hope you guys liked the tutorial I'll make sure to of course upload it to github so you can download the product there and play around with it and definitely sent to me on Twitter at practice tweet if you make something cool using this system it doesn't have to be with too little graphics or anything just want to see you you guys using this that's always the coolest part but yeah I hope you guys enjoyed the tutorial part of this die stream and now we're ready to train over to a Q&A format and I'll kind of lay back in my chair here now and breathe and think more about or try not to think about why the camera wasn't functioning I'm sure you guys will say something clear about that in the comments of the video but now we'll switch over to the chat there we go awesome so ask questions let me know what you guys are thinking and what you want to know something about will this be on YouTube yes no path Delta time I thought we tried that maybe oh yeah I'm Victor 3 that live with Delta time maybe I don't think that's the nice thing though will this be over yes it will where's the object pool track oh yeah you could definitely um set this up using an object pole so basically you just I think um the way that I probably would set this up is I would generate all the positions of the platforms and then as the player got closer to the platforms I would spawn the platforms in using an object pool so a bunch of platforms that were already sitting around would simply enable them and swap them to the given position so you could definitely utilize an object pool for this game and it's definitely something that I would do especially if you're making it for mobile so yeah hello cool video in streams how can I make the same text colourist in visual studio so I we actually have a video up showing my unity set up along with visual studio and the theme is called mono Kai and there is a visual studio version for that as well and yeah it's really great so you can check out that video if you want it's called something like brekkie is set up settings something like something along those lines traffic a our tutorial maybe not that might be a bit too specific but it does sounds fun as a side project what's easier for me to do live streams or video tutorials so that's a difficult question because of course there is not much on editing involved with live streams so I think Sophia has a lot or things things livestreams are pretty easy on my part I think live streams are really taxing because there's quite a bit of preparation today not enough with the camera again don't mention it and there's also of course the actual doing the tutorial and that does require more energy when when doing it live and responding to chat and trying to fix errors trying to and and kind of the entire Q&A and everything so for me live streams are probably more taxing but it's really I mean again we make it in one day the live streams normally so it's not it's not that bad compared to some of the really really tightly edited videos how can I use light in a 2d scene well you actually just go in here you add in a point light let me go I need to switch over here I'm sorry I always forget to switch the layout here so mean there we go so you go into you're going to unity here you create a light let's do a point light here let's just place it in front of our sprites here then let's go and let's just select our background for example and instead of using sprites defaults we'll go in and select any other material here if we use default diffuse you can see what happens here we can also go and create a custom material here that's called it light light it sprite and in here I think under sprites we have a diffuse sprite and if we now use that for the background here so we'll use lighted sprite here you can see that we now apply light to this right and we can just drag this on to any objects there you go and now our 2d objects are affected by lights yeah so I actually have I'm planning to do a video on top 2d assets and one of them is a really cool one called to 2d DL which stands for to 2d dynamic lights and shadows I think it's called I'm just gonna write it in the chat here to DDL and that allows you to do shadows in Judy and get some nice-looking lighting effects but I think you can do quite a bit of cool stuff using just this way of adding lighting especially if you add some normal mapping on top of your sprites and stuff like that but it does require a bit of unity knowledge so yeah I'll switch back into chat mode here do you have some tips for a guy like me who want to share a game on gamejolt or steam I don't have too many tips for you there because I haven't done it too much myself of course I've put some games on the internet but I haven't really tried and market bigger games the primary thing that I did was start a YouTube channel you know when I wanted to make my first game some and was working on a project I thought how do I get people to actually see this and and the main thing is you have to think about what channels are people using to find information in my case I wanted to kind of do some videos on on unity tutorials because I saw that people were trying to find tutorial content in unity and there wasn't much there so I thought well I could tap into this market and and then maybe I could use or I thought I would be using that to promote my games but I ended up doing that full time instead and you don't have to do tutorials per se you can also just take elements from your game that looks cold if you find them and put them on graded and that's a way to to generate some traction so really just try and take the stuff that looks coolest from your game and place it in in places where people are looking at these things will you continue your multiplayer FPS tutorial series no unfortunately that series has been OK cancelled seems very that's a very negative word but I simply had no more that I wanted to do with that series I felt burned out with it towards the end and I really want to do more standalone stuff that's not to say that I won't do more for FPS stuff or do more multiplayer stuff but it's always going to be in another format in another series I don't think I will be returning to that one due program in other languages than c-sharp - yes I do programming other languages mostly when I'm working on website stuff I'm really fond of using Jekyll which allows me to program in symbol HTML and CSS and a bit of JavaScript or jQuery and that's that just works really well for me when doing web stuff I've also programmed a bit in C++ not too much C though but I have programmed in Java and tried to make my own small game engine in Java which was a really fun project so I've tried a few different things bye bye now why don't you make a game publishing tutorial that is a good question again because I don't have too much knowledge on the matter but I could definitely look into it at some point what about an MMO type game like League or dota those are way too difficult simply I'm sorry I'm sitting in my java class right now long okay that's good well will I make a multiplayer system in unity that depends on what you mean by a multiplayer system I definitely want to do some more on multiplayer stuff I hear that unit has evolved quite a bit since my my multiplayer PS course and definitely want to we explore it a bit but I haven't planned on anything specific yet or planning on doing more unity tutorials on 2d games because I'm very interested in isometric games like hyper light drifter I would definitely do love to do something with 2d isometric games I would also love to do something using the new unity 2d tile lab tools so definitely want to do more 2d stuff maybe for a live stream at some point make tutorial on machine learning an area in unity that would also be really really cool but probably not something that I could put into a single tutorial let's see VR tutorials in the future VR is this thing that a lot of people request really but the problem for me with with doing V or specific tutorials is that I don't have a headset so if I forget sent one maybe please guys HTC no oculus maybe that's that's the main barrier and then of course that's also that I think it's it's a fairly limited amount of people who own VR gear and VR dev kits and I think a large portion of my subscribers would wouldn't necessarily be interested in it but that's not to say that I couldn't do a single video or two on the subject which I would definitely want to do um thanks for the guy people saying that they like the videos and stuff like that I really appreciate it thanks guys um let's see can you make rolling sky game I don't I don't think I'm familiar with this one I'm sorry if it's something bigger that I should know about how do you store high scores and a fully published games there are definitely plugins for that but I mean your story them server-side and then it really just depends on how much security you want that's that's my really annoying answer will we ever get to play a game of yours well I've made plenty of games for the dev diary that are completely free or and available for you to play I'm just gonna find open up LD jam here and see if I can quickly very quickly break his LD jam hopefully this appears on Google here because then I'm just going to link you to my game library that should be somewhere around here so this here is the on the new little diary website where I've made a game called shrinking planet that some of you might know about and I've also made some older ones like ticking and maniac Inc which are on the old Ludum dare a website so if I go Ludum dare a break he's hopefully I can also get a link to the old site I don't think this appears on YouTube actually but I have a few making of videos on those games as well so really just visit my youtube channel and and on there you can find making of of all three games and links to play them so have fun with those and also I have a video coming up very very soon now it's this was Wednesday on on my newest a game that I made in a short amount of time called gombo that I really hope that you guys will think it's cool it's kind of hard for you guys to play alone so I don't know if I will be providing a download thing for the game because it's meant to be played with a controller and I've set it up with an old ps3 controller and then multiple people but definitely hope that you will enjoy the video could you make tutorial spouts game or sound design in uni I do have very few tutorials on sound and I should probably do more but it's just not something that get requested a lot I don't know I think a lot of people underestimate the importance of sound when it comes to game development when will you make a how to make a GTA 5 in unity stream how about tomorrow sounds good it's not gonna happen man do you have a TT X 1080 nope I think the one that I'm using is 960 no that's not right I'm using an older one I don't remember I also wait for the half-life 3 in unity stream thanks guys you guys really constructive about the questions at this point I would have topic but do you have a fear of running out of content to make tutorials on or do I feel I may come to a point that I don't know what to do next that's a really good question fortunately I think I can pretty confidently say no first of all YouTube and unity and the game development industry is just moving so darn quickly there's always something new to cover there's always a new feature is something that you guys want to see a new genre a new mechanic so that's nice sometimes it can be hard to come up with ideas for videos but that's mostly because we always trying to find a sweet spot between something that we find thing is fun and that we think you guys are interested in and actually want to see versus just making documentation on the feature that no one knows about or even cares about so that's the hard part that's finding something that we can present in a really interesting way that you guys think is fun while still being relevant and and while still being something that you can hopefully learn something from but I think even if I was to completely exhaust every tutorial that is to make about unity could move on to other software so do game design related videos if you haven't seen my video on come on what makes combat fun definitely check that out because that's that's a completely different format with so I mean endless amounts of videos potential because that's just thinking about game design and that's something that I haven't talked about so the answer is no how any book recommendations I'm sorry I don't read that many books I don't actually have any good recommendations for you especially not if you're interested in unity and c-sharp and stuff I I think the only book that I've read that they've helped me in my c-sharp programming was introduction or beginner's guide to c-sharp by Jason Lynn I think something along those lines one of the first books that I read on on programming and that was really useful when just starting out but yeah I'm not the right person to ask for that how old am i I am 20 years old and I think it's ready guys or it's time to kind of wrap it up and ask the last questions now and we'll try and quick-fire these last ones because my throat is just telling me to quit at this point so let's do the the last stretch here I would love more game design videos that's good to know definitely which language is better see if you are per JavaScript completely depends on what you want to do if you think about programming in C sharp or in unity I would I would always recommend C sharp but if you're a beginner picking up JavaScript can be much easier for you to learn the entry barrier is lower because it it reads more like English you're comparing see chapters JavaScript can you make a UI tips video good idea noted thanks for you you were saying that that that you liked this stuff and and and I really appreciate it guys you guys Rock let's see any last questions how about making trading card game tutorial that could also be fun definitely something with cards that's at some point will you participate in the next do don't re on 1st December I cannot do that because I am at Dreamhack unless that particular date dree Michaels moved to the beginning of December this year but I will be on in Dreamhack Malmo from the 1st to the 4th so if any of you guys are going to that let me know on Twitter we could of course say hi that would be really fun chess game tutorial could be fun I'm not that good of chess at Chester I would probably embarrass myself but I do know the rules or it could probably programming am i a complete beginner I am a complete beginner any advice practice and do something that you have fun with and try and keep the scope down I'm sorry to the guys that I couldn't answer I'm trying to answer as most much as possible different difference between unity unreal I can't answer that in a rapid-fire way you need is better for very small teams you your unreal is better before or it can be Barry for larger that's not even something that you can say there's so many exceptions and considerations to make answer cannot do that I should make a video on the subject though are you open for dev collapse or do you accept projects that come float completely depends I you can of course write a mail to me if you have something concrete that you want to talk about I read my emails a 3d tower defense while controlling a character would be awesome like sanctum that's way too specific but you can take out the tower defense course and put a 3d character in that if you want how to spell your real name Espeon that's a SP j RM where can i watch the stream again on youtube this sunday and you can actually also watch it right when this is done in the twitch archive forgot to mention that but that will be gone in a couple of weeks you make a new series about FPS multiple no DLC tutorial maybe that completely depends on your game suggestions we have talked about that tutor on neural networks I love networks they're really really inherently interesting maybe do something on that at some point what is your best score and shrinking planet I forgot but that's a really good score and that shouldn't be allowed to happen and what's my real life job this is my real life job and there we go I'm sorry guys that is why is the J style it's not SP on SP on BIA BIA it's there yeah yeah okay anyways thank you so much guys I'm afraid we can't do any more questions I hope you guys enjoyed it as much as I did you guys are just you're amazing and I always loved live streaming and reading the chat here and answering you guys questions I hope you liked the project I hope you like Q a time if you want to support the live streams the videos anything like that head on over to patreon at patreon.com slash breccia so I'm gonna put it inside the chat here now so you can go there immediately now here you go patreon.com slash Breck ease it's a great way for you guys to support what we're doing both Sophia and I and it really helps keep the channel alive you can donate any amount monthly of your choosing you can cancel it if you want you can keep going you guys Rock so yeah thanks for the stream guys have a lot of fun and I will see you in the next video bye thanks of the awesome patreon supporters who donated in October and a special thanks to Judy Minh Armand pence off-tune kookaburra Superman the great James P Thomas Bali Sybok mummy Jason the Tito Derek him skirt faithlyn Fi manolis Nick Lang Aaron Robert Bund and Peter Locke you guys Rock
Info
Channel: Brackeys
Views: 209,129
Rating: undefined out of 5
Keywords: brackeys, unity, unity3d, asset, assets, model, texture, models, textures, beginner, easy, how, to, howto, learn, course, tutorial, tutorials, game, development, develop, games, programming, coding, basic, basics, C#, doodle, jump, doodle jump, replica, live, stream, livestream, jumper, infinite
Id: fHN-26GEVhA
Channel Id: undefined
Length: 59min 39sec (3579 seconds)
Published: Sun Nov 05 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.