How to Build a Basic Android Game in Just 7 Minutes (Unity)
How to Build a Basic Android Game in Just 7 Minutes (Unity)
So the trick to Android development is to choose the right tools for the
job and to learn only the skills you really need to build the kind of app that you the whole process so much quicker and simpler so much so that in this Blog I'm going to show you how you can get something up and running in just seven minutes
So, Unity is a game engine that means it handles things like the physics and controls it provides certain assets for you ready-made it basically makes the whole process of creating a game much simpler so you can focus on what makes the game unique and on the assets and on the design and that unity handle of the more advanced code you only need very little code to get started with unity and what you do use you can find tons of guides and references online to help you through that said unity is still very powerful very flexible and C used by a lot of professional developers in fact many of your favorite games from the Play Store were probably built using unity way to try and make a game in Android studio you need to learn Java you need to understand classes and libraries you need to create the physics engine yourself so you're handling things like gravity and collision whereas unity does all that for you makes it so much easier while still being as powerful as you could need even as a professional developer if you're someone would like to create an android game but you think maybe it's too difficult it involves too much code the I hope this videos gonna demonstrate just how quick and simple and easy the whole process can be I'm gonna really run through it though so if you want to slow things down and understand what each step does then follow the link in the description down below as you'll see though the process really is very simple you don't need any prior knowledge and as long as you've got unity and the Android SDK installed on your computer already then you'll be good to go okay so seven minutes let's go so the first thing you want in any game is probably play a character so you're gonna open up paint or whatever I mean obviously there's better tools to use for this foot this is all about the morality and the easiest and quickest player character to make is a square
with a face full of attitude this guy
you're gonna take
squarely and you're gonna drop him into your game like that so he's a sprite we also need some platforms for him to walk on so drag your platform into your game in the exact same way cool thing is look you can drag and reshape this so if you copy that and then paste it you can make as many as you want to select your player character squarely and then you're gonna open up up here on the right the inspector and in the inspector you're gonna say add component physics 2d rigidbody 2d so this is basically 2d physics for your character and what we're gonna do is we're going to drag the camera onto square e like so in the hierarchy these along the top here are controls that you can use to decide what you want to do with your game objects and that one's used for moving stuff around if we place it right on top of square e then it kind of makes more sense cuz you can click play and now he's in the center of the screen so anything that's a child of anything else= will follow that thing around anyways enough talk work okay so select square e the problem you can obviously see here is he's falling through the ground so we want to add another component and this time we're going to add physics 2d box Collider 2d I'm gonna do the same thing with the platform here add component physics 2d box Collider 2d once more and if we copy these now then we'll also be copying over that new Collider and the new
physics okay so now click Play and hey
that's starting to look more promising okay now the next thing we're going to do is create our first script so that we can actually start controlling what happens in this game but don't worry it's very easy so first of all go down to your assets folder in the project window here and you're gonna right-click anywhere and say create folder script now with that open right click and say create c-sharp script and we're going to call this player controls - double-click on that and it should open up the visual studio for you here alright and this is your first script you'll see there's already some code here I'm going to reference here because I'm not no mister remember however I did write the reference so it doesn't feel like cheating alright so what we're doing up here is we're going to create a new object of the type rigidbody 2d like I say don't worry too much about this you can learn as you go it's gonna be that same rigid body that is attached to our player character so in order to move our character all we need to do is say RB which is the new rigid body which refers to the rigid body attached to our player velocity equals new vector2 and that's a point that has two axes and we're going to say one that seems like a decent speed to start off with and then RB velocity y okay so now open back up unity click on your player like that and then go to add component just as you did before and this time we're gonna say scripts and then there you have it yo have your player control script that you made a click play we should speed along well speed along is a strong word but yet is he's certainly moving make that three and then move three times as quickly yeah that's challenging we want to open up our script again okay and then we're gonna say during our method if input get mouse button down the index is zero then against ARB philosophy will whythey probably feel awfully equals new vector2 are the velocity X and then we'll make that three so the player clicks the mouse whilst the game is running then he should move upwards now we I know you're thinking you're saying Adam there isn't a mouse click on Android but that's the cool thing because a mouse click is equivalent to tapping anywhere on the screen bear with me we're just going to type out some variables and you don't need to worry about what these mean.
I will explain it all as we go
on ground so our Boolean are true or false statement equals physics 2d overlap circle ground check dot position ground check radius what is ground I'm going to add one more thing here which is and on ground now
we're going to create a new empty game
object and we're gonna call that check around and this is an invisible object that we're gonna use to see if there's an overlap to see whether or not we're hovering over the ground of course we want it to move as square emu so just like the camera I'm gonna drop it underneath square e so that it becomes a child and now for clicks query you should see that's in the script we have some new options and the ground check is a transform and take a check ground and drop it in to ground check then I settle radius to 0.1 we want it to be nice and small and then now we're gonna create our new layer mask so select your platform and up here in the inspector you can see it has the option for layer and you're gonna go add layer and then you're gonna make this layer called ground if you click back to the inspector you can now select ground as your layer okay so now go back to your player and then the last public variable what is ground you're gonna set that to your new layer as ground now fingers crossed it should work unless we've forgotten something something's on the ground you can click click and he'll jump when he's not on the ground he doesn't jump there you go and that is the basis of a fun little game and if you follow my advice at the start this
Blog and you went through the
installation process and set up unity and the Android SDK you should now be able to test your game on your Android phone and it's quite a great feeling when you see it come to life on your device ok so it's something pretty basic but it's a great foundation to buildup on and there's not that much more code necessary for handling things like enemies collectables next levels and tilt controls once you've done that you can just focus on designing your different graphics and dragging them dropping them into the scene so you found this video useful and interesting guys if you did then please leave a like subscribe to the channel if you'd like to see more like this hit the bell button if you want notifications comment down below if you have any questions and of course check out and rule 40 calm for your your source for all things Android.
Thanks For Coming If you like this Please Subscribe And Share, And if You Need Any Kind Of Information, So You can Comment Us or Contact Us !!!
5 Unbelievable Places That Actually Exist Welcome To Informative World! ! Y ou may think these images are from the movie avatar or perhaps some other distant earth-like planet it's hard to believe these places exist on our own plan In this blog Almost 5 unbelievable places that actually exist Number:- 1 (Under Water Waterfall)
10 Surreal Places To Visit Before You Die Welcome To Informative World!! Die Trolltunga Norway formed 10,000 years ago Trolltunga is a popular destination for brave hikers it is 1,100 meters above sea level and hovers 700 meters over Ringa dolls vetnet Lake there's no railing to detract from its natural beauty and so far there have been no hiking fatalities Lake Hillier. Australia Lake Hillier is a saline lake in Western Australia that spans 600 meters long and 250 meters wide the color of the water is permanent and does not change even when taken from the lake itself the reason for the pink hue has not been discovered but it's speculated that it is due to algae. Menden hall ice caves Alaska the ice caves are located under the 12 mile long. Mendenhall Glacier located near Juneau they are only accessible to those willing to kayak - and then ice climb over the glacier unfortunately this wonder is retreating due to global warming and one cave has alrea
iOS VS Android Did You Ma Ch ? As of May 2019 the market share for phone operating systems is really only a two horse race - iOS and Android, with Android controlling just over 75 percent of the market and iOS with just under 23 percent. Kai OS and some others like Nokia’s OS were next with a negligible market share. It’s become a matter of fact that in this world there are Android fans and iOS fans, and people don’t tend to cross over to the other side. We all know folks who would never give up their iPhone for say, a Samsung, and we all know people who tell you iPhones are overpriced and more of an accessory than a necessity. But which operating system is really the best? That’s what we’ll try and find out for you. Before we get to the pros and cons of each system let’s first have a look at the history of these two OS’s. We’ll start with Android. The company Android Inc. was founded in 2003 by a bunch of guys, but the one you’ve most likely heard of is Andy Rubin. At first the idea
Welcome To Informative World!! today we're gonna talk about apps that you can download on your phone and make money by completing various tasks from liking a photo to downloading a game and playing it for a couple of hours but there are certain disclaimers number one. I still think that your time is the most precious currency in this world because it's limited and I would only use those apps in a critical situation like you have only a couple months to make maybe a hundred two hundred dollars and you really really need them right now and then you. would use those apps otherwise I would invest my own time into studying online becoming more proficient in something so that later on you can make those money not in a couple of weeks but in a couple of hours another thing that. I wanted to mention if you're an entrepreneur watching this video and you're like why am I even watching it marina one thing that I wanted to point out is that you would understand
Number 1:- MAG BULB T his compact and handy device allows you to replace a bulb in one movement making the replacement process much faster and safer mag bulb uses the same principle as magnetic adapters for charging devices a base where the magnetic Inlet is screwed into the lamp while the other part is screwed into the base of the bulb allowing it to put them together in a single movement thanks to the use of neodymium magnets and bronze connectors the adapters provide reliable contact and are completely safe it is worth noting that the magnetic adapter is compatible with all types of lamps and luminaries the cost of the device is $15 Number 2:- VORTEX This simulator recreates the physical sensations of the virtual environments during a video game or a movie this is possible by creating air currents of different intensity and temperature this allows the user of the simulator to feel the cold heat or wind as well as changes in the weather co