How to make mobile game in Unreal Engine, Doodle Jump tutorial for beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there i'm sarfante and in this tutorial i would like to show you how to create endless jumping game something like doodle jump you can make it for pc or for mobile it's up to you let me show you how it looks like in the game you can jump from one wall to another somewhere here you hopefully can see it how it looks on the mobile phone you can use gyroscope to control it etc etc and right now i can't really see any obstacles but usually it will spawn here also some springs that will let you jump higher and here we have one also some enemies but their probability of spawn is quite low so we won't see them now it seems well let's not waste your time and get to it yeah you can also die in this game alright let's get started i will create a new project and it will be in 4.26.2 version but it doesn't really matter this should work with any new version of unreal engine so let's launch it we are making a game and we are going to use side scroller character in 3d which means this one let's click on next and we are making it for mobile so let's switch graphics to scalable 3d and 2d and we don't want any starter content i'll leave it in blueprints and let's call it doodlejump doodlejump all right time to create a project if you are making it for very low cost devices which means that you want to save every single piece of performance that you can then i would recommend you to start in project setting and find here a renderer and what you can do is to enable forward shading it will use forward rendering because right now we are using defender rendering which which looks much better and it's generally better in almost everything but it's much more performance heavy so if you are making it for really low cost devices forward shading is way to go you would usually use it with vr but to be honest i don't think you really need it i personally i'm not gonna do it any middle class phone will be able to handle this without a problem so that's it and you also will probably want to and set up your setting for android and ios which if you if you are going to publish your game you also have to set up everything here which means configure it right here and now you can find plenty of videos on the internet i'm not going into that now because right here we are just going to focus on how to make doodle jump so if you click on play as i just did you can see that we have here some basic controller i can move left right jump etcetera etcetera that's cool but i kind of don't want it to be in this landscape mode as you can see here so what i will do is to go into edit project setting let's start with project setting and you have to click on android in our ios but that is the same setting in ios and you have to find your orientation and switch sensor landscape to portrait portrait is basically this settings is landscape this is portrait cool so let's close that and now you also have to enable it for your preview so for that let's go into editor preferences for real this time and see you should have here play and click on this little icon which you can see right here is in landscape mode if i click on it it will switch to portrait now so now if you click on play nothing happens because you're using this viewport but if you click on this little arrow and enable new editor window it should work just fine yes you can see it looks pretty cool it's always good to do this on the start of the project because you know what kind of resolution and what kind of orientation you are making your game for so now when we have everything set up let's try to create these walls that you can jump from and you can see the main problem in doodle jump if you go from the lower part of the screen basically jumping up you can fast jump through that which you can't really do here so we will want to set it up and that if our player is jumping out it will go through these desks or walls let's call it walls for now and if he is falling on that from uh from up to down basically he will jump from it let's start by creating a blueprint for it so let's go into so in content let's go into site score pp and blueprints right click here and we will want to create blueprint class actor and let's call it ball underscore bb let's open that and let's start by adding here a cube that's cool and the other thing is we want to add here a actually we don't even need collision now that i'm thinking about it let's leave here just a cube and change and change its dimensions a bit let's make it wider and maybe a bit lower on z axis so now if you put it on the game or do the game it should look something like this but i actually want to rotate it and rotating it would be kind of a pain so let's go up here and change these axis i want to have 2.5 on y-axis and run on x-axis and let's even lower our z to 0.2 so now it should look like this but i of course still can't go through that so we will set it to set it now what we will do is to scroll down here and use our collisions right here we have collisions preset and with setting these collisions preset you can basically use any object as collision trigger so we will do that and set it to overlap all or we can just set it to overlap dynamics but it doesn't matter let's set it to overlap all and now i should be able to jump through that exactly that's cool so next thing is we need to figure out how to let it know that player is either falling or jumping and we want it to fork and jump him up let's say on in case that he's falling and there is very simple solution to that so let's click here on right on component back in overlap and first of all we want to cast to side scroller character side scroller character right here which is exactly respawn you can find him here and connect our other actor and what you want to do is to get velocity so let's get velocity and the only velocity you will want is our z because z is basically how much is moving on up and down axis so first of all let's actually demonstrate it in the game we'll use 7 gig and connect it right here and let's print that so print string and connect our z value right here on the left side so now once i trigger that by jumping through that you can see that every time he is jumping up he has these values in plus but every time he is jumping down or falling these values are in minus which makes sense right its velocity either against gravity up or due to gravity or together with gravity whatever it is called but that's exactly what we will use because right here we can create simple check that we'll see if that number of velocity is lower than zero or higher than zero so let's do exactly that if you want to quickly delete this line you can press alt on your keyboard and left click alright so from here let's put here branch and as our condition we will use float and we want float bigger than float so to do let's do this one and we want to have uh no the other way around let's do smaller so float bigger than float and we want to have this thing bigger than zero if it is bigger than zero that means it's true and he should be jumping up and just to quickly check it let's do here two print strings one will be four jumping and the other one for falling and let's see if it works so right now if i just jump there you can see that he's jumping and if i let him really fall through there it recognizes that it is falling which is very important because if he's jumping we don't want to do anything we really want him to go through that but if he is actually falling on that we want to use that and let him launch to the air and basically jump again so what we're going to do on our jumping let's use launch characters so we will s side scroll character take it here and use launch character and it's probably a good idea to have it on the same value as you have your jump because you will use jump on the start of the game but we will you can worry about it later just to quickly check it you can click on your side scroll character go into character movement and somewhere here you can see jump z velocity is thousand let's put let's put it on how uh something higher let's do uh 120 uh 1200 and set our z velocity to same thing and i think that we have to actually enable the override let's see all right let's delete all these all of these and move it here just put a few of them to test how well it all works and i did something really stupid right yeah i actually put it into wrong branch i set it into jumping so it was launching him every time i jumped there i want to put it under falling sorry my bet again i'll click left click to delete that let's try it now so i can jump if i fold that again it lets him jump and i have to enable the row where was it okay that side scroll character i want to go in to war bp and enable override c velocity let's jump and look at that it's nothing game jump yeah that looks pretty good uh what i want to do now is of course to play animation somewhere here because as you could have seen he was just always in the same stacked animation because we never really fall down so what i will do here is to play animation from our hector so let's play animation and that animation will be jumping i think something like that third person jump should be here jump and jump start connected here and definitely don't want to loop it click on play ah that looks cool look at that yeah that's cool that's very very cool i would probably increase how much he's jumping i think it will be more realistic so let's go in character movement and set it jumps the velocity let's try 100 1800 and the same thing of course for our wall bp oh that's way too much but i think that it can actually look good you can change it to whatever you want all right let's also set up here that we can control a character with a gyroscope which means if you have your phone you can like move out left and right and let him move like and let him move like that probably not going to use it with computer but still it will look pretty cool so you can simply do that by going into site character and right here you already have movement input so we will have to rework it a little bit so let's get player controller right here and from there we want to get motion state get input motion state and we'll work with rotation rate and you have to use z-axis right here and also multiply it by something so let's set it to multiply float by float and i would do 100 but right here i am not going to test it with my phone i will do it on the ends just to make sure everything works but you are probably much better off if you have your phone connected this whole time and always launch it and test what works best for you so right now what i will do is to adhere event tick because you want to do it constantly and i will actually then connect it back as it was but just to let you know you will have to need it connected like this you will connect event tick and then to our scale value connect this thing which basically means how much you have rotated on the axis and how much your phone have rotated and it also has to be minus 100 but it wouldn't work right now and i wouldn't be able to move my character if i did that so i will just leave it connected as i had it before but if you are going to use gyroscope right now you of course have to collect it as i did right here i will move it here let's do let's move it right here and comment it as gyroscope and of course don't forget to always save everything so just shortcut ctrl s but if you are not sure click on save all and save select it to be sure absolutely sure that everything is saved you will need it trust me so now let's create some endless generating map or just a space that you can jump in well for that we will start by deleting all these walls because we will use them inside another blueprint so let's right click and create a blueprint and call it let's let it be actor and let's set it to map underscore bp let's open that and first thing i want to do is to kind of set it so you see where everything is so let's add here a few arrows uh first one and second one something like that and let's set them on y axis to 400 and minus 400 minus 400 because right now if we put them in the game you can sort of see how it will look like on your screen you are right now i'm just checking where do i want to have my pieces of the map and i can't of course see them in the game because i have to take a click on all these arrows and enable here hidden and game which means disabling it so click on play and you can see that it works pretty well maybe i would move it to something like 450 and minus 450 let's see i think that something like that will work quite well so now what i want to do is in our map let's add here child actor which child actor is basically one blueprint inside another blueprint so we can use our walls here so let's put here child blooper child actor sorry not child blueprint and set it right here in child actor component to our wall i believe yep it's wonderful i always created those names and then forgot how it is actually called and let's put here three of them ctrl c ctrl v move it up a bit let's say to 300 and again to 300 so to 600 basically so right now if you click on play you can see that you have it here wonderful and you could also see that he jumped through all of them and jumped and was launched on the from the highest one which is exactly what we want let's put it here and now that i'm thinking about it we will use online two because we have jump so high yeah something like that that's cool but it would be incredibly boring if it was always on one place as you are very as i'm very sure you are aware we have already used these arrows as indications where it will be so what we basically want is to have this wall and somewhere on location between these arrows and that's very simple to set up so we will go into construction script by the way difference between construction script and event graph is that event graph is happening anytime in the game and construction script happens even before this blueprint is actually spawned so it's so construction script is perfect for what i'm going to do take your child actor and we will want to set a relative location right here and click on click on your location split structure pin then take your child actor and get relative location because what you want is to to do again i can right click split structure pin and as we said we want to move it only on this green y axis so let's connect x and z or of course set up here z to be moved between some in between in some range it's right up to it's connected here and on your location why you want to put here a random float in range and as we know that range is these arrows which means for 450 and minus 450 which means about 900 different options where it can move so let's set it to minus 450 to 450 and you of course want to do the same thing for your child actor 2 so let's ctrl c ctrl v and connect it right here and you can simply take your child actor 2 and put it right here oh come on not like that can't click on the text you have to click somewhere here wonderful and let's look at viewport see what it does and you can see that it's moving congratulations guys our walls are dancing so now what we of course want to do is to spawn this blueprint every time a player goes through this blueprint and again very simple to do let's go into viewport compile and you will simply have to adhere some new collision so let's add here box collision let's put it bit under our wall and scale it up of course we want to make sure that our player goes through it and what you want to do is i would probably put here another arrow but you can of course uh no you can't you have to do you have to use another arrow but let's rename this one and call it next map location and you know that you have your child actor on about 600 so let's put it a bit higher i would go with 700 something like that uh you need no maybe you know what let's do 850 because you can see that our child actor one is very close to the start of this we don't want to spawn these two too close to each other so maybe i would move this one a bit down something like that or you can play with a velocity of jump how much you can jump and launch or b launch your player you have to set it up this is more these are more of the game design decisions which you have to do specifically for your game so let's close that and to true and of course i have to set it so edit map let's go back and click on our box and let's actually call it next map call as collision scroll down we have here on component plugin overlap so let's cast to side scroller character right here other actor and now you have to create the actor from class yes and of course it should be same blueprint as this one which means map bp all right and now let's take our next map location get get world transform and connect it right here so let's save everything that's the first step and then test if everything works so works so i'll jump through that and see how much i can seems pretty well to me and there seems to be some problem uh it looks like i'm jumping through that few times which shouldn't happen that's very bad let's put here two once i've noticed that it it happens quite often when we are trying to create unless corridor i'm not quite sure where the problem is but it seems like overlapping it several times do once note should fix the problems like this let's try that let's jump here all right seems like it works but now let's do something with that camera because as you can see you can move together with the camera which is something i definitely don't want so let's close that and create a new blueprint which will be camera so blueprint actor camera underscore bp and you want to add component that component will be of course camera and let's make sure that it's aiming at our player so let's put it right here and you can see that i have to rotate it i could rotate it in the editor this time around but i prefer to do it in the blueprint with small projects like this it's usually easier to do like that because you have only one instance of that all right and you can click on that and see that it sort of works now we of course want to set it up that our plan that our game knows that it will use this camera so let's go into event graph and add and get here our player controller so get player controller right here and from here we want to set camera view target with blend that's cool we want to do it on event begin play right from the start blend sets to zero outline time zero right here and new view time get a new view target that's actually very weird but you have to just set it to self it took me a long time to figure this one out it's really strange so click on play and you can see that now you can control your player and your camera stays in one place which is very good because that means we are using this origin this new camera but we of course want our camera to be followed by the player so let's go back into camera bp and find here our event kick because what we will do is to stick our camera and set its location so set vault location and again split to that split structure pin connected after event kick that's cool and what we want to do is to leave x and y as it is because we don't want him to move along x and y axis we want to move him only up and down with the player so take your camera get our location split structure pane and connect your x and y and now we of course need to get z how's that that's doesn't really matter because we will take our get player pawn let me know in comments if you use z or that i i don't know but whatever just let me know from our get by pawn or we have to use character maybe let's try to spawn it should work and we will get actor location [Music] get actor now come on location split structure pane and connect our z let's see if it works and look at that our camera is moving but only on alive only on up and down left and right and the other and the last one x and y what am i stunning basically x and y doesn't move z moves i don't know why i'm trying to explain it like i'm three years old anyway that's cool so that works fine but let's also change it to two 2d i don't want to really have valid and perspective let's switch projection mode to orthographic and i believe it should actually save some performance i haven't but i haven't measured it so don't take my word for that that much and that looks fine but we need to increase our topic let's try 115 500 5000 jesus just you have seen the number one five zero zero god damn it i would say that it works pretty fine look at that it looks like an actual game who would have guessed so what we can do is actually change material of these desks it's kind of pissing me off how they look so what we will do is to create a oh you know what no let's not do it in blueprints let's click on content and create a new folder materials to do new material right click new material and call it just a color just a color underscore matt probably not the best name for material but it will have to do and we will use it just as a base anyway so let's put here constant vector free constant right click convert it to parameter call it color or color up to you connect it to our base color and by default let's save it into something whitish compile and what we also want to do is to create another constant and connect it to metallic let's do 0.7 ctrl c ctrl v 0.3 on roughness let's see it's maybe a bit too rough let's let's uh i'm not sure which one should i use uh one or zero i always mess these two up oh yeah let's do 0.75 on roughness so roughly 0.75 metallic 0.7 color is a parameter so we will set it up later apply and now what you can simply do is to right click on your material create material instance call it red underscore material and just double click on it and click on your color and set it to red this is a very inexpensive way to create simple materials for mobile games or basically for anything it's uh really cheap for a processor and for performance so right click create material and let's do let's do a blue one blue underscore matt you should probably call it material instance but who cares no one is gonna tell me what i'm supposed to do with my materials deliver it bro all right save it come save all let's go into content side scroll bp blueprints and set it to our wall to do cube is fine maybe i would increase that z as i decreased before let's set it to 0.4 and set your basic material to blue underscore mod alright guys well after applying new materials i find here a weird bug that my next piece of map wasn't spawning to be honest i have absolutely no idea why that happens it's incredibly weird never happened to me before but i have found a quick fix you need to change this code for next level map from here in map bp we have after our component begin overlap on the next map collision originally i had here two once but that for some reason just didn't work anymore after changing materials weird but it just happened but what you can simply do here is to put here something else we can destroy component which will work pretty much same and we want to destroy component next map collision like this compile and just to make sure i have it visible in the game so if i click on play you can see that it always deletes itself and spawns new one so that is that it's it's incredibly weird i don't know why that bug happened but it just did it's so weird anyway that's fixed then so the next thing i wanted to do is that we will want to teleport our player when he's on side of the screen if as you could as you can see in regular doodle jump because right now if i go on the side of the screen my player will go somewhere to hell which is quite unpleasant so what i will do is to go back in our in mine not yours mine not ours map bp and create here a few new collisions that collision should be just a collision so box collision and let's put it on the side right and how high it should be is basically so it covers everything from start of that to end of that so let's move the let's scale it up and move it something like that right now i would set it visible for a bit something like that compile and see how it looks in the game uh maybe i would put it bit more on the left side and it's overlappings which i don't necessarily want so let's scale it down something like that and move it to the left side let's see oh it's fingered something like that should work oh it's still overlapping a bit scale it down and maybe a bit more on the side yeah something like that you should test this on your phone of course now if i jump through that nothing will happen which is good that's exactly what we want we also want to have it on the other side so let's duplicate it let's rename it of course firstly so left one will be left underscore teleport collision and the right one will be as you would guess right underscore teleport collision right if you want to set its location let's look at left it's about 750 so i will have to set it to minus 750 i believe let's see in the game i can see it so it's we have to move it a bit closer that's just because it's not centered if i had the player on zero zero zero coordinates which means i would have also our map on zero zero corners it would work better but this this looks fine so the next thing i will want to do is to take our arrows and actually use them for something so let's move them on about the center of the screen and even actually you know what actually it doesn't matter i want to use these parts of them but let's put them right in front of these collisions make sure that they are not overlapping maybe a bit more on the center side yeah something like that in the game oh that looks fine because now what i will want to do is when our player overlaps this collision i want to teleport him to position of this arrow on x-axis i think it's x now it's y and if it overlaps this i want to teleport him on this side so here it will look like he is going from one screen on one side of the screen to other side of the screen but he will be actually teleporting so let's rename it arrow underscore left and other arrow underscore right so now on our left teleport collision we want to do is to on component begin overlap again cast to side scroller character connect the attractor and what you want to do is to set actor location and we also want to partly have that location so get actor location and let's split it let's split those pin and as i said we will set only y and leave x and z so x and z stays like this and this is teleport left we will then use arrow right so let's get world location i think that we are using world if you get just after here we have to and then connect y and click on teleport i think should be fine let's see to do oh look at that that looks cool we'll probably have to work on positioning a bit but it looks pretty well so let's copy that and do that on the other side so scroll this thing down a bit and what you want to do is to right stop oh yeah this is left so let's write teleport on component overlap copy all that and again to connect this thing and this thing which means pin and actor i shouldn't use think i know and i'll add all right let's switch to a left arrow left because we are using right teleport and maybe let's play with these positions a bit let's put this bit more on the left this thing more on the right but make sure it's not overlapping otherwise you would have endless loop of overlapping collisions and teleporting which would end very badly something like that let's see let me jump through and look at that that looked actually pretty good let's see if it works on the other side and seems like it works pretty well we have forever jumping endless map where we can teleport from one side of the screen to other side i would say that we are on pretty good start [Music] alright so now let's also set it up that our player can actually die and we will use very similar system that we used with our walls if you look at your wall b beam we have here our system for checking velocity and we will do completely the same thing but we will change the threshold which means if he is falling fast enough that means he is falling for some time because you have to have fast higher velocity which means you are falling faster then you need to fall for longer than yeah i got kind of messed up in that anyway we need to have that threshold bit much lower i hope that you understand all right let's compile and we'll do that in uh map bpm let's just add here another collision so collision let's call it that underscore collision because i love to be dramatic when i can scroll that thing down and scale it up something like that yep oh maybe let's make it bigger and you can see that in the okay you can see that right here doesn't really matter uh what we want to do is uncompress an overlap let's just copy that from our wall bp open wall ctrl c ctrl e we want to delete all that and connect it right here and let's set it to right now it's good to check it just to see what works best i think that when i was testing it it was about one minus two thousand it's pretty much what i want to be for falling i mean but i would recommend you to put the velocity on kick and just find value that works best it's always best to find it yourself so let's do it all this and remember we have it on false so on false i want to let's just print it so i will put here come on i'll put here just click for loop let's do one to nine times oh geez another 90 times nine times and print here string that all right let's see right everything is cool he's jumping sometimes falling etc etc and it should be most of the time out of the screen but if i let him actually fall come on somewhere here yeah you can see that it triggered our event of fall of death which is good it means he has to fall for some time before it will trigger it if there is plenty of these collisions but it will trigger it only when he has velocity low enough in this case it's low enough well it's high in negative but that's what we call low i guess depends what numbers you are using cheese i'm chatty today all right let's add here a few more bonuses so let's say that spring that can jump you much higher than you would usually and also some enemies so i will do that by again using map i think i will duplicate it map underscore 2 underscore bpm let's open that and see what we can do here well first of all i will somewhat change it let's say to something like that so the player always knows it's something different and i want to create another wall so wall bp let's duplicate it and do same thing wall underscore 2 underscore bp let's open that and it will change its color this time it hopefully won't create any bug let's call it red red material and let's also add here some something that sort of looks like a spring i don't have any models but you know let's let's do just something that i won't be ashamed of too much so i should have here uh cylinder let's put it just that cylinder changing my mind i'm actually really ashamed of what i just did it looks really bad anyway let's uh disable collision we don't want any collisions here and what i want to do is to simply change it to to do velocity to 3000 all right let's just test it to have it here it should launch us much higher so if he falls on that it should launch him hell yeah look at that it jumped and jumped launched him much higher which is cool that's exactly what we want maybe i would even 4 000 so there you have a spring but the next thing you also want to enter oh come on sorry let's delete this thing save all and let's put it in our map 2b beam and child actor and let's change it to wall to bb alright that's cool so now we also need to set it up that sometimes it will spawn it and let's go into edit map bp in regular map bp what we want is to look here and let's move everything away a bit and what we want to do is to promote this to variable then delete it and save everything because it andrea really likes to crash in and and really really likes to crash whenever i do something like that probably just doesn't like that let's rename it to list of walls let's start behind this really stupid list of maps and okay let's deselect this thing just so it doesn't have that much a problem with compiling then click on this icon and switch it to array compile oh look at that it worked and what you want to do is to get list of maps get a copy and we want to have cop random in come on a random integer in range and that range will be zero to let's do two for now because what i will do is click on our list of maps and add here three different elements you have to use three because you start with zero which me and that's why i said maximum to two that means actually you have three different numbers which we can choose from and first one will be ball one second one will be wall two and third seconds all right third one which means second one will be wall just bp that means he is about 66 percent likely that he will choose wall bp and about 43 percent likely that he will choose vault 2. all right i hope that you didn't make same mistake as me you cannot use here of course wall you have to use map so map zero maps zero and map2 it's i i know i'm sorry it's it's my fault yeah so now if i click on play and try to play it you can see that mostly i have these blue ones maps with regular tiles or walls but but if i will play for long enough here you go you can see they have here another spring which launches me much higher hell yeah and i have just noticed that our collision for triggering next map is kind of short it's possible that if you will go through this you won't trigger it so let's make sure that it's higher something like that yeah just precautions to be sure alright and let's also adhere some enemies or something like that so in blueprints right here we can let's just duplicate it because we'll use same system again and let's call it enemy underscore bp let's take that cube and change it to i don't know something that looks dangerous so so for example i don't know this ball seems dangerous yeah look at that look how dangerous it looks alright let's set it to default and just to make it more interesting let's add a few cones on sites so something like that yeah something like that and let's also make sure that it looks that it's like really dangerous to adhere scene and move everything under it and let's use event stick and on kick let's let's just rotate it so add rotation add local rotation and i think that we should use to do let's see x we should use y so do do do why let's try one put it in the game just what it looks like so show me if you rotate it should yeah but we will let it rotate a bit faster let's do then it will be like crazy fast but that's fine and what we want to do here is if a player is jumping on that we want to destroy it so destroy actor and then we want to launch character wait no no no no no my bad my bad my bad it was fine it was all fine and this is fine we just need to then destroy the actor and if you are jumping which means we are going from there from the side we will want to set it to end of the game and we don't have event for that so let's create one inside scroll character let's put here custom event and call it that let's call it so cast to side scroller character get player character right here and you want to call that event which is dead and now just to make sure that we know that it happened let's print string that and we want to of course sometimes add it to the game so let's take map02 or map2 duplicate it call it map3 and we will want to change our child actor 1 to wall 1 and our child actor 2 to our enemy and maybe yes something like that look at that that will be cool so cool and now of course let's go into map bp and add it to our list of maps of plus and add here map now map zero three if i jump in from the down it should tell me that that happened yeah that's cool that's very cool that happened so let's change it back as it was you know what let's do only three so it's 33 percent chance that something can happen so map map zero two and map three because every time spawn map zero two on map02 um every time you spawn map zero two all of them up zero three it will always follow with map and for a map you can get any of these three so we should be good with just this but if you want you can of course add much more weather added to your game and adhere so many more interesting stuff so let's do something with it at the end of the game first of all i think that i had it in falling so oh right here i have on component that collision i have here just that so i want to cast oh actually i already am casting two side scroll character so let's just call out that and you of course have to do it with every single of these maps so map03 same thing oh actually it's in false nothing true so i have to change it and map02 again two two scroll down somewhere here yep after false let's ctrl v call our date from side scroller character and connect it to false all right so now let's get into the function and what we will do is to create a super simple hat so blueprint so user interface feature blueprint game over underscore heart let's open that and i'm not sure if you can even change this to screen oh yeah phones to do some single access okay but there must be a way to switch it to oh there you go landscape nice oh portrait let's add here text put it on the center set position x and y to zero zero x x leave like that and font scale up okay that's way too much something oh come on mate let's take it and put it somewhere here set it to game over all right and because we all know that game over is bad let's set it to red color because that's what disney taught us if it's red it's bad nice and where is it i was yeah coloring opacity set to red cool so what you want to do is on your in your player side scroll character on that you probably don't want to set this anymore you want to go create widget set that widget of course to our game overhead add to viewport and then after delay let's set one second okay that's way too much uh zero point three second [Music] set it to restart the game so get current level name and then you want to open level by name connect it and compile and let's see if it all works so it's cute everything works let's try to fall into that game over look at that that was way too fast let's put here longer delay edit side scroll let's set it to 0.5 and you know what let's add here some blur it looks cool so background blur turtle set uncut to the last one two two two everything to zeroes set that blur to something like that and i would usually add here some animation or whatever i'm not gonna do it now you can do it yourself i've made plenty of tutorials for that so feel free to do that or you can cook it in like three seconds if you are so right let's try to fall down now game over we got it guys we are pretty much done let's do one more thing i want to somehow start the game of course and that's by jumping right now it's on a bar but i want to now switch it everything to that inputs the motion state so let me see if i can do that so sit here and tick and before that let's put here branch promote variable set that condition to shoot game start and by default it should be false but once once it is true i want to add movement component and work with that with our motion state rotation but before all that i want to of course enable it by jumping so i can do that here after and put touch after jump i don't want to stop jumping like ever so i will just set here start jump to true so after you put your finger on the screen you touch it it will enable gyroscope so you can control your rotation with gyroscope and it should also jump to your first first location maybe it's not a bad idea to have here first few walls just to let the player like jump to those first locations yeah something like that then he should be able to control it by himself right now i'm going to build it on my phone and see if everything works then show it to you and if that's it that's it all right i have found just a small detail inside scroll character right here when you multiply it i originally headed to minus 100 and then and this y axis to minus one i set it to all two plus plus one and plus one hundred it seems to work better but that's about it everything else works very well on the phone somewhere here you hopefully have a screen recording of the game and hey that's about it i hope that you learned something if you did let me know in comments and press the like button as other youtubers are supposed to say and hey that's about it i hope that you enjoyed it and learned something sir fancy out
Info
Channel: Sir Fansi
Views: 48,629
Rating: undefined out of 5
Keywords: unreal engine android game tutorial, unreal engine mobile game tutorial, unreal engine 4 mobile game tutorial, unreal engine mobile games, unreal engine mobile game development, unreal android game, unreal android game tutorial, unreal android game development, unreal ios development, unreal engine beginner tutorial, unreal mobile game tutorial, ue4 mobile game tutorial, unreal engine mobile tutorial, unreal engine mobile app, ue4 mobile game development
Id: Mo32rkVkNoU
Channel Id: undefined
Length: 49min 55sec (2995 seconds)
Published: Wed May 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.