Moving objects on screen is a crucial part of any game. In this game development guide, we will learn how to control and move game objects in GDevelop.
Open source community is emerging with the passage of every minute. There are cross-platform games, mobile games, and desktop games. Various types of games include action games, adventure games, role-playing games, sports games, puzzle games, simulation games, and many more. Therefore, all these different game types have given an immense boost to traffic as users from all age groups tend to play these games.
Moreover, the pandemic has brought a massive change in the lifestyle of people living around the globe. People now have more time. All the offline activities have become online. Therefore, they tend to opt for online software to perform professional duties and video games in case of entertainment. Due to all these reasons, this industry has gained sustainability and the support of the users and developers. In the recent past, we wrote on topics such as HTML5 Game Development Tutorial For Video Game Programmers, How Global Gaming Industry Leveraging Open Source Software, and GDevelop Tutorial For Beginners To Start Game Development. In this game development tutorial, we will cover the following points.
Features Exploration Of GDevelop
Cross-platform: This game creation platform is multiplatform and it can be deployed on almost all popular operating systems such as macOS, Linux and Windows.
Exporting Options: GDevelop lets users export developed games with just one click for Android, IOS, and Web. Game owners can display video ads on their games and it can be possible with the support of AdMob.
Rich Game Objects: This open source game maker provides a wide range of game objects such as Sprites with animations, fire explosions, and other effects with the help of Particle Emitters. Formatted text, embedded videos, and draw custom shapes are available for bringing eye-catching effects into the games.
Versatile Behaviors: In this basic game development article, we will show you how we can add different behaviors to the game objects. There are multiple behaviors available that are ready to use and users can develop further as per requirements. It all happens in a matter of a few mouse clicks.
Advanced Interface: In this game design tutorial, we will see the user interface of this 3D game engine. Users can drag and drop various game elements and objects.
Working On A Game
This section of the game development tutorial elaborates the basic game development with GDevelop. Before going further, make sure you have installed GDevelop locally on your machine.
You can visit this tutorial GDevelop Tutorial For Beginners To Start Game Development to get the knowledge of setting up this game editor on localhost.
Now, open up the editor and create a new project. In this tutorial, we will create a folder on Google Drive for saving game files. Now click on the “CREATE A NEW PROJECT”, it will open up a new dialog box, select the “Empty game” option to start building a new game.
On the left hand side project menu bar, click “Save as” to save the game.
Firstly, let’s add a scene. For that, click on the “Scenes” option and rename it for example “first scene” in this tutorial shown in the image below.
After creating the scene, open it and add an object. For adding an object, click “Add a new object” appearing on the right-hand side panel. Eventually, it will open a new dialog box containing different assets. However, let’s select the object “Red Ship” hit “ADD TO THE GAME” and close the dialog box.
Next, you will see an object appearing on the left-hand side panel. Drag it to the main screen and hit the button appearing on the top left corner to launch the game. Hence, it will open the game into a new window as shown in the image below.
Till now, you cannot play with this object as there is no behavior added to it. So, let’s add a behavior to this object. For that, click on the Ship object and hit “Edit object”. It will open a new dialog box, navigate to the behaviors tab, select “Top-down movement” and hit “Apply”. Now, preview the game and you will see that you can move the Ship object on the screen using your keyboard arrow keys. Now, you will notice that the ship object goes off the screen. Therefore, to solve this issue let’s edit the object and navigate to the behaviors. Click “Add A Behavior To The Object”. Now, navigate to “Search New Behaviors” and look for “Stay on screen” behavior in the search bar as shown in the image below.
Next, select it and install it into the project, and hit apply. One more thing is to adjust the center point of the object. So, let’s go again to the object properties, and “Edit Points” appearing at the bottom. You will land on the following screen.
So, drag the mark appearing on the left top corner to the center of the object then close and apply. Now, if you relaunch the game, you will see the changes.
This is the end of this game development tutorial. Hopefully, this blog post would be helpful for the game developers. This tutorial made it possible for you to work with the game objects and adding behaviors. In the future, containerize.com will publish blog posts and tutorial articles on further open source video game design software. Therefore, please stay connected with this Game Development Software category at containerize.com for regular updates.