Introduction
This article demonstrates how to build the CastleDoodle game in the HTML5 Platform “GDevelop” Software. Games exported with GDevelop are based on a native and HTML5 platform, and it's a cross-platform game creator.
Prerequisites
“Gdevelop” Software Environment version 4.0 (Free).
Exercise 1. Click on -> File, open a New Folder, then you will see.
Exercise 2. Click Project -> New, Select -> HTML 5 Platform.
Open -> Empty Project and then create the new project. We can see this in the following template
Step 1. Now, to open a new scene, we need to open and set the following conditions.
Default set conditions,
- Scene
- Events
Right-hand side, Object editor.
Click on the -> object bar and then Open -> Add an Object.
Events -> how to object performs construct event conditions, given below.
Insert Player Object
Open scene condition, Right-click on -> window stage,
A dialog box will appear and then, select -> insert a new object.
Click on -> Sprite -> insert object,
Open the object type window and select ->(hero) Player Object. After Click->Ok
Below are all the steps to this game.
Animation Object Editor
Now object editor is added to the animation, but still, no animation images appear. should add a player object image,
Drag an image from the image bank to the area below to add it to the animation. You can add and modify resources using the Animation Editor.
Insert Bat Enemy Object
Again, Open scene condition, Right-click on -> window stage
A dialog box will appear and then, select -> insert a new object
Click on-> Tiled background object -> insert object
Open object type window, Selec t-> (Bat) Enemy Object. After Click -> Ok
Insert Text Object
In the current situation, let’s take a look and explain the inserted text object property. It is being changed when we insert it in the scene condition. Right-click on the text object and a property window will appear. We can change the conditions as per our needs predefined by default, such as text Condition( To Be Continued) and radius. Click -> OK.
Insert AdMob Banner Object
The insertion of the ADMob Banner Object can be done by adding the object from our own PC with the desired image, for that right-click -> on the scene editor and select -> insert a new object to make it easy to refer your each object. You can change the object name using the object editor. Right-click on the object and choose to rename it.
List Of Object Editors
Project preview on the below template,
- Solid Platform object
- Camera object
- Background Object
- Bat enemy object
- Bat Creator
- Player health heart object
- Level panel
Then, add to group extensions.
Event Conditions
For that, switch -> event tab -> add an event -> new scene condition window -> events here the event is represented as a sub-event.
Must follow the below conditions.
- Link to Game Engine,
- Player is in collision with LevelEnd -> Do =1 to variable LoadTheNextLevel1
- Variable LoadTheNextLevel -> Do=0 to variable LoadTheNextLevel2
- Create objects from the external layout"Level" + ToString(variable(Current Level)).
- Ok, done.
Enemy Events
Create object Bat at position BatCreator.X(); BatCreator.y().
- Do =Bat. X() to the X position of the path of the Bat Object
- Do =Bat. Y() to the Y position of the path of the Bat object
- Do =2 to z-order of Enemy
- Ok, done.
Move the Camera Event Conditions
- Do =player.X() to the "x" position of camera
- Do =player. Y()-100 to the "y" position of the camera.
- Hide the object level end. Ok, done.
The output can be displayed.
Finally, run your project. Click on -> Preview to create a CastleDoodle Game.
Conclusion
I hope you understood this article. We have created a CastleDoodle Game using GDevelop IDE. Thanks for reading, and have a nice day.