UNITY TUTORIAL - 2D TOP DOWN SHOOTER - LIVESTREAM

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey hey hey all right so tell me everyone if things are lagging or if I fix the issue all right things should be good yeah okay hey aleksander sunny again Hey all right so hopefully things are good now and yeah without further ado you like to actually start making our 2d top-down shooter using unity and c-sharp and if you want some more info if you missed the very beginning of the line you can always look at the little announcement video I made to have a more clear idea of what we'll be making throughout this I think 45 minutes to one hour stream so first things first we need to actually get our player character moving around the environment okay no like any more awesome that is just so good to hear all right so I've just made these two very simple sprites using Adobe Photoshop so I've basically got this circle and this basically this cool-looking cursor you can definitely go ahead and make those in Photoshop or you can just use unities basic sprites there it's default sprites I'm just gonna use this simple circle drag and drop it inside my scene and call it player and I'm gonna start by creating a scripts folder scripts and we're gonna actually I got player character moving around the environment so I'll create a new C sharp scripts call it clear oh yeah player and open our inside of monodevelop now just for those of you having not seen the announcement video this is a real beginner tutorial so if you're new to unity you should be able to follow along quite easily all right let me check the chance all right there's a few tutorial requests of course I'll be answering all your questions if you have any by the end of the ride so definitely stick around for that if you have any questions or video requests okay so let's actually starts creating this player controller so I'm going to get rid of all this and I'll start by making a public float variable called speed which will have the name implies just dictates how fast our character is going to move around the environments I'll then grab a reference to my 2d rigidbody because we're going to be moving our player character using physics so we definitely need the rigidbody 2d and in my star function I'll grab a reference to that rigidbody by setting it equal to Dec components rigidbody 2d alright so now that we need to do in our update function is actually gather player inputs in other words we're gonna have to check whether or not our player is actually holding down the arrow keys and if he is we'll get it moving so the way I'm going to do that is I'm going to make a vector two variable right in here and call that move input and then set that equal to a new vector to and inside and for the x-value now set that equal to input get axis horizontal and for the y-axis I'll set that equal to input axis vertical so basically whenever we hit the our keys move inputs will have different X or Y values I'll now make a last variable Y up here called I'm going to say that to private of type vector to and I'll call it move velocity whoops move velocity and now said that equal to move input dot normalized and the reason I type dot normalized is because if we don't when when the player moves diagonally he'll move a lot faster than when you moved up down left or right so don't forget the dot normalized and then I'll multiply that with speed or this make sure everybody's following along nicely the stream has some consistent FPS drops as you're typing all right tell me that becomes really bothering I I think the settings are pretty good for now so I'm now going to redo the stream but hopefully that will bother you too much okay all right awesome so now so all this code won't actually get our player character moving around the scene we now need to move them using our rigidbody so whenever you're moving a character or an object with physics so with rigid bodies you usually write all that code inside of the fixed update function and I'm going to be using the Move position function that comes with unity and all I need to type in these parenthesis is our B dot position plus new velocity times time dot fixed Delta time now hopefully this is quite clear if you're really confused I have a whole tutorial on this on how to make exactly this script it's a six minutes long and I go in a lot more detail so if you want to understand this a little better I def I highly recommend you check that out after the stream but yeah that's basically this code is basically gonna get our player character moving around yet the environment so I'm going to grab our player I will drag and drop my player script onto him type in some value for speed I think 35 should be should be nice and I also add a 2d rigidbody and don't forget we need this 2d rigidbody our player will not move and I also said the body type to kinematic so he's not influenced by any external forces so let me hit play test this out and things should be working really nicely now if you want the movement to be a little more snappy remember the cool trick just to type in input dog get access raw instead of get access that's really it's a nice little trick that you can use to get more snap irresponsive movements as you can see right here alright let's make sure everybody's following along nicely to the endless-runner can probably be made in a solid 15 minutes yeah most probably a nice endless runner could be made very quickly okay so there's no questions I hope everybody is following along nicely I was the difference between RB DeMuth position and our bead of velocity our bead of loss is basically influencing the speed of the rigidbody its forces NRV DeMuth position is basically moving the rigidbody from one position to another hopefully that makes a little sense it's true that the difference is quite hard to explain but in this case our BW position is easier to use and yeah quicker okay so now that our player character is moving around the scene let's actually make an enemy so I'm going to duplicate our player I'm going to get rid of the player components and the 2d rigidbody and I'm going to create a new script called enemy and so yeah we're going to make a very simple enemy AI where he's just going to be following the player trying to reduce it health to zero so I will rename this object to enemy drag and drop that onto the enemy I'll also give him a red color so we can differentiate them from the player and yeah I'm gonna open the app and begin coding this simple AI movement and for those of you haven't seen my enemy AI tutorial you'll not to do this it's very easy I'm just going to create a public float variable called speed has usual and in my update function I'm going to want to move the enemies so that the enemy's position using vector to move to Ward's and I would want them to move this enemy from his position to the player's position so obviously I need to grab a reference to my player and the way I'm gonna do that is just make a private variable of type transform called player pose for position every start function I will set clear pause equal to whatever game object in my a my scene which has a tag of type or called player and more precisely the transform component of that object so we get component transform and now I need to do to get my enemy moving towards the player is typed transform position and then so that's the enemy's position and I need to type in what position I want him to move towards so the player position of course and at what speed husband speed times time dots Delta time awesome and now our enemy will actually move towards the player character of course do not forget to add the player tag to that player or the enemy will just not find him oh there seems to be an error and of course that's because I forgot to type in dot position because we're moving removing towards a position and not just some player pause but doesn't make any sense and now be able to type in some value for the enemies speed I think ten should be perfect and there we go our enemy character it's actually moving towards our player awesome I'll check the chance oh look there's my brother Leon is joined in on the stream hey Leon Oh mine there's actually Emma hey as well awesome goodness me okay this other's Raph alright so things look things seem to be going along nicely cool alright so let me continue so car enemy actually following the player we've got the player following another player who can move around now I think we're gonna actually get the enemies spawning around the environments that's the next step in this 2d top-down shooter so I'm going to create an empty go excuse me an empty game objects I'll reset its and call it spawner and underneath this spawner gameobjects I'm going to create a couple of a couple spawn points and this is basically the positions where enemies are going to spawn from so I'll call this spawn point and I'm going to also give it a little dismal so we can easily see it so we can easily see it in the scene view I'm also going to increase the size of those gizmos so there you go now we can see where our spawn points are and I'm think I'm gonna duplicate this several times around the map I think that should do something like that and now I'm gonna create a new C sharp script called spawner drag and drop that on to the spawner game object and open it up so now we're going to actually get our enemies instantiating themselves at a random position and that's a certain interval of time so this is really easy peasy the first thing we need to do is create a public game object variable called enemy let me make sure things are going along well cool cool cool alright guys of course don't hesitate to ask me questions if you have any problems if you're not understanding something definitely don't hesitate why not use doc transform for what exactly alright okay yeah so if you've got any question don't hesitate in the meantime I'm going to continue making this spawner script so I'm going to make a another variable now actually I'm gonna make an array now of type transform called spawn spots or something like that and so we're gonna be grabbing a random spawn pawn spots every X amount of seconds and spawn an enemy so I'm going to make that variable a private variable of type what's called time between spawns as well has a public float called start time between spots and now this may be a little confusing but if you've watched a couple of my tutorials you understand where all this is leading us to in my update function I'll make an if statements and check whether tie between spawns is less or equal to zero now if it is that means it's time to actually spawn an enemy inside of our game view if not we're simply going to decrease the time between spawns value so using minus equals time dots Delta time as easy as that and so if time between spawns is less or equal to zero like spawning an enemy using instantiates salt I can instantiate now inside the parentheses I need to dictate 92 say why want to spawn so the enemy and at what position so here's where our little randomness comes into play I'll make an int variable called vanpools and set that equal trove and a number between 0 and the number of elements inside of my spawn points my spawn spots excuse me array and so I'll then say spawn pause spawn spots excuse me it's quite hard to say and a random position so hopefully that makes sense basically we're taking a random spawn spot from our array and then spawning an enemy at that random spawn points spawn spots position and with no rotation of course using quaternion identity now one last thing we need to do before testing all of this out is make sure to reset time between spawns otherwise enemies will just spawn every single frame our game runs and the game will crash so I'll type in time between spawns is equal to start time between spawns so hopefully now you understand why I made these two variables so instead of hard-coding the value you can just easily tweak it inside of the inspector I think I also set time between spawns equal to start time between spawns inside the start function all right so that's the spawner script all done let me check the chance so the ABS explaining some stuff thank you bro so what are so great about okay oh yes right you're completely right Marcel I need to actually set spawn plot start lane spawn spots don't length minus one otherwise there will be there'll be a little error because member erased out as zero and they don't start index of one it's a little confusing but yeah well spotted put in that minus one okay so now I've got an error let me check this error instantiate off again I made the same mistake I need to make sure to put in dot position or we're not actually spawning any position and it doesn't make any sense so don't forget the dot position for the area for the location of our spawned enemy those errors to disappear right now awesome and so yeah there we need to drag and drop our enemy character what we're gonna do is first of all create a folder called prefabs and drag and drop that enemy inside of the prefabs folder so we're basically making a prefab out of our enemy I'm gonna deletes it from the scene view and I'm just gonna drag and drop the enemy inside of that empty slots awesome and now I need to drag and drop all of my spawn spots inside of this spawn spots array so I'm going to lock the inspector this is a cool trick to quickly drag and drop loads of elements inside of the same enraged you just lock the inspector shift selects all the spawn points and then drag and drop them inside of the array and you'll see they'll all be added to the array which is a very a nice little trick very known but yeah it's good to know and for start time between spawns I'll say every 1.5 seconds there'll be an enemy spawning in our scene of course you can with this you can tweak this has you like but I yeah that's the value I'm gonna give the spawner and hitting play we should see enemies spawning every 1.5 seconds as you can see right here awesome so things are working really well of course now we need to give our player a way to defend themselves so let's actually create the very simple little shooting system so I'm going to drag and drop know why when I first of all do is create a new C sharp script so and I'm gonna call this shooting and open this up inside of monodevelop so what we need to do here is beta them I'm gonna once the player shooting and aiming with the mouse so wherever he clicks on that's where the shot is going to move towards this is very straightforward stuff to do if you've checked out my customisable cursor tutorial usually have absolutely no problem with this but anyway I'm gonna show you this step by step right now let me check the chats first of all your chef enemies can spawn an old spawner I think the last spawner of the array will never spawn ah some of you are wondering if this minus one is really necessary I think you're actually right actually I always get confused with this but you know what I'm gonna get rid of the minus one and if there's an error I know I'll just need to add a minus one but yeah let's just remove that I think things should work nicely okay so when that dam is actually start creating our shooting scripts this is really easy stuff I'm gonna create a public a game object variable called shots basically the project tile our player character I'll be shooting and we want this shot has soon as it spawns no yes yes sorry so we're gonna want to check if we hit if you actually click our left mouse buttons outside inputs don't get mouse button down and I'll type in 0 for left if you want to use the right mouse button and you'll just type in 1 and if you want the middle mouse button it will be 2 but usually it's the left mouse button so I'll type in 0 and then I'll instantiate that shot [Music] so it's instantiate shot at the players the players position so I'm going to grab a reference to the player so I'll type in privates yes transform where polls at a my start function I'll type in clear pause is equal to the components of type transform because obviously we will be dragging dropping this script on to our player character whips player pulls excuse me and now all I need to do is type player pose and don't forget the dot position and I don't want any rotation so quaternion dots identity so now our player character will be able to shoot these various show there seems to be a little error of course I forgot the semicolon so now the player catch will be able to shoot various product tiles I'll drag and drop the shooting script onto him and I need to create a project tile so I'll just yeah I'll just drag and drop this little circle scale it down the little I'll call it unlock the inspector don't forget to unlock the inspector see right now I actually drag and drops my shooting script onto the spawner which we definitely don't want I'm going to instead drag and drop it onto my player as I'm going to call this project I'll turn it into a prefab alright and then I'm gonna delete it from my scene and drag and drop it inside of the inspector so now if I hit play and click like a maniac you'll see I'm spawning all these cool little project tiles of course we want these project Isles actually moving towards our cursors position so we're gonna have to create another script and I'm gonna call this project I'll and open it up once again let me check the chance things seem to be going well again if you've got any problems ask me or my brother helium seems quite active in the chat you can definitely help you out but yeah I think for now things are going really nicely so what we need to do to get our project house actually moving towards our mouse cursor is as soon as they actually end so we'll make a private a private vector3 variable called target and inside the start function I would say target equal to camera dot main dot screen to world points and of course the input mouse position so what this basically means is as soon has the planet Alice spawned its target variable will be equal to the cursors position and now what we want to do is get that front of town moving towards that target position simply using has use will transform dot position equals vector to move towards and I'll move from the prior tells current position all the way to the target position the type of target nor knee for position here I believe because it's a vector to AH and yeah of course make a public flow speed variable to dictate how fast our product owl will be moving towards its target so I'll type in speed times time dots Delta time and that should be working nicely don't forget the semicolon I'll head into unity dragon jaws will grab my project I'll prefab and add the project I'll script to it yeah let's speed and there are 15 for example hit play and things are working for the knife and you see here the project ELLs are actually moving toward my cursors position at the moment where was spawned but they look a little dumb right now just floating around the scene makes no sense so how soon has the actually reach that target position I'm going to get them to destroy themselves so I'll do that in a moment let me check the chance a so s bill productions it asking where did the name Blackthorne Claud come from athletes um I name I just came up with when I was I think 12 year old I really love creating worlds on paper just like fictional worlds like your World of Warcraft or Warhammer I love the sort of worlds so I decided to make my own world called Blackthorne and yeah I just stuck with that name afterwards and I called it black thorn prod just for black thorn production but there's no deep deep thought really going into the name black thumb produts a name I came up with when I was yeah their kid and I saw I just stuck with it but yeah originally it was just the name for world I was building a paper drawing Maps all that stuff but now I've become the name of my youtube channel and all of the games I make are under the name black thumb trot okay for 2d games is it easier to use game making programs specific for 2d games interesting question well I believe the unities it's amazing for 2d games and 3d games I recommend unity to absolutely anyone but there is game maker which is a suti specific and it's really awesome apparently I'm now used it by it is great I it's easier to use the immunity but yeah if you're looking to only make 2d games that could be something to check out of course oh hey no vaccine no back to you on the chats awesome okay things seem to be growing nicely let's get those project tiles destroying themselves when they actually reach the target position and the way I'm going to do that is simply make an if statement checking whether my current position is equal to the targets position and if it is I will just destroy the project tile using destroy game objects and now if I hit play you'll see I get a bug huh of course no no no no no no I cannot do that I cannot do that how can I do it then hmm how can I check when it actually reaches current position I believe I used transformed opposition is equal equally let me check is equal equals a target or position nah and having a bug here guys this is strange and probably very done I just can't see it yes of course Thank You Leon tell distance let me check vector 2 dot distance so based on your chain the distance between my current position and my target position and if that is less then let's say is your point 2f then I will destroy my game objects and that should work bug please go away and it does Thank You Liam for saving me there sometimes when I'm live this is the second time I do panic for no reason and I get these silly bugs and there you go okay all right guys also things are working pretty well I think I'm actually going to increase the speed of my product tile because it's a little too slow right now I think 40 yeah that's putting a value of 40 there all right great so we've got cool product tiles there are no particle effects currently but will maybe add them at the end of the life if if things are not too long if you've got some time left okay so now what we're gonna do is actually check for collisions by yeah checking whether the enemies actually collide with the player and if they do that we want our player losing health so let actually make our health for a player I'm gonna make a public int variable called health and I'm gonna set this equal to ten has a default value and now when my enemies actually collide with the players I'll use Boyd on trigger enter 2d and I'll pass in a parameter of type Collider 2d cold other and so yeah if if what the enemy is collided with is another is a player's alright other don't compare tag player then we want the player losing health sulfite player losing health has a comment of course we actually need to grab a reference throw up their character so I'll make a private variable of type player cold yeah player just yeah simply player and simply said that equal as I'm gonna copy paste this change that to player and I'll say that equal to the game object of type player and more precisely the player component script attached to that game object I hope that makes sense but it's gonna work I promise you guys all I need to do now is type player dot health - - and now my player will lose one health points whenever my enemy collide with it I'm also gonna get my enemy to destroy himself as soon as he actually collides with that player's all this right destroy game objects and now things should work really well oh yeah also debug dot log that held the value to make sure things are working nicely it's alright player whoops played our health inside of these parentheses let me test this out inside of unity oh of course when testing for collisions don't forget to add colliders to your game objects so I'll need to add a circle Collider to my player make sure it's not too big so I'll decrease the radius ever so slightly a cool trick when decreasing the radius or tweaking the offset of a Collider is holding down alt and so then you'll get a much more precise order a lot more precise when tweaking its ranges or offsets and of course don't forget to add a circle Collider to the enemies and I'll make sure to decrease the radius of that as well hit apply and there we go things should work nicely oh yeah don't forget to set the circle Collider 2d to is trigger because remember we're checking ontriggerenter 2d and hitting play I hope things will work nicely and they do awesome health 9 and you see my enemy destroys himself my player is losing health things are coming along really well alright now I think it's time our enemy our player excuse me to actually shoot down the enemies so we're gonna do that in just a moment let me make sure there are no questions in the chat okay ok thnks I mean alright hey man would you ever need someone else to make music for your games all my dig the DJ that is exactly what I need that's exactly what I need music for those of you who followed me for some a few months now at least you'll know that music is my weak points I'm not really good at music I've not spent much time on it I use a software called I'm not gonna trance the names I always pronounce is wrong it's called something like busca see oil I try to pronounce that terribly but it works really well except the and we're not gonna music I do not very good musics you can hear my music from in my London Bear games actually made the music for those beyond always searching for someone to help me with the audio part of my game hey Noah can you make a video about tips and tricks and unity and I would really enjoy making that sort of tutorial I know that Blackie's has already did two cool tips and tricks videos but if I actually find son that he has already covered I'll be really happy to make a video on that topic definitely Oh Christy said I pronounced busca CRM rights awesome mm-hmm awesome itself using getcomponent type of transform why not use oh yes I see what you mean yes guys he's completely right instead of using dark a component transform you could just type in got transform and that would still work perfectly thanks for pointing that out Christy very very good yet you can do that don't need to write has most code yeah nice developer says that FL Studio is a great software to make music for your games huh I have the check bounced I'll definitely check now later awesome anywhere we can get more in contact with you can also you can join my discord server the link is in the description so if you want to be able to talk chat with me that's a great place to be I also announced all my videos on that server you could talk with really great people on there about game development your arts so yeah definitely join the discord server the link is in the description of this livestream yeah I highly recommend you do that guys it'll be awesome also demon strong is saying that seeing me do this inspires him to follow his dreams I'm so happy that that's the case yes it's so nice to hear thanks okay guys so let's actually um continue with this game by getting our projectiles hurting the enemy so inside of my enemies script and of the ontriggerenter 2d function I'll make another diff Statesman's this time checking if what the enemy is collided with is a projectile so other dot compare tagged projectile and if that's the case that we want our enemy character destroying himself and that should work marbles all ass that's all we really need to do of course don't forget to add a circle Collider to your projectile or the collisions will not be detected and make sure to lower the radius a little for some reason my sprites are a little large alright here apply and don't forget to add a project I'll tag as well so I'll type in project tile and then just add that tag right up here okay and now I hit play actually before hitting play elder's increased slightly the enemy speed to 15 they're a little slow right now and moving around the scene you'll see some enemies spawning on the map and I can shoot them oh it's not working I wonder why so they've got their circle Collider 2d let me make sure I typed in project tile correctly that is the case the reason this is happening is because my prototype needs a 2d rigidbody of type kinematic that should work of course at least one object has to have rigid bodies when you're detecting collisions and unity there we go and now you'll see that my enemies destroy themselves when they collide with a projectile and I think will be great I also destroy the prototype when it comes into contact with the enemy so I will type in other now I'll type in simply destroy other game objects so in other words I'll destroy the projectile that collides with the enemy and you know what we've actually finished more-or-less the base of this office to the top-down shooter now all we need to really do is add a cool particle effects and UI elements wealth can we add yes screen shake of course and let's also again reload the scene when the player Falls to zero health that's really easy to do I'm gonna try the chat first of all before actually reloading the scene when the player which is your health let me see dude you go so fast in five minutes back in the stream sometimes the things you do don't work for me or I'm very sorry for that it's true that I might be going fast I'm trying to squeeze in everything in less than one hour but of course the stream will be I'll be uploading it on youtube so you can always go back in pause the video and follow along a little more smoothly I'll try and go a little slower from now on though the streamer is almost finished but yeah of trying going a little slower thanks for pointing that out man I have an issue with referencing my player objects huh from the enemy script if that's the case make sure you typed in well this line of code and also make sure that the player has the prayer tag very important to have a player tank on the enemy will not find him hopefully that helps you oh this 32 bit demons ask me if I can make a 3d top-down shooter or a 3d shooter that could be cool that could be a cool tutorial series I'll definitely think about making that though there are already quite a few youtube series already out there that cover that topic okay so let me get my scene reloading when the player dies to do this I need to type in unity engine dot scene management's up here so we can actually tweak so crash the play around with loading scenes inside of the scripts you need to write this it's vital and in my update function I'll be making an if statements checking whether the players health oh my goodness am I not so it I was actually writing all this the inside of the enemy script writes right inside the player scripts that should be a little better for us and okay inside the update function I'll check whether health is less or equal to zero if it is all we need to do is type in scene manager don't vote scene and more precisely we want to load our cutscene so I'll type and active scene dot build index and what this strange line of code will actually do is simply reload our current scene that should work really nicely I'll just put the player's health so one so we can quickly see if this works well let's wait for some enemies to spawn I'll charge into him and there we go the scene reloaded itself very smoothly alright guys so the stream has already been lasting for forty nine minutes I think we've got time to put in some UI pause this up a little bit more so I'll go here and create a UI element of type text and first things first I'm going to make sure that my canvas scaled with the screen size of thousand six hundred for X and nine hundred from Y and I'll move this up right here so the top left corner of my screen change the color to white so we can see a little better also increase its size and I'll just call this health equals ten for example okay also maybe I lower this ever so slightly now what we need to do I'm gonna call it half display is V R scripts make this health display well they are a health value this is very easy stuff up here I'm going to use another namespace this one of title so unit engine got you I I'll then create a public text variable just yeah we need to type in this or we won't be able to use any UI related stuff inside our scripts so that's yeah another very important namespace to add when playing around with unit is UI so I'll create a public text variable called health display and then inside of my update function I'll just type in health display dot text is equal to health little space there plus health and now our text should easily and properly display our actual health value which is really cool really simple stuff don't forget to actually drag and drop this inside of the player script I'll hit play and indeed a displeased my health value in this case I've only got one health but if I typed in for example 10 it would display 10 awesome all right well I did promise also that I would show you how to make a cool twist we're a part of missing an enemy will actually spawn an enemy we can do this very easily by simply going in sign of my project L scripts creating a public game object variable of type enemy and if the the project L actually reaches its target position before colliding with an enemy then we know that it's missed its target so all I need to do now is instantiates right before it's destroyed an enemy character at its current position and with no rotation and now drag and dropping an enemy inside of the project I'll empty slots I can hit play you'll see that if I miss an enemy spawns easy awesome and hopefully you've understood all this if you haven't tell me so the chance and I'll ask your questions let me see what's going on here no that is the issue the variable name goes bad well let's say I can mmm repair equipment asking Liam if he knows how to make a health bar charm or raise the legs red you have a lighthouse you have of course okay that's maybe a topic for another day is quite hard to answer that right now but maybe you can use animations pilot Cooper so if for example health is equal to two then you could make your health maybe play a beeping red animation or something on the swords Chris is asking about a video on particle systems that's something I definitely want to do you know what let me actually make a cool little particle effect right here life and get it to spawn whenever the player killed an enemy so I make a prime so I make effect a particle system you could see it right here looks very ugly for now I'm gonna be going quite fast right now but I will be making a whole tutorial on that in the very near future I've already got lots of requests on that topic so yeah I'll definitely be doing that when yeah when I finish this life probably so first things first I'm going to change the material off my particle effects and I'll change it to the sprites defaults and what this is going to allow me to do is actually make my particles of each individual particle an actual sprite which is really neat so I'll change this texture sheet animation to sprites and I can choose what sprite I wants for each particle I'll choose this little round particle and now I've got this they had much nicer shape is how those squares that don't really go well with the style of the game which is very round and I'll change the emission to something so I don't want it lupe and I just wants it in one single burst I'll change the emission the duration to the 0.1 seconds and the emission I want it to be a one single burst maybe 50 particles something of the sorts that looks rather cool I'm also going to change of course the shape so instead of a cool turn it into a circle and rotate that circle mm-hmm excuse me I'm gonna drink some water ah and so yeah I'm gonna change the rotation to 90 degree note the zero degrees now that's good and what's the the real technique here is really just tweak it making all these different values random sore random between two constants so for example life time I'll make a lasts between 2 & 1 seconds I'll give each particle of random speed so maybe behind and 15 let's test out looks cool already I'll also give each particle of the random size maybe between 0.2 and 0.75 let's test out cool let's get those particles lowering their size over a lifetime so the closer they come to their death the smaller they get which normally looks really nice so I'll talk along the side of a lifetime and for the graph I'll make sure that they're big at first and that they gradually grow smaller and that looks really nice as you'll see right there let's also give them a random color maybe so random between two colors let's maybe get them no yeah okay let's turn this one red and this one maybe a darker right okay looks pretty pretty cool of course take your time with this I'm rushing this process because I want to answer some of your questions maybe at the end of the live which has already lasted almost an hour okay that looks cool now let's get this to instantiate via script so I'll call this effect turn it in to a prefab by dragging and dropping it inside of the prefabs folder delete it from my scene view and inside of my enemy script make a public game object cold effect and then I will instantiate that whenever it actually collides with the player or it collides with a product I'll so I'll type in instantiate and I winced and shaped my effect at the enemies current position and with no rotation as usual I'll then just copy and paste that line underneath this if statements head back into unity grab my enemy character drag and drop the effect inside of the empty slots and hitting play I'll have some cool effects there should definitely adds an extra life to my scene and yeah okay looks awesome of course take more time with the effects perhaps add a screen shake that could really just make the scene look all that much better all right things are working nicely cool all right that's gonna mark the end of this live stream hopefully you've picked up a trick or two sorry I've have been going fast I must say this is only my second live stream I need to practice this but yeah again I've had loads of fun and so yeah let me answer some of your questions yeah how about some camera shake for another video there are require you to trails on that topic but I would like to make maybe a separate tutorial and how to make camera shake using the animator it'll be a very small video but it could be interesting so instead of writing a long script just show you guys that you could create a camera shake just yeah with a few animation tips and tricks oh Metro sparsh is asking for a shout-out well hello retro stars and thanks so much for joining the stream really it means so much to me I'm having a great time really I just I really love just making a game with you guys helping you out so if you've got a request by me tutorials just sure head tell me what you like and I'll definitely consider it for the near future can you add looting from JSON for dialogue system interesting I must say I'm not really familiar with that coding language I'm more of an artist / designer that's really where my passion lies and development of course so the only programming language I actually know is C sharp C sharp is really just a way for me to learn how to make games actually make games but yeah I'm not a pro quarter that's more my brother who's really into coding and he knows a bunch of languages so who knows he might make a tutorial on that topic on the channel dimensions asking ya if I can make it to chill for networking for multiplayer again I'm not only a programmer so multiplayer is not something that actually had a look at yet I've not even tried making a multiplayer game but who knows in the future that's definitely something I might cover also a Sher Singh is asking for a 3d controller scripts with double jab double jump - and charge attack so I've covered a lot of those topics for 2d but I haven't really done so for 3ds so yeah that's also something I might cover on the channel of course thanks for that request definitely owe a 3d 32-bit demon is asking if I've ever tried ever ever considered trying a different game engine I actually when I just started game development I was using a software called a game engine called construct - it's really great for making small 2d games especially cool if you don't want to program anything anything it's just got this very simple drag-and-drop interface but yeah ever since falling upon unity coming across unity I've never really tried any other engine have not tried Unreal Engine a game maker because unity has just been so awesome oh yeah who knows in the future I might test out those engines I might it could be cool I was gonna drink some water oh the retro splash said he was the very first Photoshop animation video cool I hope you enjoyed I hope it was helpful for you I definitely enjoyed making that one because again is my animation that are it's my real passion I actually love doing that sort of thing yeah unity is awesome that is definitely sure alright guys so ask away I'm gonna end the stream in around five minutes it's already lasted a long time and again I will be uploading this to YouTube so if you want to follow along and make this 2d shooter more calm easy pace then yeah I definitely check that out I'll release it sometime tomorrow I think and of course you should also have a brand new tutorial on the channel choose their Wednesday so stay tuned okay I'm glad I helped you a lot retro retro II subscribe awesome alright guys well if you've got no more questions that I'm gonna end the stream oh you should try a low poly art style you know I absolutely love that art style I've not done many 3d games in a long time as you've seen in my dev vlogs and all that stuff I've really been focusing on 2d so yeah who knows in 3d I might return to 3d in the future that I must say I'm really into 2d lately I'm having a hell of a time making my 2d games but low poly art style is a favor of mine so making it tutorial on low poly art style could be really cool Oh Mario is asking if I can make it to chill that covers the 2d cinema scene camera oh and I would also love to know how to do scene transitions like in the Zelda games you know scene transitions was something else really planning on making probably even this week you'll see a video on that topic has for a 2d cinema sheen that's something I'll also have to check out I've not actually had to look at that yet I did look at the brackets tutorial which was pretty awesome but so yeah I could also maybe make a more in-depth video on that topic as well thanks for that request ah dimensions asking for collectibles a collectable tutorial that could be cool yep Julian is saying thank you for the dream on man thanks man I'm really glad you enjoyed it again it was an awesome experience once again and as I said in the first livestream and planning on doing one last stream every month minimum so yeah for all those missing who have missed this live stream and are looking at this on the channel yeah stay tuned I'll probably be doing another live stream sometime in May maybe mid May and may not sure laughter see but they'll definitely be another live stream in May Oh make a path is asking if I'm gonna make it to true about to these slopes that would be really cool that'd be a fascinating tutorial topic and I think really useful so yeah oh man there's so many tuturro I could make okay yeah I'll let me consider that thanks a lot [Music] alright so oh hello how about making 2.5 D game like don't start I love that game I really love don't starve that could be really interesting also very interesting alright yeah you you guys have given me so many ideas for tutorials so yeah you can expect many coming out this week next week sorry so yeah definitely stay tuned I'm so excited to bring back the hall to the next level my hand is too many too many it's at your request now how to make a menu Oh Ashley I've got a tutorial on that topic I have to make it a great main menu it's called one of my older videos and it should cover yeah it goes in it goes on about how to make a cool main menu how to make responsive a how to make responsive UI buttons all that stuff so definitely have a look at that free TV you might find something useful there alright as egg a art says I know I have a good day have a good day you too thanks for watching the stream thanks for the support it really means a lot ok guys so yeah private Cooper says by the ideas down that's exactly what I'm going to do right now I'm going to end alive and yeah get cracking on all those cool tutorial topics you guys suggested alright alright have a great day see you very soon on the channel cheers guys
Info
Channel: Blackthornprod
Views: 70,373
Rating: undefined out of 5
Keywords: blackthornprod, game dev, noa calice, unity, how to, make, create, 2D, top down shooter, action, mouse, shoot, aim with mouse, enemies, follow, ai, c#, C#, programming, coding, beginner, tutorial, simple, livestream, live
Id: RZTpDxgrDkQ
Channel Id: undefined
Length: 56min 46sec (3406 seconds)
Published: Mon Apr 30 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.