Develop a action arcade game like Beat Stomper in Unity | SandS Arts | Skillshare

Develop a action arcade game like Beat Stomper in Unity

SandS Arts, Game developer

Develop a action arcade game like Beat Stomper in Unity

SandS Arts, Game developer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
12 Lessons (1h 53m)
    • 1. Develop a action arcade game like Beat Stomper in Unity [Intro]

    • 2. Project Setup

    • 3. Use of Platform Effector

    • 4. Setting up Platform Controller

    • 5. Setting up Player Controller

    • 6. Fixing the jiggery platform

    • 7. Setting up Spawn manager

    • 8. Setting up the camera controller

    • 9. Setting up UI

    • 10. Creating amazing particle system

    • 11. Implementing Applovin Ads for our game

    • 12. Building our game to Android, iOS, Linux, Mac, Windows and WebGL

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Hey game developers !

In this course i will be teaching you to develop a game like Beat Stomper in Unity !!!

By the end of this course we should be able to develop many games.

We will implement Applovin Ad's for our game.

Download the UI's from here -

Join my discord server -

Meet Your Teacher

Teacher Profile Image

SandS Arts

Game developer


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.



1. Develop a action arcade game like Beat Stomper in Unity [Intro]: Casey in durables Sankyo from San sets. In this school, you learn how to develop a game like Beat Stumpel. Yes, we'll be creating something like this. By the end of the schools, you should be able to develop so many games by using the techniques that we have used in this game. If you find any doubts in the schools for could reply, you can ask me in my discourse. So it is just the app where we can chat similar to water. You can join my discord server by taking the link it is available in the district. You over will be creating bars metaphor again. They're recreating. Loading swings will be implementing a plan. As for a game on. Yet by using the same strips that we have used in this game, you can develop so many teams before taking this court make. So if you know the basics off unity and Visa programming like water polo, water data types on, So what are we waiting for? If you find this course is interesting on, it can teach you something just handled. Join my discourse over by going to discard up dot com. Click on the button on left body Select. Join us over on entered this link. Thanks for watching 2. Project Setup: a kingdom was the South from Samsonov's In this new with sort of a project for a P. Let's start by creating a new project and that the project in On enabled to each other because it's a story project and hit great process. Let's start by creating some polo's right legal here. Great on toward it. I'll call it three. Perhaps it's on enough window, Uncle scripts. One more. I recorded scenes. Uh, download the deep stomp on resources in their self. So sexy, you know, open despite your data. Without it, stalling will run, wins it all 70. I haven't started. Really? Right. Just dragon. Drop this right into the desktop on then. Right? And Robert inside Unity Before that, let's trade a colder will. College writes on about this the new open immunity you're getting viewable to something like this. Just goto our select aspect ratio set were tapestry on high task by enter your labeling. I'll call it Mobile Revolution on it. Okay, now selected aspect issue. You should see something like this. So why did they do this? Most of the mobile homes have this resolution. Therefore we don't want to work under three aspect we need to work or we need to your gain according to mobile resolution. Therefore, we created this resolution on will be using this noticing whenever I changed the aspect, even the camera size will change the Select your camera on cell a clear blacks to solid color because we don't want the camera to use the skybox. They wanted to use some color. Choose any color which you like on. Just select the purple One Now for the platform. Let's create a sprite. Therefore opens right Oiler right click. Create sprites on square over here. Just dragon rock. Things fried. You are graded. I said It's color to pink. I'll increase its size on the X axis. Nicholas Excise on the Y axis. At this fight, I'll rename this toe platform. So whenever the player collides with distant, really to register collision on increase player points, they for in order to detect collisions, we need toe Allah box collide truly on our rigid body to I displays its rotation because I don't want this object to rotate in this way. Whenever Laich allies with this object, I'll sell it. Grab the skin to zero, because if I said it to one, and typically the object just falls down. I don't want the object toe Fordham on experience. Gravity they So I said Kravis came to zero and, you know, being we don't want the player actually playing. So collide with the platform in this week we want a player to be a bow on collide in this fashion their full orderto achieve that will add a platform, a picture to re So in order to use this affective willing to check used by a picture on the collider This option on here you can see a cynic circle, right? This is the area politically can collide. You can out of this by uttering this value to any value which is like I live a 2180 Even you can change the rotation offset. But I lived at zero. Now let's are a box collider toe a player on even the rigid body. Judy, we will not freeze anything because we won't be there to Roget on even experience gravity. But here you can see that the player size is something and Nicoletta size something, you know, conflicts. This just click on Eric Collider on edit by morning this squares and that's it. You have an accurate collect. Now we'll write this platform. Over here are Mel and large on the X axis. Quite a bit you. Now if immediately player experiences gravity and it will fall though. But even the platform is for Do you know why? So who are black hole? Instead of setting grabbed skills of riel, we can directly choose body type Kind Matic If you choose dynamic when other objects collide with this object, even this object will move. For example You can see this whenever declare collide even the platform most. We don't want a platform to move. Therefore will select body type to kind Matic And now that form must be fixed. Abject, please. And yes. Now let's dragon drop. Ah platform Incorporate Pap school on even the player on. Then I say the same US game. Thanks for watching 3. Use of Platform Effector : Haiti individuals So Sankyo from San Socks. In this video we'll see the use off platform affected that we had added for our object. So the most of that I'll just duplicate this object and I'll vote over here now. A lot of strip for a player. I'll call it clear on I'll open it up. So now, in order to more player will be adding velocity to move our player. Therefore, in order to apply velocity first meaning the reference for the rigid body asked, is the chilly game we go enter rigid body too early. I'll call the variable name as our be on in the awake function. I'll say RB equals get component rated body truly. So why did I enter this line? Of course, In the big function, agriculture is called before the start function. Therefore, assigning the value for the variables with Big Ridge in the average function On what this light off kudos. Whenever we study, we started eating the rigid body attacks to the object for which the script has been attached. That is, our player for this object play strip has been attacks, right? So whenever we play the King rigid body attest to this object for which this scripless and us is assigned to this RB variable. Therefore, this rigid body Cody will be assigned to this. I be variable Now we need to have some velocity for a player. We'll add it in fixed. Upbeat because all the physics things are performed inside this fixed up they function in orderto add velocity will just say I'd be dark Velocity equals here we need toe assign a vector tree as a value before we can say new rectory. So here we are two past three values x, y and Z as this is a duty game, I'll just say vector to because I'll only be passing two values. So now I should add some velocity in the Y direction. So here are some velocity in this way. Why value will change. Therefore I need to change. Why value over here? So we will create a variable offloaded I I'll call it jump four on. I'll pass term force as a second value. So now we only want to jump when we press a key that is our left mouse button. Therefore, I'll say input the gets mouse button down. Also, you The zero thing is the left mouse button. If it's one, it's the right mouse button high lipids to it's the middle mouse button. I'm saying Get buttoned down because Al before our are some velocity toe up earlier when we press the left mouse button or whenever the left mouth Martin is down. Now I'll just say this on head back. Unity Over here I love zero as the X value. Instead, as they are read or velocity got X because the player can have some X velocity when it is jumping or movie, we don't want to set its X velocity to zero. Instead, we want the X velocity, Toby X velocity itself, therefore with the arbiter velocity dot Exe Now I'll just select big stumper. And I said some force to 200. Nobody will, uh I played the left Mass one play must have all said Jump force to 15. And now whenever I take the left mouse button clear Must jump. So yeah is jumping. I had just really Christine samples to 10. So now you just saw that the clear past this platform on. Then he landed on this platform. Let me show you toe again And this reduces some fools. Yep. So now when I click the left mouse button, notice that the player will pass through this platform from below in this way and he will then land on this platform from Abu If you remove that platform if Victor the player will not pass. So this platform from Blue Hill this collide I've written back so notice So here we don't want the player toe collide with the platform below You want took alive only from the ABO therefore will enable our platform effect Italy on it requires used by affective component Toby enabled by the collider there for now the player cannot collide Family Baden Awesome! I'll just servicing on really this platform on I'll move my players script inside the scripts folder actually. What you 4. Setting up Platform Controller: concerts. And this video will set a platform controller for our game. So I'll just duplicate this. I'll moved over here. Andi, I really in this to platform to this subject alive. Stripped. I'll call it platform controller. So here, we need to move the platform left and right. Right. Therefore will just go here. Andi, I'll say transform, not translate. Rector Toe Don't writes. I'm a dip lighted speed on time. Don't at the time as we have you speak will need to create it. Nick was a public fruit. Speak a multiplying it with time down there all the time because we don't want the object to move depending on the frame. Let instead We want the platform to move. Depending on the time and simple words, the platform will move it. Same speed on different devices. So what are we doing here? First we're accessing the transform off became object this thing on. Then they're translating the object. Translate is a function which mostly object in the dioxin that we have specified. So the direction is reputable. Got right. What to do That right is just this sort on off writing new director toe. I want commas you. So instead of writing all the stuff, we'll just say Director Toe got right Why aren't we using? We could total up all record toe got down. Director, do that up is the shorthand co writing zero and one here many to moody platform in the X axis. So therefore we need to increase or decrease the X value off the platform on not the why or the C value. Therefore, we need to use rector to dot Right, Because we need to alter the X value off the transform you can either. Right? This are rectitude. God writes. So now the platform must be able to move right? I was a set Speed us to or maybe full. And if the platform is moving right. But we don't need this. What unit iss really? To move the platform right on left When we need a platform to move right and left on the platforms position hes Let's a ban. The screen wit is just near the screen with this. This is the world of sweet, right? This thing serving it took our platforms. Position is created on the screen world, which means if the black for miss here where this opposite its direction. Off motion. Therefore, we can move towards the left. On over here. We'll check if our platforms position. It's less than this treatment. I'm saying less Saddam because it, by Moody subject, was the left. Its y value decreases. So whenever its value is less than the screen with, we need to move, it was derived. Therefore, here I'll quit are against alcohol. It sign by default. This will be a positive one. Or here as multiply this which sign now I need to alter the sign value before I create a function. I'll call it. I sign. So when many to alter the side Well, whenever our platforms position is greater than the screen with it always puts in his later than the screen with, Well, it'll opposite its direction. Therefore year I'll chuck gift transformed our position. Got X is greater than camera. Don't me not screen. So WellPoint's new rector three scream got worked Comercio Coma zero Dark X. So yes, I say, what? This? This here Post We're accessing the trash and then we're accessing the position There is the expedition off the object on. Then we're talking. If the expedition off the object explanation. He's greater than this green wit, So this whole line off good just gets the screen wit in the world space. What we are doing here is Camera has a function called screen to World Point. I'm saying Camera off me because it's gets the camera of its has attacked, called me camera a Mac Using that camera on, I'm calling the screen to World Point function because clean doctorate returns to the screen wit according to discrete we wanted in the world because every object in your itty is placed inside this unity would therefore here you are converting the screen with into a world point on. Then we're accessing the X value off the converter point because this is a Vector three. This function will take record three as an argument, therefore, has the new victory, and I have passed screen with as X value zero answer as the y and Z value, because I don't need to convert the Y and Z value in the world coordinates, I only need give it on, Then I think X because this returns a wreck, a tree, and I can't compare effectively with a flute. Therefore I am accessing the X value, which is this thing the converted value off the stuff into a ballpoint. So if the platform position is greater than the screen with, we need to opposites this direction, Therefore else's sign into equals minus one else. It's I'll cope in this line of court. Are based it over here as if they're from the partisan that X is less sedan this stuff will inverse will opposite the direction. So what are we doing here? We are talking about The composition is less than this green wrecked. So according to screen point, this 0.0.0, let's say, screened off, correct and feel This is zero on the six train got height. This stuff here I'm converting this screen with in the world Point. I'm passing zero because according to screen, this port is zero on this board screen got Well, I'm kind within this point or this whole life I can just say the left part off the screen into a world point and then I'm accessing the X value. So I'm talking. If the platforms position is lesser than these left Strindberg, I'm relaxing its side because I need to move towards the right. Whenever the object is here. I'm saying intercourse. What? Because has your Sinus one on here sign will be one on one into something is one that is positive. It will move, was the right whenever exposes. John is greater than the screen with a multiplying signed with minus one. So they, for now Sinus minus one director to get right into minus one will give us rectitude daughter left, which is the sort handful writing new rector to minus one comma zero, that is, we need to move the object in the opposite direction on even here. Assume that the Sinus minus one if the platforms position is lesser than left screen mint, um, about deploying it with minus one so now minus one into minus one is positive. One positive in director told that right is whether it will not right itself. The four people move the blood home to if the light let's stuck with this looks. Now you'll get some errors because over here first you need to convert this value into a world point on Ben. You need to access the X value. Even here. Here. If you say dot exe, it will get the X value off this vector on it is a flute. Dysfunction requires a record. Three are not float. Therefore, after the conversion win toe access the X value off the converted point. Now let's talk at this work on Yep, it's not looking. Do you know why? It's because we have not call this function anywhere? I'll call this function in the date function, and now it should work. Yeah, you can see that when its position is scuttle over less than the screen with its sign reveals the main advantages off the slide off Cool or these light off course are whenever the screen size can be anything platform will took. If its position is greater than or lesser down the screen with side get scribbles on, it moves left. Right now, you'll encounter a problem that is, it's not actually turning back. Anyways. Position is greater than or less time screen with. That is because he sent the point off this object case Here. Here we are, talking. If exposition there is this is the position of the subject. If it's less than this, value were changing its tax enough motion. Instead, we need to Chuck whether this position off the platform, it's less of January with or greater than Eric will go screaming. Therefore, Fear will create a public float will call it X offset. And here at the X option, even here now, when it was any value for the X offset has just Travis council here. And yeah, so now the platforms X value is minus 1.59 on If I move it over here, its value is minus 2.985 So now we'll get the difference between those two values as minus one point 395 So here you can see it's working perfect for the left, but not perfect for the right. It's because here you need to subtract its position here. You need to add its position on not surprised. Don't get confused on saying Add on. I'm using negative simple over here. It's because the value itself is negative, negative into negative. It's positive. Therefore, here we're Adam Heavy s a practice. It's because whenever it's the worst left with took, if the blacks forms disposition, there's left. Position is less than the screen leftward. Andi, Whenever the object is here, really to talk whether this side off the objects position is greater than the screen. Therefore relied on subtract the values Now the platform that move perfect on Yes, it is. You can change the expected toe any aspect. It will look perfect. So now you got the advantage off this four lines off court. So, yeah, if you want, I just debug the screen point in pixel coordinates on the world point screen point right. And as a spring screen, dark, wet, I just copied this pasted, tugging assay screen burned or left and passed zero Allegation city. But they are actually screen toe point. Right? So the right values this Al copy the scene based it again. I just see this, you know, with this right left. So here I'm just printing the values off the screen point on the world points. I was a small old line, of course, into the stock function, because I don't want toe print so many time because dysfunction is in the update metal. So, yes, here you can see that the screen Doc lit returns 616 as a value because it's strain point or screen with IHS 616 on its value is zero. According to the screen. If you convert the 616 into, I would point its value is 7.24 So I can just great and the object I just said It's X value toe 7.34 on You can say that it's position life somewhere here, which is nothing but the world point We have converted a screen point into our unity were corns. I live in the lap screen point that issue when we convert it to a world point. Its values minus 7.24 so far. Negative sign in the point light summit over here on Yes, we are converting the screen point into a world point because of this reason, the world point and screen point. Both are different suits back to mobile resolution, right, and drop the platform into a pre perhaps colder on the platform controller. Two scripts Fuller ceva Si, thanks for watching 5. Setting up Player Controller: before that Like this. Look at the game mechanic, so the player has grounded. Or if the players bottoms off, this is colliding with the clown on whenever the planets. The left path model meaning to make the player job whenever the player is in the air. Which means Borden's office is not colliding the ground. We need to apply velocity in the below direction for that Who took whether the bill apart all the Tebow parties colliding with the Objects unit use something called Very casting. Recasting just casts Harry from one point Tony Darks and that we have specified onda length hostelry, if they ask specified one comma zero as a position, right as dioxin on by last land really be something like this. You know what we are finding? Whether the top part of the bottom part is colliding with the object later. Now let's just call this mechanic so or here, Al Qaeda method on the written type, specify it will be. They cast it, Judy alcohol around that. But we're here. Al Qaeda recast it to be variable. I'll call it down it here as a down it equals the six Judy Doctor, A cast Vegas is a function which surgeons recast it. Judy therefore, we're storing this inside down. It returns off. Recast a truly data type This takes Three arguments are made before the 1st 1 is the point from Mary We want trimester. Me, I would say, transformed off position because I need to imaginary from the players. Make point on that action will be down. There were ill see rector to dark down on next one will be the distance on the land off the ray. For that, I'll say point h you as a region down. So before adding the velocity toe are clear in the abode. Axum leave it to check whether the player has grounded, which is nothing. But if the players bottom point is setting the object. If yes on. If the player has pressed the left, most button will apply velocity upward. Local girl before applying the velocity winter air around that dock Collider. It's not equal to know. So what am I doing over here as dysfunction is off, Great estate truly data tight. Winnetou written the value of the same data time they for creating the donate variable off , recast it truly data type on here. I assigned its value Toby physics to need or great cast, which means we're casting away from our flesh position in the dollar direction with the Lend off 0.8 this region's and they cast hit Tooley, which is nothing but the object for this. This really has been collided here. The object for this this great has collided a steep platform. This is just to obtain the information off the object that the wreck allies with. It's just similar to what we right over here. Here. We're playing information off the objects that collides with this tree. As this returns and re Castaic duty, I have a son down. It has this thing here. I'll just e book the name of the object that we are colliding before I say down hit the transform dot Me this Just readjust the name of the object that the Rakel I swear I can even display degree for that and say deeper thought Draw away. It will take the start point with strands from the position, the direction rectitude on down. I'll multiply it with 0.0.8. Ask this system, lend off theory. Here. I'll just replace get mouse button down to get mouse button, because when I I hold the left mouse button, I need to drudgery on display the name off the object that Derek alights with. You don't need to change that mouse button down to get most button. This is just to demonstrate on me not to add velocity toe the object. I exist in a deeper love, not value. So now whenever I press and hold the left mouse button, the Ramos's biggest, played on the name after game object that collides with the way must be displayed. Therefore, I hold the left last month. You can see anything over here, but you can see only in the scene. It's because if you want to sit in the game, just anybody gets mus on yet on this swimming. So yes, you can see the break it a matters from the transformed our position, which is letting by the center point of the object. I've actually specter to go down with the length off 0.8. I was a C and the council on Yes, now the object well, this is the really it's colliding is beach stomper, which means the race colliding with the player excels, but we don't need that. They want the rate to collide with only platforms. Therefore similar. Go Todd. We'll just wait a year. I'll call it Blatz. Off. I'll go back to the tax form on selectively black form, layer and hit apply because it hit Apply The changes that we make in this prefab will be applied to the regional prefab. I'll just change this object layer to platform. And here we need to like this. Um, here we can add one more argument, which is nothing but a layer mask that we had played here as a public name. Ask, I'll call it Lacked form mosque. And here on gas black Omar. So what This does whenever recollects with something it checks whether the way has the layer. What is nothing but the platform mosque? If yes, it says that we are colliding with the object on returns. Recast it story. If they are dead, doesn't have the specified layer. It will written. Love has recast. Hit two. Now let's suck weather. This works. I'll just select my player selling the platform Musket platform. I think so, Yeah. Now, if I hold the left mouse button, you see that the black or message is being displaced. Awesome. I'll just released this to get most button down on our replace. All the stuffs just dilly leads two lives off court. We are done with this part. No, we have to check if the player is pressing the left mouse button on. If the garden part of the player is not colliding with the platform or any objects, we'll apply the velocity billow. Therefore here will say else I'll copy and paste this line off course on a lot of negative Sign over here what this thing off for? Whenever we're colliding with the object with us, this mask, the sweet, little and recast it story which has a collateral, are faster. This is called the Collyer. If the object that the ray has colliders has a specified tag yes, it rewritten, recast in jewelry Here on we're talking If that collided object has a collider. This means if it has a collider, our velocity up force, if it does not have a collider, are we are not colliding with any object. Add velocity downwards a manning that define because I want to opposite the direction and apply negative velocity. This most work sign Now let's start this out Whenever I pressed the left most button on the place Bottom point is colliding with platform. The player must jump up. And yes, whenever the places in the air Hey, little job downwards on whenever players Bottom part is not colliding with me. Platform will appear. Must jump down. Yes, the player is. See that? Don't worry off about this platform and squad jiggering of it will fix that later. And even when we land on the platform, the player will not move along with the platform. Let's fix it here, they say Sounds for not parent equals down it that transform. Yes, whatever doing here whenever we're colliding with the platform were saying that the parent off this object will be the collided object transform the parent, which means this its parent, is it will toe now hit that transform, which is nothing but the object obviously wreck alights. We're just changing the players parent. So now if I parent this to this platform whenever I moody black from the player moves along with it. But you can see that when I parented the player don't quite a bit and sometimes the scale changes. To fix this, let's create empty game object on recent its position. Rename this two player or something on, then drag and drop the big stumper into deeply Malfi Vallon. Drop the player onto the platform. Nothing happens for the ship on the position off nuclear, but now our logic doesn't work. Here we are saying transform dark parent transform is the transform off this object. We've stumper object we're seeing its parent is equal to D collided off the experience. It will perform something like this, but we want to set the parent off this objects Parrot, therefore here as a dark, barren doorbell, which is nothing but the beats stop us parent on its parent is equal to lick alighted up it off on something like this, which is exactly what we want. Now the players parent must be this object, but it's not. It's because we're changing the parent or leaving repress the left mouse button. And then we're pressed. The left lost Martin, its parent will change. Now. Ex parent is this black form right here. But we don't need to change this platform. Only whenever we oppressing the left mouse button. Therefore here I can get a puncture. I'll call it Change Parent on Buddhist Line off. Good. Over here I remember. Ah, Blood bracket on. Yes, me to call this function therefore change parent in the APN. Eat over here. I should include extract for bracket. This is for the block and this is for the function on even I need to copy and peace this line off road over here because we knew to Chuck whether the rate is colliding with something on the floor brackets must be for this if on. I need to add another flower bracket. This is so stiff. Andi, This for bracket iss for this little thing on this is for the folks. We need to move this outside off the block because we don't need to call this function only when we oppressing the left mass body. Now let's step if this works Yes, you can see that the big stompers parent Dark Parent is said to the platform that the ray has collided it. Now I let the left most button and make a play gym. Now the players transform is set to this black form. But But now if I pressed the left. Most pardon. The player will move along with the platform notice here, the players moving along with the platform. We don't need it. They fall in the sanctions. When, said Alice transform the parent, the parent is equal to know what battering here. If there is no colliding with the object, which has a new cold, that's all that I'm parenting, which means we are setting this parent on its parent tonal. Imagine that the player has parented the this subject whenever the player is in the air, which means the race is not colliding with anything else. We are setting its parent, that parent to know, which just best distinct it. Un parents it. I have to move this outside of the city block my legs stuck. Whether this works now, it's parent is not equal to know. Whenever I'm in the air, it's parent is equal to know and saw that. So yes, awesome. No, let us as some turning effect when over there playing jumps for that village. RB Not at talk Dog is determining effect. Here we go past afloat, I'll give a random talk for it. Therefore, serve random that trains between minus 15. So placed rookie I'll not impure F because I only work indeed, dose Alkorta this on basted in the else block random. That range is the function. It's returns a random number between the first and the second argument. For example, 7 14 Anything between this two arguments? I'm not playing a random talk for this object. Whenever it jumps, let's step. So yes, you see that the player is turning, but you can also see that the player can fall down away from the camera to fix. This will just create a function I'll call it Collision with Walls are collision with screenings or I can just say Chuck collision with screenings. So whenever players position if rather than the screen we went on, either side will apply force in the opposite direction as well as some talk. So this we have to use the same method that we are used for the platform controller, this former right here. Therefore, I'll say yes, transformed or positioned on X is great dime. Cameron got remained off screen toe World point Doctor X. So here we are to see new Rector three screen dot Brett home, a zero comma zero. So it's street. Those are big Got velocity equals rectitude or left arm Multiply it. Reds fight! What the left is the star Campo writing minus one comma zero so far multiplied with fight become minus five comma zero Therefore the velocity will be mine. Despite in the X axis on zero into my access I will even have some random talk therefore say are being taught at talk as a random The range between my swell comma class one on a corporate This bested again lt instance toe else it on This must be zero We have to reverse the velocity direction They will say better to not right I think you know What are we doing in this? If and else it block I had explained what list us when I called it the platform controller on Yes really toe Axum offset for this as the platform controller Before I create a variable I'll call it X Office it on here. I'll subtract the upset. I let the officers actually have to adhere and supply act here. But if we enter the X offset as negative will be adding the offset if it's negative, will be subjecting the oxen. If you wanted to be less than minus itself, just enter positive values as exhaust it. Sorry I didn't sit. I need toe. Add some random top. Not fooled. Now let's enter the effect Exposition A's Minds 2.43 on Now it's minus three. So the offset is minus 0.57 Mrs nothing By times subtracting minus 2.43 with minus tree. I'll get yes, zero point I seven. I'm adding minus because here, I need to add I'm here. I need to subtract. Yes, if you have used place on negative minus here, just enter positive value. Don't forget to call this function. Ending a paint method. So now try to move the payout off the screen. So, yes, you see that the player can go out off the screen Here you can see that adding something lost to the opposite direction. No, this we added something. The losses when it goes off string, even over here it's because off these lives off course. And yes, we only to apply the velocity. And some talk only when the players spirit is no. Which means if the player is spared to any platform. We don't need toe. Apply some velocity and talk whenever the players question is greater than or less Saddam, the screen wits only the site. Therefore, before performing this, they took a transformed a parent that parent is equal to know. Which means X parent, Dark Parent is equal to know our. If the player is in the air, we'll apply the velocity earned talk. Now you can see that whenever the players transform is not equal to know we're not applying the force, are you? Can not, just under the problem. It is whenever we jump on, whenever it appears near the platform, the platform place to attract it. It's because we're parenting the player. Toe the platform before the player goes up. Sourced a player. ISS. Here. There's a very cast over here. It will register. The collision on it was written. True on the colada is not equal to melt. Therefore were pending the player. And because off this you can see some kind off attraction between the player on platform. Now. To fix this, we need to rate asks from the top. Let me go back. You you can see that we need to recast even in the top on. We'll check if the top part is colliding with me last fall will disable its collided on, enable it after some time when a player goes about it. So let's go back to the strips with Just copied these on Paste it again. I'll just rename this toe up it on even this even this stuff on bond. So now we need to request up here actually can turn this toe world because we don't need to return anything. So I'll just remove the written statement, replace it with this. A pit dark collider is not equitable. This means Are we colliding with the platform about if yes wins the up it dot collider that any both equals falls. Make sure you call it in the update function up it. So what are we doing here? We're talking you very Castillo. If the records that the top is calling me the platform were disabling, the objects collide. So we're performing something like this were disabling Dick ALeiter toe unregistered the collision for some time. But after sometime vehicle enable the really to enable the collider because its a player goes like this and comes down they will not be able to collect with platform because the collider is not enabled. Therefore, we have to enable it again. In order to make the player collide with the platform. We look on the platform control of scripts on here will just create a matter. Call it enable collider. We'll call this function only the collider attest to this object is not enable. I'll call enable collider. In this function, I'll say get competent collider not enable equals true. So I'm just enabling the collider in dysfunction. As this is in update immediately. The collider will be disabled on enabled I want to enable it after some time. Therefore, I'll say in work enable collider after 0.2 seconds as this is a true begin, we need to enter sooty some picks. Let's talk weather This work on just a sec extract escaped zero on. I moved in with you. So here the wreck asthma from up much resistor collision. Therefore it's collider must be turned off. So let's see. It's a small It's quite a big demo. Onda. Yes. You see that it is cholera. It's not enable and after some time it could enable so yeah, it has been any Let's play this once. Now there's no kind off force attraction with many platform and appear. 6. Fixing the jiggery platform: Hey gained in the polls. So song kill from signed stops and this redouble fixed the platform, which was Diggory. Now let's open the black home controller, stripped the plaques or was ignoring because this function was called in the update method . So whenever the platforms for this journey is over here, it's Sinus reversed asked. This is in the update method. It will call this function every frame. Therefore, it Mary was designed so many times, so the platform jiggles. In order to fix this, let's create a boolean variable alcohol. It's dribbles sign by default. It will be set to true. I'll only change the sign. It's exposition is greater than the screen with Andi. Real Sinus said to truth. Same here. So after it was seen, I said we were saying to falls on. Then I will invoke a function. I'll call it Rebels sign. After 1.5 seconds, I'll call these two lines off court and face it again. Really creative function called reverse sign. Inside this function, I just see rebel sign equals true. So let this people in seconds. Now the placko must not sugar on it will not. I saw that it's working. Perfect. Thanks for watching 7. Setting up Spawn manager: Hey Kim, develop ALS So Sankyo from San Socks in this video is the spawn manage Servet Sports. The platforms, therefore under scripts, include a new swift I'll call it Spawned Manager, so you can get empty game object. Really? Me to spawn manager and then at the script. But it's even better if you add it to the camera. Now open it up. So first we need to know when we need to spawn. The objects really transform the objects. Then Player is in the stink on. It has not died. Therefore reconnection Credit name, object. I'll call it a player on the start medals as a player equals game object. That's fine game object with that card player. It's better if I those in the Arabic function, because it is called before the Starkman here. Whenever we start the game, I'm assigning the object which has a tackled player toe play available. Hell raiser Chuck Air Clear this in the scene, which means clear is not equal to know on this point. Object. Assume this is Despont. Object warned objects position minus ni players position is lesser than some distance. Imagine this platform has X distance ass five on it. Ask treats. Assigned ministry is to If the distance between the platform and player is two or anything else, respond. The object on will change this pond object to the last object that we have spawned, therefore, to spawn the object. First, let's create a game object alcoholics For now, the method I'll call it's phone on Inside This on spawned equals in Stan she the latte for toe here I quit a public game object. I'll call it Black. So this is the reference off this this back home. So instance, it is a function which is used to spawn the optics. It may take one all three arguments. The second argument will be the position where we need to support, and the third will be the location. But I only need to spawned your object. Therefore, have passed single arguments on I'm assigning the value of sport Toby object that I'm morning. Then I need to change the position off. The object spawned therefore sport doctrines for the position. So in order to access the position festively practice, he has four equals as there are three values for the position. I'll say record three so as it is a Children, the value doesn't matter. Therefore, you can use rectitude. I'll assign at random value as the exposition between this point at this point, so the position will be between my Nestle horrify civil on 1.59 the force of random, not range. But we want for 57 and 1.9. If you are reading this, you just get a public float variable call it mimics on the public float variable calling max six on here and the first argument asked. Minnix on second asked Max. Six. So random, not range little around the value between the first and the second government. On this is a vector to toe past the Y value. The vibe value will be something called Who are your swimming to create this Rabel as they float to add. As I said, we only need one object. Whenever the distance between the spoiled object on the player is some specified distance for that Al Qaeda public flute. I'll call distance between layer on platform. So here I'll took if this point object. The times form the position dot Why minus player dot transformed our position. But why silently excessive brackets is nestled than or equal to distance between player and platform. I'll call this phone function. So what am I doing over here? I'm talking. If the Y position of this point object assume this is respond object this morning. The object Onda That object is around to spawn variable. Let this village spoiled Object. Here we're talking its Y position minus players y position assumes is five on three. If we subtract that, we'll get to if the distance between player and platform is three Cruz lesson than or equal to three. Therefore, it will score on the object minus 1.7 on the place with Souness minus Joe 0.61 So if we subtract, boat will get going for six at the difference. Let's check if Point ho sticks is less than or equal to the distance between player black home. So if it's pointy, it will be true and score at this point file. It will be forced on. It will only be on. It will only spawn when its value is less than a report of distance between player on a platform. So I want to score some platforms initially. Therefore, Alsbury for look and say in Die calls you I need to spawn three platforms. They were on scene listen than three and I plus plus. After that, I'll call this pond punctual. So this calls spawn socks and three times, therefore three objects will be spooned. You can change it to Phi Phi objects with this bold. Now, whenever we're sporting, if the object is corn here we don't want the next object will be spoiled And this scene place we need to add its y position. So that is quite about what? That I have created this to add variable I could another variable so it will be public Look distance between platforms So this is the maximum distance between the platforms. So the platform is here as you mix position. Why can't you see in this one on? I need to spawn the next platform for unit about it. Therefore, expedition must be six For that I have created this distance between the platforms were able over here I'll say to act plus equals distance between the platform. So for to act, I'm adding the distance between platforms because one black Thomas here, as you mix y position ist one on Let the distance between black for me too. If I had it, it will be plea on. I want the next position act tree a matting at with distance between platforms because now they spawned objects. Position is three. The next object pollution must be by because three best players five I go Nieto sport at the same exact police. Therefore, I'm adding it. Let me explain once again assume to add a zero So zero initially when it comes here, its value will be to distance between platforms is too because zero presto is too. This is the sort time for writing toe ad equals toe add bless distance with mean black holes or something. This is nothing but this so yes, assume distance between platforms is to therefore to add will be to the platform that will be spawned its Y position will be to so if this line of course, is not that whenever I swung the object today who had will be to itself on the next object will be spawned at that particular place. But I don't need that. I need to implement the value so that it will be about the previous platform. For that, I'm adding distance between platforms. I'll go back to unity. I'll drag and drop the platform. I linger the distance between worthless the first various distance between player on platform I'll indo is asked. Then on the distance between that form will be six on. Yes, of course. The next will be minds. One point try to on Mac six will be 1.59 Therefore, I've seen one point Signed nine on minus one point fighting. I hope it's correct. So it's minus 1.62 Okay, so this is minus 1.60 nicely. I'll click. Apply on Delete the prefab Now the black holes must be sport. Yes, You see that initially five black forms has been sport because we are called it five times in the start function. But its position is somewhere else. So its Y position it's number because initially values who add will be six as distance between platforms is six. So exposition is six. But really the first platform to be someone over here or here. We can just manually add two platforms in this way at some random place On the rest platforms will be randomly generated. So yes, now when the player goes away from the camera, we can't actually see the player. We'll deal with the camera moment in the next video. I think one platform is analysts Don't need the other one. If you want the first platform to be randomly placed, just see the point where you want to place it. 0.82 Therefore, you can't just go over here on carpet these lines off court cases over here changes to our value to sir 0.82. You can just more these lines off court before the follow. So now the first battles wipers and must be 0.82 on it is you see that every platforms expedition is different. It's because off this line, as they are giving a random X value for the platforms. So here you can say that, uh, 36 patterns have been schooled. So now I'll just said it's Kravitz came to zero on dry. The moody player about you must notice that the platforms will be sport when I motor play up on the distance between the last spawned object. On with the player is less than or equal to then, because we're lender 10 or here will spawn the platforms. So as I move about because he that the black form has been spawned, so yeah, yeah, started. So in the distance between the last platform handed player, it's less than or equal to 10 were scorning the black songs. But when a player progress up are of animal player moves up, we don't want the platforms which are below, So these platforms will this right in the next video. Thanks for watching. 8. Setting up the camera controller: Hey, game developers. The son kills from san SARS in this video will deal with the camera moment for that. Let's our script will call it Follow layer. Rand will open it up to more camera. Worst nuclear began with a simple concept. It's called Move towards What that will call such as former position equals is a vector. Three dark mood words. So mood words takes three arguments. The 1st 1 is the current position. That is the clamour position on the next one is the target, which must be our player, therefore, Al Qaeda game object. I'll call it here On any other function. I'll safely year equals came object. Don't find Imacec attack place, so I want to move. It was player transformed. The position on the 3rd 1 is the speed so that I could available offloaded a type. I'll call it the world's speeds on Al Pasto work Speedy here. So what does this This line off cold? Just mostly camera from its current position to replay a position with this speed, let's take whether this work islander towards speed as 20 on Let's see the book. Now the camera has more towards the player but you cannot see anything which is going on in the sea. It's because cameras e position is 10 on even players. Position is cameras. Your position is zero and even the player position is zero. We want the cameras to see position to B minus. Stand as we can only see the player on the things in the scene here when the secret mission It's minus 10. Andi When we don't want to actually more camera The worst a player in this week, we'll have some offset started. A camera will focus at this point. Our summers. Oh yes, let's get a public record. Three. I'll call it Offset on. We're here for the player position. I will add the oxygen so the the position must be my understand. As I said. So now the camera must look at the player perfectly. Yeah, I don't want the camera to actually look at the clear. I want the camera to look at this particular point. Are, too. It's about a player. Therefore Alan Kawai as to I live excessive, so I'll enter to again. Yes, now it will follow the player property. But even when the play of falls down the camera will fall it. We don't need it. Therefore, record a bullion will call it Move on. We'll only move the camera to us. The player, if more, is set to true. And also whenever the place on the platform reading to move the camera in this way as an artisanal beat stomper game. Therefore, as a transform dark translate rector to daughter in tow, I could float variable. I'll call it mostly on I'll multiply this split more speed on, of course, in tow time, doctor. All the time, even here, we have to multiply that times Delta time. I just forgot. Sorry, because I need to move the camera according to the time and not be frame rate here. I'm just translating the camera upwards with them more speed. So I don't need to translate the camera or movie camera whenever the player is on the first platform because I want that can recommend or live in. The player has landed on the 2nd 1 Therefore, I had attacked for this platform. I'll call it Start on, I'll assign. It took here. I got f clear transformed our apparent. That patent is not equal to a little on if player that transformed a parent, that parent, not bag, is not equal to start. So here and checking if the players parent is not equitable. If yes, I took if the players parent. So when we run the game, the players parent will be this platform. I'm talking a player s parent has a tackle start. If it hasn't that gold stock, don't perform this. If it does not have a tackle stock movie camera, that's what I'm doing here. Let's tuck. But that this works. But before that, I need to enter the moose speak, so I'll enter the mostly. That's 1.5. Yes, now you can rise, not moving up. But when I land on the platform so that may land on the platform, I believe in increased E some force to 15 on now. Notice that the cameras not moving up when the players spirit has a terror called start. Whenever it's on the platform, the camera is moving because its parent does not have a tackle start. Awesome. Now, whenever the player goes away from the camera, we need to destroy therefore Al Gore sprites like Toby Square on. I'll move somewhere over here on a box collider. Totally ready. Party to the ill Said it. Gravity skin 20 on. I'll freeze its position and rotation. Yes, you can tend to kind Matic so that it will not moving. The objects collided. I'll increase its Y scheme. Decrease its x scale on ill disabled sprite during the road for this island script called destroy objects. So we need to destroy objects when objects collide with this object. Therefore, I don't need a starting up. They function I say white on collision and truly collision to re on a BT. I have explained this in all of my video so I'll take it. I just destroy the object that this object has collided This If this article eyes with this platform, this object gets destroyed because I am not saying only came object and see will be dog came out IQ So this object is the collided object on destroying equal lighted optic Not this particular one. I'm just rain in this to destroyer So they never our camera move. Even the destroyer will move on. This is not quite listen, huh? Its coalition Now let's take whether this work. So I'll just right. So it's the platform on. Yes. You notice that the platform is not being destroyed because even its body type is kind Matic on even destroy a body type is kind Matic. So because of that, the collision is not detected. But if I moved, it destroyed was the player the player gets destroy, I wouldn't want to destroy the platform. The foreign set, the ball type dynamic actually have said Gladys came to zero because you don't want that object to experience drive on now and they're more. The subject was the platform. It gets destroyed. Awesome. So will fix all this marks letter. So yeah, I'll make the play jump. Oh, so you said that the platforms are being destroyed on even with the player die. We need to display some die panel. We'll do it later, barely moving the damn rattlers detail than ever more satiety. But we're not altering the value off the movie. First, let's see when we have to move. The camera wants to player when a player when a player has collided with another platform, we need to move the camera towards to clear, so therefore really to access this variable in the platform controller stripped. So I'll declared us public on. I say Highland Inspector, because I don't want to alter this value in the Inspector. So I got a platform control Al Qaeda method called on collision. Enter Judy off course correlation to me O B g. So I took FB collided up there has a tag call, please So I can discomfort that on please. So the collider wrapped It is the colliding object has attacked court earlier. What I do is, I said, move to true. So I said, I said Move to true whether the collided object has it, that's called near, which means the platform collide with the player. It's yes, we need to access follow plan scripts and said Multitude. Therefore, as a camera not made, don't get competent before accessing the movie able really to access the script. Therefore, first we need to get the script by saying get confidence, the script, me, the variable names and I must set more true camera that main just gets the main camera, the ties that are called main camera. So we're accessing the follow player and sitting with where I was sitting with the forms, the camera keeps on when forced a player when movies said to truth and just grabbed the player. So when are player goes like this? And collected the platform more shattered? True. But what is again the player collides with the platform. So the next platforms here on nuclear house collided with this platform more settled through the camera has come here on. Imagine if the player can't collide with this platform. You just fall toe next. Last one. By that time camera will be summer over here on. If the player will not collect that, this will color again with this No, again, we will be settled through on the camera. Wilmut was the player. We don't need a camera to move back. I've just been in the platform. Recent explosion on even the camera was Yes, We don't want the camera to move back. So in order to fix this in platform controller script prepared a 1,000,000,000. I'll call it for Sky. Initially, it will be true. So before setting go to true, Al took Yes. Is this the first time that the player is colliding with the platform? If yes, answering it true handles that first time toe false because whenever the layer collects again, it was the second time off. This leader game object tag will be clear, but past time will not be true and we're not setting motive. True. Therefore, we're not moving. The camera will simply here. We're not at our setting. Mood falls. The camera keeps moving towards the player whenever it collides with the platform on, Move said True, in order to set more calls will just go here. Andi will talk if the distance so vector to the distance between the camera position on Leah's position. Bless offsets is lesser than us on. If most secret group will set, move to force rectitude or distance district is the distance between the first optic on the second object I'm talking if the distance between the camera pollution and play a portion is less than two on if more settled through. I said it before because camera is already near the player on. Therefore, I don't want to boys on. Yeah, let's step with this work. So yeah, no. When the player goes below the camera, the camera will not follow the clear getting her saying missing reference exception because the player has been destroyed on We can't actually find a player. So it's that line ready to hear. So he knew the problem. All this stuff is Layer is not equal to know which means your players in the same will perform these tasks. If the place die will not perform this task on now. The error must know pop up when player die. I just deleted manually. So yes, now airplane. It's not there. The owner is not being displayed times for watching. 9. Setting up UI: Hey, game given the both the Shankill from Sam Stops and this video will set up some things like Woz Button Main Menu Button Restart button on the high school manager. Before that, let's move these two scripts into the scripts folder and just download this bubble buttons . Zip file from the languages available in the description. So open that open PNG on Dragon. Drop me button PNG into the desktop, then drag and drop that inside sprites folder. Actually, there are so many sprites inside the single image, so as you can see there, so missed right. But we have only a single sprite with us, all the sprites in it to separate the sprites. Just sit right motor multiple hit. Apply on only that does not do the job for you Goods Fried Editor. Click on this button. Good slice and hit slice. No, you can see that unity automatic being slices the sprites. If you are satisfied that slicing. Just click up black close despite editor. Now you can see that the stripes has been sliced into transcripts, so yeah, I'll just stains the background color to purple Onda Laos course. Let's Credible button Post button must be a button. Therefore, let's create a new I button. I'll select the source emits as the class party Red one on. I don't for the tax. I rename this to boss Resume. I'll go to canvass sets us scale Moto scale with screen size because I need to scale this bright according to the screen size I'll set with on hide 200 maybe. Yeah, I'll just smooch to the top left on. I call it the top. I can't even increase the size to 150. This is perfect on our script to it called Pause. Resume on. I'll open it up. So whenever we take the button, we need to post again For that Al Qaeda method. I'll call it Pause and Rescue. So because the game maybe just a time that time scale equals zero. This just costing now when we could cause button, we need to change that button toe. Raise your body. Therefore, first money. The reference for this prides first will believe cost right on the second will be the rescue place. I'll get a image. I'll call it current on in the Arabic function. As a current equals, get corpulent Mitch Dark striped. So here we're accessing the image from this game object for its positivism. Script has been a test in order to get image here too important Class called Unity Engine Doc, you I know I quit method. I'll call it for the residue on charitable the team with the time that time skill equals zero. That's it. In order to rescue the game, there's a time that time scale equals one so simple, right? So when we need 2% when we need to resume the game if the currents right is equal toe boss been composed again. I'm entertains the sprite off the limits to raise you So it's better if you more here. Also, the currents right is equal to rescue. Well porosity. Well, first of the game on change the current sprite through boss, So select the cost button. Hand the restroom button aan den valuable. Italy called this button. We need to invoke this parcel resume function, therefore will click on this album will drag and drop the prefab, which has positive regime script. Will goto pause, resume on select cross and rescue in order to sell it, pause and resume function, make sure you have said it's access. Specify are to public on now whenever I hit cause the zoom button must be displayed on the game. Must be cost. So yes, and whenever I take the Brazilian button pause button must be displayed on game must be resumed on. Yes, it is working. Perfect. Now let's create the high school thing. We'll go to your button on I select this right, I'll sell its came to 1 70 and 1 70 on drag it over here so this may be even bigger. Maybe 200. Yeah, this is perfect. I rename this toe high school on. I'll increase the phone side off the text. This will be the high school text or the school picks. This will be the current high score in this particular level. Now let's create a script on Dad. It'll canvas. I'll call high school manager on. I'll open it up the first great available off. Ain't I recall? It points on the public text High school Next. Actually, we can't use this because very during boat I class called unity in Jindal Oi. So imagine that first time the player has scored 10 points on in the second level, the player has scored five points in order to compare the points and display the high school unit toe first store, the points their four year to use something called a press play. Professors is used to save the date up, so if you want to set our survey data, you need to just set on the type of data that you want to set as they went. The 1st 1 will be the key name on, say, points on the 2nd 1 is the value that you want to set for this particular key. I'll says you, I'll only set player points to zero only if I have not set Dickie as simply a press dog. Husky board on its Not has it, nor cast. So play Press is used to save the data. Even when you close the game on, open it again the previous that I will be stole. It will be stored under resident plus windows are on type rigid it It's OK so it will be stored under its key current user. Just click the drop down button software on. If you're running immunity, it will be under unity. Unity litter the company name on the project. Me So the data will be stored here. If you're not running it inside unity, it will be stored under the company name on the product. Me know when I want toe displayed high school Only player has died. There was the if game object got signed game object with that player is equal to know which means the player has died. No, I need to compare the value. And so if the current points is greater than the previous point. So to get the key unity state, get on the data type as it is off and I say Get in. If it is good, you need to say get bull. So the key name is points. So in the current point riskier than the previous points, I will enable a text called New High School for that. First, I need the weapons for the high score text before it's a VM object High school Next object on. I'll enable little Doc said active true, So I'm just setting an object toe through in this way. Whenever the current courses credit that the previous points on, then I need to alter the player points therefore the player points got certain points. Karma points. If current policy is better than the previous points were enabling the high school text on , we're setting the player points to the current points. This is no player points. It's player press, that's it. Now I need to implement the points whenever the player collides with the platform. Therefore, I'll goto platform controller on whenever it collide here in order to alter the points from the high school manager customary to access the high school manager. Therefore first as the game object. Don't find object off type, so I'll find the game objective. It's has a script called High school Manager on. Then I'll access the points variable on. Then I'll increase it by one. Less Place is nothing but points equals voice. Bless one. In the update function, we need to up the high score text, therefore, is a high score text doctor next. So, in order to alter the text from the text first Benito access this text on then this sticks so tex dot next equals the points. That's it. Now you'll get an error saying that cannot implicitly Khan would type industry. It's because high school text is a strain. Points descent, therefore, to convert in string. You noticed a Doctor Street. That's it. Now let's write him. Drop the high school objects. So the high school text is this Onda now Al Credit panel. This will be the diet panel. I'll Jane, this color Keret your side and industrial guide Saddle Onda I'll create a fixed. This will be our new high school site. So how did rag? It's a bow and correct through the top center I change. It skids off 50 on you scared detects So this will be the new high score. Next Align it to the center. Attend its color to light I may increase its size, slugger. Or maybe that'll be 15 So now I'll drag and drop the new high school object whenever player die, I'm to enable this plan on even. I want the current high school button Toby on top off the panel. Therefore, just drag and drop it below the panel. Actually, we don't want this as a button. We want only the image. Therefore, let's remove the bottom component. As I said, we need to enable die panel went clear. Die So we'll goto the destroy a script on Ben well took. If the collided object has it that call player what I lose, I'll enable the dead battle. But so, Stanley, the reference for Did that panel therefore as great one on here? I said that panel dot set active True, I just dragon robbery, that family. So it's that batter another player die. We also need to display the high score text. Therefore, well, duplicate this radical with you. I'll rename this to previous high school and yes, in the high school manager. Really the reference for that. Therefore, I'll say public next previous high school I'm in Play a dice. I'll say Previous high school dark fixed equals little breaths dot Gaitan's the killing, so it's better tomorrow it's over here. It only displays the boys. Yes, we need to convert it to string on before displaying the points. We should say What is it? Therefore I will say this is high school and after that I will display the points. Yeah, let's say this back to unity will deactivate this debt. Paddle will drag and drop the previous high school text on No all must work fight. So the points is zero currently when I jumped on the platform points willing please on now the high school will be displayed on the high school. Text will be displayed on rename this high school next to new high school. No high school history. I know the players nine. With the current school off to new high school text will not be displayed on the previous high school will be displayed. Let's doctor, So let it die. Why isn't it so? The death panel waas not displayed because And the best rare We're talking after the game objectives player. We're destroying it. But when the players spared until the platform on the platform collects with destroyer, it does not have a tackled player. Therefore the dead panel is not displayed. Therefore you can just remove these Onda You can get the reference for Did that banner on when the players equal to know we can enable it? Now let's write in roughly that panel on Let's talk weather this work. So now let's talk whether this work as a speaking jump. Now the score is too, that in die and yeah, we can see that the new high school is being displayed even though the current high schools less than the high school. It's because the new high school, by default itself, is set to true. So we have to send it reports. Now. Everything will perfect as just delete Iplayer. So, yes, you can see that new high school is no being this week. Now let's go to the restart button on the main many button for net. I'll kill you. I button I rename this street, right? Andi, I'll select this button. So I attained its skin toe. 202 100. I'll drag it over here. I duplicated on green in this to home jeans, a sprite, the whole Yeah, No, we have to create a level order. We can just add it to the that panel. So relied on level loader on, We'll open it up. So yeah, I was training method, so it will be public boy lord on, then I'll extreme as argument. It will be 11 me. You can just use applications or low level on past the level mean when you're loading a particular level unit of this play loading panel. Therefore, first win in the reference for the loading talent on whenever you're loading. Seen just anyone be loading family on. That's it. We're only the update, so I just were there. You I panel this will be the loading panel. I'm just dragging Bill. I'll rename this to lording panel. I like that fixed on and call it loaded and said its foreign size to 50. A link with size. Align it from the center aisle. Change its color toe white. Maybe only one exquisite sighs. Still 100? Yeah, this is fine. Allow Anchorage Villa. So who are here? You can see is the color to red. You have to disable it initially because all ever we press the button, we have to enable it. I'll sell it. Board off them. I'll click add. I'll drag and drop the that panel because I need to call the function, which is available in this script whenever these buttons are pressed, so I'll call a function called Lord. Whenever retry, Burton expressed, I need to load this game c for game level on whenever home. But when expressed, I load this thing called whom, which I'll be creating in my letter will use here. Just drag and drop the loading power for now. disabled. That panel servicing movie scripts inside the script schooler on? Yes, let's talk whether the loading thing works. I'll just delete Iplayer. Yeah, use over that is working. Perfect. Thanks a lot. 10. Creating amazing particle system: Hey, Jim, develop us So, Shankill from sand socks and this video will create some cool particle system. It's makes our game look cool. So in order to create a particle system just right click good FX select particle system on You can see some particles in the scene, so no, we have to just play the with the settings to make it look. Ooh, First go to shape selects ship toe get on, then increase its size by enlarging this This looting increasing more on dragon below Yeah , on then, Goto lifetime set it to 20 on the speed to 20 on set new extradition to zero. So it can't just be Christie lifetime to then or maybe file salad too. Oh, said it Toe one. Yeah, this is fine. Said they start speed to 20. Oh, maybe 10. Go to render celibate material as the sprites Default. Good scale or the start size. Select random it mean to coughs. Select nickel. Andi, display vertical until you're satisfied with the random scales off the sprites, you can even Aleke by right clicking. Selecting Archy. Yeah, so just goto start color. Select random color on. Do we call this select color. Then select the color virtue lack as like pink goto emission increased rate over time to 50 . You can just increase the lifetime. Teoh too. Goodall enable noise collision So any nice display with these values until you're satisfied with the particle system. So this is school. I think there are problems with the skin, right? I think I had toe decreased its scale so that the size of Mount Ba zero delinquency score speed its frequency even the strength. Yeah, this is school. The select dreamer are the sell. It starts size toe ako on deeply. You can just increase the ridge over time. 200 on Yes, you can believe these values on Make some cool particle Levitz. I'll rename this particle system to Bt Particle system on I'll much under the camera because whenever the camera more, I want a particle system to move. Let's save seem. Maybe you can drag and drop the particle system into the prefab supporter. Now let's create some animation for a camera. Soto animate the camera. Just goto window selects animation it creates on. You can get a full over here. Call it animations on inside that you can say this animation. Ask Cameron. Mission just hit the record button. So will enemy the camera in this way. Something like So we need to alter the size. He did record button, just ultra precise Buddhist white thing. So stop here will be the time after which, you know enemies. So just play with this. You'll get some cool ammunition. You can quit any type of animation you can, even until the rotation of the camera. Just alkadiri rotation if you'll need. So you can put any type of animation in this way. Yes. Now we are done with a particle system on the camera animation. Sorry that, but the animation is not quite smooth. So very copy the size on based it at the last. Yeah. Now it must miss move on this. But whenever we play the game, you see that the particle system will start. If you want a particle system to prevail just selling the particle system on select reward , which means it doesn't start when you play the game. The particle sister, it will be pre world in this awesome hands. A lot 11. Implementing Applovin Ads for our game: Hey, game developers. So Shankill from San Sods in this video will see Hotel Implement App Lovin Acts for our game In orderto implement a player. Nats goto up 11 dot com If you have an account, just click signing. If you don't have just click, sign up Andi. Great an account. After signing in, you will be in the same page, so just go ahead and click on getting started on indignity. Sdk. If you want to display ads on android devices, just click on Enron on Download the Unity three D package. If you want the show ads on IOS device, just download this package. Go back to Unity and create empty game object on call. It adds controller at a new script, good on college tax controller as well, and then make sure you have added as controller to the main menu. As I have not created main menu, I have added here on then open That's controller in the ads. Controller First will create our private constant strength. It's naked key. We're saying that that's private because we are not axing this in any off. The scripts were saying it as Const because this value will not change, and it will remain constant for this sneaky copy necessity. Kiki, over here! Andi based it over here. Make sure you have enclosed within double invited Comus on first, we need to set the Sneaky, therefore with the app loving dog said It's Nikki on well past the Nikkei. Keep as that argument on then we should initialize. They're sticking by saying at loading dock initialized sdk. If you want to show industry shell in your games before showing the interstitial, we have toe load it. Therefore with Sapelo in the pre lower interest issue. And even before sowing the rewarded interstitial, we need to load it right. Therefore with the up 11 dot load rewarded interest issue. If you want to show banner in your games in the start method, you should say Apple windows show al uploading dot Add position center on up 11 dot add position. But now let's create a public wide load rewarded industry shield. We're seeing it as public because we can call this function when player clicks the button or anyone. We can access this in other classes, other scripts before loading when you to check if the interstitial is ready therefore in this condition will say if app 11 dot is incent interstitial ready If the interstitial is ready, we showed rewarded interstitial. If it's not ready, we'll make it ready by saying Appleman dot lords rewarded interstitial If you want to show industry shell, create a public wide calls So industry sha before showing the interstitial we need to load it therefore in the condition which will check whether it has been loaded before the condition will say apple when dot has preloaded interstitial Which means have we loaded our interstitial? If yes, we've also didn't s t shirt If not, we reload interested on Then we will call sure interstitial function again so that to check whether it has been loaded If yes level So the interstitial even over here we load the interstitial Then we'll again called the lower rewarded interstitial function and awarded industry Asia will make you on more money than the banners Andi Regular industry shoes. You can even reward the player When he asked what's rewarded videos? If you want to reward the player desk, click on Rewarded videos which will be available in the docks on then copy this whole thing and placed it in your cold in the start method, make sure you have end of the school London Placido payment, which will be the name off the game object to which you have added D script on over here. When it's a slow did rewarded. Just reward the player by adding extra momento, the account or the extra help if you have 100 scenes or more than 100. Adding this as controller scripts toe every scene will be a difficult task, therefore, will make a single turnout up it to make a single turn. First we have to say private static the class name, which is as control than the variable name. I'll say that instant static because it is not going to change in the abate method I'm calling Make Singleton function avec matter is a method which is called before the start function in the Make Singleton method. I'm talking if instances not equal to know initially, instances said to know, because in the start on Darby function, I'm not assigning the value for it. If instances not equal to know now initially it is equal to know, therefore it will goto else condition we're setting instance equal this we're setting the value for the instance as descript now instance will be the script. And then we're saying, Don't destroy on Lord Instant. That means we're not destroying this object when we go from one scene to the other scene or from one level to the other level. If there's already now instance, has been set up now, instances not equal. Don't know. Imagine you have other Descriptor Amendment. When you start, the game instance will be the script on. We're not destroying this object when you're returning back to the main menu. It already contains are as controller script, therefore, at that time instance, will not be equal tonal. Therefore, we are destroying the game object to have only one script in a game. Reload rewarded interstitial every 100 seconds. Therefore, in the start, matter will start, according we'll call it Show up and over here I'll trade according and call it I animal later show. Add inside this as a origen new wait for seconds inside this I was 100 because I wait for 100 seconds on. Then I will load the rewarded interstitial. Therefore, I'll call load rewarded interstitial function, which is this thing on, then, after showing the rewarded interstitial al study coating again to wait for 100 seconds and then load another after 100 seconds. If you want to show only interstitial, just call the show interstitial function over here. If you don't want the banner, just remove this line off court on. This is not lordly. What industry shell? It's lonely water industry. She in. Now we have set up as controller for again after the ad has been displayed in your mobile. Your application will be displayed over here so it will display the application name on the one light and if I click on it and here you allow the basic settings. If it is not being displayed on your mobile, just anybody test more on wait for 30 minutes, then re Tuckett. And also, while uploading your app to the APP store to any website, make sure you have disabled this because if you enable the test more, you'll gain no money. Here. You can choose the things which you will need on over here when you display the awarded video by default, it will be said to us, which means before playing the reward of video and messages displayed. And after playing the reward video, another message is displayed. I don't want to explain in my feet. So I was like, No, if we acted s on if you want to display message Just entered the currency name on the reward that will reward the player. After watching the video on, he said, If you're building your game for Android on, If you have implemented the Apple Onex before building your game, just go to plug ins on road and open the android manifest Fight on, Then just go to file their settings. Click on player settings on over here. Copy the product name that you have entered on based it over here with this back his name and then you how toe pace the sdk key over here. Just service and back to unity on then build. Yogi, if you did not enter your app planned on the STK key while building the game you're a survey later so therefore it is necessary to enter the product name as the last. The sdk key 12. Building our game to Android, iOS, Linux, Mac, Windows and WebGL: Hey, game develop owes. So cycle from San Sobs and this video will build our game. Soto Gilligan will goto file bill settings on till flap selected platform. But you wanna build again? Make sure you have the home scene at the top, because whenever the game opens first, we want to load the homesick so therefore the same that you wanna lose. First should be at the top if it's not just right and rope to the top in this way to Addison's, just go to Seems on Dragon. Drop inside the bill Cities. Now, if you want to build a came to Windows, select windows on the architecture. This is nothing but a little bit on 64 bit. Go to player settings here. You need to enter your company name as a science us. Select the icon on If you want, you can select because er go to resolution and presentation. Disabled default is full screen because you don't want the game to run in landscape mode on the PC. Instead, we want it to run in pro trait Move, therefore, will disable the for the school screen. We'll enter the screen with us by 60. Andi full screen height as 8 70 So this resolution will bring our rain in tow portrait mode on. Then you can disable the display resolution dialogue because we don't want a player to choose the resolution on which plane wants to be play. We only want to run the game in this resolution. You flatter me When I click on preview, image will be displayed if you're using unity free. If you have your local, just click on this hot button. Select your logo on. Enter the duration I se seven If you want the logos to be sequence shell out are we want that to be displayed one after the another Just select drama toe all sequence you and yes, you can change the background color to anything you like. I'll select this class stylus dark on light on the cholera swipes. Now, this is better for my local. Just out of the settings suit your logo goto other settings Here you needle just out of the bun line In the fire, the company name must be seen as you had entered a bull on even the product. Remember, you cannot include space over here on now. Just click bill, select the folder where you wanna build Don't will inside the Assets folder. If you do so, you will get an error. Just build outside up inside a folder if you want O build for Max Elect Mac and built on. Of course, for all the platforms Your toe. Enter these details. If you honor will for linen, just select Lennox on building T. Yes, you can also select the architecture. If you wanna build for us, you need to download. I was package. So here one bomb will be available. So just click on that and download the iris package for Unity on then to build a game for IOS and Android, you need to goto addict residences or he'll go to external tools. Scroll down. You need to select or broz the sdk part and energetic a part from first year. It'll install Dallas naked on. Then you need to go inside. Program fights into 86 Java on Select the Genetic A folder for the sdk urine to install on road studio on. Then you should click on gross. If you're on Windows unit toe tap, update our here. Click on app later. Go to local on Select a Snake A folder If you learn Mac, just open Andro Studio, Celic and Rose to do references, system settings and SPK on their Your SPK location will be specified on the upper right off the screen under Android sdk location. Just copy that and placed it over here. Now you can build a game for IOS as well as android toe. Build a game for Android. You need to select bill system to internal. If you say griddle and Bill, you'll get a new one on here. Butto, enter the package name. There is your company name and the product name. And even in the resolution representation, our game should run on portrait mode. Therefore, the default orientation will be portrait. If you want to build your game for with Jill, just sell a great deal on. There will be a button available over here. Just click on it on download the Web Jell package here unit entered. People can waas height and wit Island of the victors by 60 and high class 8 70 Yes, one light and fire is not required over here. Just click on Bill, that's it. And this way you can build for PC Andrada, Iose and Web. Gee, hell, we had just entered the default screen width and height. Only this will not do. Our job will just goto audio script because it will be available in every scenes on in the step function or in the other conscience with a screen dot set resolution. So this takes three arguments. The 1st 1 is the bread. I'll say 5 40 The 2nd 1 is the height. I'll say 8 70 on the third is whether we want the game to be played in full screen. I'll set it falls because I don't want a game to run in full screen mode. That's it. Now, whenever you play this game on PC, its resolution will be set toe 5 60 into 8 70 But if you are on android discord with the executed on, even its resolution will be set to this. But we only need to set this resolution on PC. Therefore will check if not application dot is mobile platform. So here we're talking, If not so I'm including this not symbol here. It's not we're using the mobile set the game resolution to this, which means if we're on pieces were changing the resolution. If this is I'm about black phone, we're not doing anything because we are set its orientation to portrait and the players settings. So here we have set it to portrait. Thanks for watching.