Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:tutorials:platform-game:start [2018/09/02 01:45]
pserwylo [Change the background color] English phrasing
gdevelop5:tutorials:platform-game:start [2019/06/22 22:35] (current)
piyushpalawat99 [Put the object on the scene]
Line 4: Line 4:
 You will create a very simple platformer game where the player can jump on platforms and collect coins. You will create a very simple platformer game where the player can jump on platforms and collect coins.
  
-Note that you can read the [[gdevelop5:​getting_started|Getting Started]] page so as to get an overview of the software: ​It explains the main concepts and describes the interface of GDevelop. +Note that you can read the [[gdevelop5:​getting_started|Getting Started]] page to get an overview of the software: ​it explains the main concepts and describes the interface of GDevelop.
  
 ## Download GDevelop ## Download GDevelop
  
-If you do not have **GDevelop 5**, download it from the [official website](http://compilgames.net). It's available for Windows, macOS and Linux. ​  +If you do not have **GDevelop 5**, download it from the [official website](https://gdevelop-app.com). It's available for Windows, macOS and Linux.  ​ 
-Always download GDevelop from this page to be sure to have the latest version. ​  + 
-Install or extract GDevelop and launch it.+Always download GDevelop from this page to be sure to have the latest version. Install ​(or extractGDevelop and launch it. 
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_22.57.02.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_22.57.02.png?​nolink |}}
Line 19: Line 19:
 Click on `Create a new project` on the start page. In the window, choose a folder for your project and select `Empty project` to start a new game from scratch. Click on `Create a new project` on the start page. In the window, choose a folder for your project and select `Empty project` to start a new game from scratch.
  
-For making our game, we will need to have assets ​to use (the player character, a few platforms, items to collect...). ​ +{{ :​gdevelop5:​tutorials:​platform-game:​screenshot_20190604200258.png?​nolink |}} 
- You can download resources here: http://​www.compilgames.net/​dl/​PlatformerTutorialResources.zip.+ 
 +For making our game, we will need to have assets ​that we can use (the player character, a few platforms, items to collect...). You can download resources here: http://​www.compilgames.net/​dl/​PlatformerTutorialResources.zip.
  
 Once you have downloaded this file, extract its content in the folder where you created the project. Once you have downloaded this file, extract its content in the folder where you created the project.
Line 26: Line 27:
 ## Add a scene ## Add a scene
  
-Scenes are part of your game. Typically, each different screen of your game is a scene: the main menu, the pause menu and the levels are scenes.+Scenes are parts of your game. Typically, each different screen of your game is a scene: the main menu, the pause menu and the levels are scenes.
  
-Scenes ​contains ​objects, that are displayed on the screen. These objects can be put on the scene to create the levels (these objects are called "​instances"​). Scenes also contains ​the events that are run to animate the scene.+Scenes ​contain ​objects, that are displayed on the screen. These objects can be put on the scene to create the levels (these objects are called "​instances"​). Scenes also contain ​the events that are run to animate the scene.
  
 In the project manager that is opened on the left, click on the `+` button under "​Scenes":​ In the project manager that is opened on the left, click on the `+` button under "​Scenes":​
Line 54: Line 55:
 Click on `Sprite` in the list. The new object is added to the scene and the object editor is opened: Click on `Sprite` in the list. The new object is added to the scene and the object editor is opened:
  
-{{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.34.34.png?nolink |}}+{{ :​gdevelop5:​tutorials:​platform-game:​screenshot_20190604200645.png?nolink |}}
  
-The object is empty for now. Sprite objects are composed of animations, and each animations ​can contains ​one or more images. Let's add an animation! Click on the `+` button.+The object is empty for now. Sprite objects are composed of animations, and each animation ​can contain ​one or more images. Let's add an animation! Click on the `+` button.
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.35.50.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.35.50.png?​nolink |}}
Line 66: Line 67:
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.44.56.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.44.56.png?​nolink |}}
  
-You can now close the editor by clicking the Apply button in the bottom right corner.+You can now close the editor by clicking the "Apply" ​button in the bottom right corner.
  
 ## Put the object on the scene ## Put the object on the scene
  
-To have the player in our level, we must get the object and place it in to our scene. Each object we add to our scene is called an "​instance"​ of the object.+To display ​the player in our level, we place it in the scene. Each object we add to the scene is called an "​instance"​ of the object.
  
 Our player instance will be unique as we are going to have only one in our level, but other objects (like platforms, coins, enemies...) can have multiple instances living on the scene. Our player instance will be unique as we are going to have only one in our level, but other objects (like platforms, coins, enemies...) can have multiple instances living on the scene.
  
-To add the object, simply click on it in the listso that it is selected ​and displayed on a blue background:​ +To add the object ​to the scenesimply drag and drop the object from the list to the scene.
- +
-{{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.47.57.png?​nolink |}} +
- +
-You can then click anywhere on the scene to add the instance of this object:+
  
-{{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.48.05.png?nolink |}}+{{ :​gdevelop5:​tutorials:​platform-game:​add-player.gif?nolink |}}
  
 ## Give the object a proper name ## Give the object a proper name
Line 101: Line 98:
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.57.28.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.57.28.png?​nolink |}}
  
-Close the editor by clicking on the Apply button in the bottom right corner, and click on the object in the list to select it, and click on the scene to place it in to our level:+Close the editor by clicking on the "Apply" ​button in the bottom right corner. Click on the object in the list to select it, and click on the scene to place it in the level:
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.59.05.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-24_at_23.59.05.png?​nolink |}}
  
-The object is added to our scene but it is very tiny. Click on it and use the handles to resize so that is looks like a platform:+The object is added to our scene but it is very tiny. Click on it and use the handles to resize so that it looks like a platform:
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.00.01.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.00.01.png?​nolink |}}
  
-Also, don't forget to rename the object to be called GrassPlatform instead of the default.+Also, don't forget to rename the object to be called ​"GrassPlatform" ​instead of the default ​name.
  
 ### Time to save! ### Time to save!
  
-Let's not lose what we've done so far: in the application File menu, click on Save (or press Ctrl+S/​Cmd+S) to save your changes.+Let's not lose what we've done so far: in the application ​"File" ​menu, click on "Save" ​(or press Ctrl+S/​Cmd+S) to save your changes.
  
 ## Add behaviors to objects ## Add behaviors to objects
Line 119: Line 116:
 ### The player ### The player
  
-The movement of the player could be created using the events of GDevelop, but it would be a quite long and difficult task to recreate a good platformer engine. Luckily GDevelop already comes with a complete platformer engine built-in that we can use, In order to apply the engine ​we need to use the  "​platformer behaviors",​ which allow us to access and utilize ​the built-in platformer engine.+The movement of the player could be created using the events of GDevelop, but it would be a quite long and difficult task to recreate a good platformer engine. LuckilyGDevelop already comes with a complete platformer engine built-in that we can use. For this, we need to use the "​platformer behaviors",​ which allow us to access and use the built-in platformer engine.
  
-Open the Player object editor:+Open the "Player" ​object editor:
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.02.34.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.02.34.png?​nolink |}}
  
-Switch to the `Behaviors` tab and click on the `+` button to add a behavior to the object. Choose `Platformer character` in the list of available behaviors. ​ +Switch to the `Behaviors` tab and click on the `+` button to add a behavior to the object. Choose `Platformer character` in the list of available behaviors.
 You can then see the behavior in the editor, with a lot of parameters that you can tweak: You can then see the behavior in the editor, with a lot of parameters that you can tweak:
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.04.41.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.04.41.png?​nolink |}}
  
-You can change some properties like the jump speedSet it for example to 800 so that the jump is more powerful.+You can change some properties like the jump speedSet it for example to 800 so that the jump is more powerful.
  
 ### Platforms ### Platforms
  
-We also need to set objects to be platforms so the player can walk and jump on them, otherwise ​the player will fall through the object as we didn't tell to our character what to do when they land on it. By setting an object to be a platform ​we tell to the platformer character ​it is a platform that can be collide with and they can walk on it.+We also need to set objects to be platformsso the player can walk and jump on them. Otherwise, the player will fall through the object as we didn't tell to our character what to do when they land on it. By setting an object to be a platformthe platformer character ​will collide with it and be able to walk on it.
  
-To set the GrassPlatform object to be a platform, ​Open the GrassPlatform object editor, switch ​to the Behaviors tab, then add a behavior: this time, choose the `Platform` behavior.+To set the GrassPlatform object to be a platform, ​open the GrassPlatform object editor. Switch ​to the Behaviors tab, then add a behavior: this time, choose the `Platform` behavior.
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.09.42.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.09.42.png?​nolink |}}
  
-There are also a few options that you can change. ​The option "Can grab platform ledges"​ is to allow the platforrmer ​character to grab the edge of the platform. If we enable this option ​at the moment it is going to look strange as we don't have an animation ​yet to be displayed when the character grabs the edge.+There are also a few options that you can change. ​For example, the option "Can grab platform ledges"​ is there to allow the platformer ​character to grab the edge of the platform. If we enable this option ​right now, the result will look strange ​though, ​as we don't have an animation to be displayed when the character grabs the edge. Let's keep this unchecked.
  
 ## Start a preview ## Start a preview
  
-At this point, you should be able to test your game by pressing the Preview button at the top of the screen in the toolbar.+At this point, you should be able to test your game by pressing the "Preview" ​button at the top of the screen in the toolbar.
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.13.25.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.13.25.png?​nolink |}}
Line 150: Line 147:
 When you press the button, a preview is generated and just after, a new window is opened. When you press the button, a preview is generated and just after, a new window is opened.
  
-You should be able to walk and jump around using the default keysFeel free to add a few other platforms to the scene as we did before. Make sure you also add the behaviours ​to the platforms to avoid the character falling through.+You should be able to walk and jump around using the default keys: move the character with the arrow keys, and press `Shift` or `Space` to jump!  ​Feel free to add a few other platforms to the scene as we did before. Make sure you added the behaviors ​to the platformsto avoid the character falling through.
  
-You can move the character with the arrows keys, and press `Shift` or `Space` to jump! For now the object has no animations, we'll add some later.+For nowthe object has no animations, we'll add some later.
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.14.18.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.14.18.png?​nolink |}}
  
-If the object is not moving, be sure that you've added the proper behaviors. Be sure that you've added the Platform behavior to the Grass object, otherwise the player will fall outside the screen.+If the object is not moving, be sure that you've added the proper behaviors.
  
 ## Change the background color ## Change the background color
  
-The grey background is a bit boring. Later we can add an image, but for now let's keep things simple. In the editor, right click on the grey background and choose "Scene properties": ​+The grey background is a bit boring. Later we can add an image, but for nowlet's keep things simple. In the editor, right click on the grey background and choose "Scene properties": ​
  
 {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.16.03.png?​nolink |}} {{ :​gdevelop5:​tutorials:​platform-game:​screen_shot_2017-09-25_at_00.16.03.png?​nolink |}}