recently bracki returned to the internet with a tutorial video about gdau a very popular open- Source game engine and in this video we're going to be following a similar format and using the same assets but we'll be using G develop another popular open source game engine and even though G develop doesn't have people writing songs about it it does have its advantages G develop is fast lightweight and super approach because of its no Code system instead of needing to learn and write lines of code gdevelop events are written in a much more human way things like if this key is pressed do this thing making it really easy to just jump in and start making games with G develop you can make basically any 2D game that you can imagine and even some in 3D but in this video we're going to be making a platformer game the assets in this video are CCO which means that they're entirely free to use with no strings attached and we'll link to those assets in the description now the first thing you need to do when making a project is create a new project you can pick one of the template games and build off of one of those if you want to but we're going to start from a new project so we're going to click to create a project pick our default size give it a name pick where you're going to save it and then for this video we're going going to be using pixel art so we're going to select optimize for pixel art all this is going to do is change some of the default settings in the game project and now we create the project we start off with a blank scene with no objects our starting game scene and then our event sheet in the background so the first thing we need to do for a platformer game is ADD our platformer character so we'll click to create a new object there are over a dozen different object types pick from but we're going to start with a Sprite object for the character we're going to click to import some images into this object in this case I already have them broken up into individual frames from the pack online so we'll select the frames for the anal animation and add them in and then change the time between frames to find something that's at a good pace and we'll click here to make it Loop so this this is the idle animation for the player and we'll name that animation idle now the next thing we need to do to make it a platformer character is go to behaviors add a behavior and then select the platform or character Behavior which starts off at the top of the list in here there are a bunch of settings for how fast the character moves and jumps and whether or not they can grab onto Ledges or things like that and lastly we'll change the object's name to player and press apply now we can drag this into the scene and you can see it's really tiny because this is pixel art to scale so if I preview the game you'll see the tiny character fall off the screen the first thing we're going to do is go into the event sheet and click to add an event the way the events work is really simple on the left are conditions and on the right are actions so if a condition is true then an action will happen so we'll start with a condition beginning of scene so if it is the beginning of scene something will happen and in this case we're going to set the camera to zoom in and we're going to set it to four and base layer so it will zoom in four times the initial scale on the base layer and then we'll use another action to Center the camera on the player at the beginning of the scene so we'll use the action center the camera on an object and select the player object for the base layer so now when the scene starts we'll be zoomed in and the camera will start centered on the player and then they'll fall off screen again so now the next thing to do is set up the grid to be 16 by 16 and we'll add a tille Sprite object and we'll start with a dirt platform and this image is 16x 16 so we'll set that as the default width and height and rename the object as platform dirt and then press apply then we can drag that platform into the scene and here it is now tiled Sprites expand differently than regular Sprite objects a regular Sprite object will grow in scale when you try to expand it but a tiled Sprite will actually repeat instead of stretching which makes them great for building out levels and doing lots of different things with UI if I double click on this I'll open up the object and then I can go to behaviors and add the behavior platform and then press Supply now this is a platformer character and this is a platform object so if I press preview now the character will land on the object and because this has the platformer character Behavior I can use the arrow keys in spacebar to move it around and launch it off the platform obviously that movement is too fast so I need to open up the player object go to Its Behavior and in the platform or object Behavior I need to adjust these values to find something that makes sense for this character at this [Music] scale now the next thing I'm going to do is build out the level with G develop you can use tiled a third party tile editor or LDK another third party level editor but for a level this size it's actually easier to just use til Sprites like the platform we have here so I'm going to add in more objects like this one and then build out the level [Music] when I have an object in scene already that I want to copy I can just press control and drag it to create a new copy of that object and because I duplicated these objects instead of creating new ones from scratch they came with the platform Behavior already on them so I don't need to add that for every single one next I'll add a new kind of platform and I'll call this one [Music] bridge what's different about this one is I'm going to go to the behaviors and instead of it being a basic platform or ladder I'm going to select jump through platform so now this object if I preview the game can be walked through and jumped through whereas the other ones are solid and can't be jumped through so I can jump on the top of this one and use the down key to go down below it and now that we're building the level out a little more we're going to want to make the camera follow the player so we're going to go to the player object and add a new behavior and this time we'll look for the smooth camera behavior and we'll pick the one for the platformer character again there are a bunch of values in here that you can change but for now I'm going to just press apply and now in the game scene the camera smoothly follows the player around next we'll add one more kind of platform and this will be one that can move so we'll duplicate the bridge and we'll call this moving for platform moving and we'll change the image this one's dimensions are 32x 9 so we'll change this information and put it here into the game now in behaviors again we'll add a behavior for for rectangular movement and in this Behavior we have two settings for width and height so if we change the height to zero then it will be a straight line instead of a rectangle and we can change how long it takes in each Direction but for now we'll just press apply and so now if I go up to that platform you'll see it moving back and forth and stopping for 1 second on either side of its range and if the character jumps on the platform it'll move back and forth with it [Music] and there we go next we'll add some pickups to the game so the only 2D object with animations is a spray object so I'm going to create a new spray object and call it coin and then import those images in so I'll set it to Loop and press preview to see the speed of this animation and since it's a bit too fast I'm going to slow it down there we go and now with that done I can drag it into the scene and with control and the mouse I can create a bunch of copies and put them into the scene now the next thing we're going to do is go to the event sheet and create a new event and for this one we're going to add the condition for collision with the player and the coin so we're going to use the general object Collision of the player with the coin object so if the player runs into the coin we'll use the action delete and we'll select the coin so now if we take the player object and run it into the coin the coin will get deleted it's a really simple mechanic and now the next thing we're going to do is create an enemy for this character so the first thing I'll do is make a spot for that where we're going to use these walls to check for Collision to make the enemy walk back and forth so for this one I'm actually going to duplicate the player object because it has the platform of behavior and we've already set up the movement speed to make sense with this scale so instead of this idle animation we're going to add in one for the walking enemy we're going to select these images and delete them and then we have the enemies walk animation instead so to prevent the player from being able to control this we're going to go to the behavior and turn off default controls so now the arrow key in space won't affect this object and now I can put it into the scene before I preview the game though I need to take away its smooth camera Behavior because that will conflict with the player's smooth camera Behavior now if I preview the game you'll see that they fell down just like the player because they have the platformer object Behavior so now for the enemy I'm going to add a new event and use the condition horizontally flip because when the enemy runs into the ground in its path we're going to use an action to flip the character so it'll go in the other direction so we have one condition for is flipped and then we'll invert this one as the condition for not flipped so if the enemy is flipped we'll use the platform behaviors controls to simulate left key pressed so Movement platform Behavior platformer controls simulate left key pressed and then if it's not flipped we'll do the opposite we'll simulate the right key being pressed and then finally we'll go to the enemy object edit points so we're going to put a point on the object add the point and call it anything that we want to in this case I'm going to call it Checker and put it here in front of the character as long as it's in front of the character and it will collide with the wall so now that we have that point we can create a new event and check if the point is inside of an object and the object is going to be the platform Stone because that's what's on either side of the enemy and then we need the expression enemy so select the enemy first point x cuz this is the X position and this is the Y position along the grid and then we'll put in quotation marks and the autocomplete will show us the different points in that object and since all there is is Checker we can select that and there we go so this will check the exposition of that new point that we made on the enemy and then I can copy that down and change it to the Y Point instead so if that point is inside the stone we will set it to flip the object but now we need to do that again for the other direction so if the enemy is horizontally flipped and this point goes inside the stone platform inside this then we want to change it to the opposite so if it is flipped we're going to change it to no not be flipped and then if it's not flipped we'll use the flip horizontally action and set it to yes to flip so let's see that in action if we go over to the enemy we'll see it going back and forth way too fast but it's [Music] working there we go and now that we have an enemy that walks back and forth we need a way to die to it because otherwise it's not really a threat but a decoration so we'll go to the player object and include the animation for death we'll set the duration and this time we won't set it to Loop and then we'll go to the event sheet and create a new event and we can just copy this event from above where if the player is in collision with but change the coin to the enemy object we'll change the animation of the player based on its name to that death animation we just added and then we'll create a new event and check if the animation is that death animation check the animation by name select the player object and if it's equal to death [Music] then we'll use the action to deactivate the behavior of the player object and select the platformer object behavior and set it to no so now when the play's animation is equal to death we deactivate that behavior and then we'll change the scene to the current one to reset the scene so we'll use the action to change the scene and select the one that we're currently in but if we left it like this we wouldn't get to see the death animation play because it would set the animation making this condition true and then immediately afterwards resetting the scene so we'll use the action for wait X seconds and we'll make it wait 2 seconds before resetting the scene and to prevent this event from triggering multiple times we'll use the condition trigger once there we go now if I bring the player character over to the enemy and run into it we die and then 2 seconds later the scene resets now let's do the same thing if we fall off the screen so what we want to do here is set a boundary for the bottom of the screen and the quickest way to do that is to just add an object and place it at the bottom of the screen so we'll create a spray object call it boundary and then we'll create one with piscal piscal is the built-in image editing software in G develop that can be really handy for small tasks like this one so we'll use the bucket tool and fill it with red and then name the image boundary and then save and now we have Red Square as the image for this object now Place boundary into the scene and use it to Mark the bottom of the level then I'll add a condition to check the Y position of the player object so condition for y position of the player object if it is greater than because the Y AIS is inverted so if the player Falls beyond the boundary the number will actually be greater than the boundary's position so we use the boundaries y position and then we want this to happen for both of these so I'm going to use the or condition to check for either of these conditions so now if the player is in collision with an enemy or the Y position of the player is greater than the boundry we change the animation to death and then if the animation is death we reset the scene so now if the player goes below that there we go although we don't actually want to see the boundary or the player stopping in midair when they fall so we're going to set the camera to no longer go below that point and we're going to do that by adding an event and using the action enforce camera boundaries but since the only hard boundary is the bottom which is this value here we'll set this to boundary y position so the camera will stop at the top of the boundary then we'll use the player's position for the other values so for the left bound we'll use the player's Exposition minus 1,000 for the right bound we'll use the exposition plus 1,000 and then for the top boundary we'll use the player's y position minus 1,000 because again minus is up and pluses down so now the camera works properly in all directions except for down and it will stop where that boundary is hiding both the boundary and the player stopping in midair the next thing you probably want to do is add text to your game now with gev develop there are three different types of text objects the basic text object works well at higher resolutions with softer edges but when you're working with pixel art it render is blurry because of that same smoothing effect that makes it look nice at higher resolutions so if you're adding text to a pixel art game you want to use the bitmap text object and for this I've already created a bitmap font there are lots of tools out there to do this but I used snow be.org and once you get that you'll get two files one being the font file and the other being the atlas image and you can just add both of those in and then drag your text into the scene you can change the scale of that text in the object with the text scale option and now we can use this text for lots of things in game whether it be in-game tutorials or onscreen UI to tell you how many coins you've picked up so we'll set one of these to be the tutorial text and we'll put text into the game and then we'll duplicate that and make this the UI text so since the camera is zoomed in four times for the UI this is the actual size of the screen so for the UI score we'll need to change the scale to fit the size of the screen [Music] and then to make this stick as UI on screen we need to have it on a separate layer from the camera that's moving with the player so we'll open up the layers panel and add a new layer call it the UI layer and then in the properties panel set that text object to be on the UI layer so now all of this in game is on the base layer and the UI text is on the UI layer so so if you preview the game you'll see that this text is in the game on the base layer and this text is stuck to the screen on the UI layer and now we need to make that score text actually do something so we're going to make that count up as we pick up coins so I'm going to right click on the screen and go to scene properties and then go to edit scene variables from here I'm going to add a variable I'm going to set that variable to be a number number variable and call it score so now in the event sheet where the player runs into and picks up coins we're going to add an action to make that score variable go up by one each time we do so we're going to go change number variable for a scene variable pick that score variable that we just added and change the modifier to add and then one as has the value and press okay now when the player collides with the coin we delete that coin and add one to the score but on top of that we also want to change the text so we'll select the UI score bitmap text object select text to modify the text and then we'll set that text to be the score and then plus combines two things together and then we'll type in score for the variable so this is the variable score that we just set up so it's the text score plus the variable and press okay so now we'll pick up the coin delete the coin change the variable and then set the text to show that variable and there we go and now we want to animate the player there are a bunch of different conditions and actions related to the platform Behavior but it's faster to use the animator behavior for it so if we go to the player object and go to behaviors we can search animate and we can find the platformer character animator which is a behavior that flips the character and animates it as long as we follow the naming scheme in the behavior so now I'll add two more animations to the character [Music] one for jumping make sure to name that jump and then one for running and I'll set that one to Loop and then I'll press apply now when I walk around the anim changes to the Run animation and when I jump the animation changes to the jump animation now you might have noticed that the character goes behind these objects in scene and that's because every time you add an object to the scene in G develop it adds one to the next object's zv value so the higher your Z order is the further ahead in the scene you are compared to other objects in the scene so if I change this up and down you can see the character going behind and in front of the objects so if I just put that up to a higher number and then preview the game the character will no longer go behind those objects now the last thing to do is make the scene look a little prettier and then add sound effects so I'm going to add a series of tile sprayed objects to use as the background [Music] I'll set the zorder of these objects down to -10 just so they're definitely in the background and then I'm going to add sound effects to the game and all I need to do for that is use the action to play a sound so when the player collides with the coin object use the action play a sound and then I can choose a file or create one with jfx r jfx r is the sound creation tool built directly into G develop and it's really useful for little sound effects to put throughout your game but since the asset pack that we're using already comes with sound effects I'm going to just pick one of those then I can set the volume and the pitch now whenever I pick up a coin it plays a sound and then every game wants to have some music of course so at the beginning of the scene I'm going to set up music to play so I'm going to use the action play a music file on a channel and pick the music that's in this asset pack again setting the volume and the pitch as well as the channel identifier that lets you pick which channel music is being played on and of course we want the music to continue playing so I'm going to select repeat the sound now when the game starts we have [Music] music and sound effects that get played when that character interacts with things now from here you can make any number of changes to the game to make it your own whether you want to add new enemies or any number of more complicated mechanics the gdevelop YouTube channel is full of tutorials to help you do just that [Music] he