Introduction
This article demonstrates how to build a 3D city race game in the native platform “GDevelop” software. GDevelop is a free and open-source, cross-platform 2D game development engine specially designed for gamers and used by everyone, with no programming knowledge required. You can develop all kinds of games, For example, platformers, puzzles, bullet shooter games, 3D View Game. GDevelop is general-purpose and the game engine is powerful enough for all 2D game engines.
Prerequisites
“Gdevelop” Software Environment upgrade version 5 (Free).
Exercise 1
Click on -> File, open New Folder and then you will see,
Overview
In this article, the concept is based on how to build a 3D city race game.
After condition choose platform and click on -> HTML5(Android and web games) platform
Click -> Open Empty Project, Create a new empty project.
Scene Conditions
After opening a new project, an empty scene condition will be displayed. After that, a new event sheet must be added.
Inserting car object
Now let’s take a look at adding a car object, for that double click -> in scene window and select -> insert a new object in the dialog box. Now, we can select and add a car object. For adding the Sprite object, double click -> in the scene window and insert a new object dialog box. Now, we can select the Sprite object.
Inserting Voiture object
For adding the voiture object, double click->in the scene window and insert a new object dialog box and now we can select the voiture object.
Inserting all Objects
Here is how the object editor will look when this 3D city race below is complete. Given the below preview, you will want some more objects, Now we can right-click on the object, which appears in the dialog box. You can change the object view,
Right Click on the Window Stage -> Insert new object -> Route object,
- Route object
- etincelle
- fumee object
- frein object
- ok, Done.
List Of 3D Objects
We need to change Object Editor conditions,
- Mur 3D object
- Skycraper object
- shop 3D object
- Smoke object
- Sparks object
- Background object
- Ok ,Done.
Now, you want to make 3D object scene conditions. It's easy to identify the object, just give the object a rename using the default object name.
Insert a new object by clicking on the plus button in the Objects list. Now you can choose the background object in the scene window, the dialog box will appear as the type of object and you can now select it.
Inserting Group Extensions Object
Now, add the 3D group extensions object to the scene object editor. You can drag and drop the object from the list to the scene window,
- Voitures
- Batiment
- ok,Done.
Complete Scene window
Now, we can see the 3D race city, all Objects, and the Scene Condition is Completed. Click on New Scene -> Events, and create one on the Event Sheet Conditions.
Events Conditions
We are going to create the events used to shape how the whole game will perform. First, the car must be turned toward the player mouse.
Move to the event layout editor Conditions, by clicking on the events condition.
- Right key is pressed->Do +130*TempsFrame() to the direction of voiture
- d key is pressed -> Do +130*TempsFrame() to the direction of voitur2
- left key is pressed -> Do -130*TempsFrame() to the direction of voitur2
- Up key is pressed -> Variable acceleration of volture is<700
- OK, Done.
You must follow the below conditions:
- Variable acceleration of voiture is>300
- Down key is pressed
- The timer "Tracefrein" is greater than 0.5 seconds
-> Create object frein at position voiture.X(route1);voiture.Y(Route1)
-> Create object frein at position voiture.X(route2);voiture.Y(Route2)
-> Do = voiture.direc() to the direction of frein
-> Do =1 to z-order of frein.
Move the cars according to their accelerations:
- Add to the voitures a force, angle: voitures.Direc() degrees and length: voitures.variable(acceleration) pixels.
- Do -10*TimeDelta() to variable acceleration of voitures
- Move voiture away of voiture2 (only voiture will move)
- Move voiture2 away of voiture (only voiture2 will move)
- OK, done.
Now, the output can be displayed.
Finally, your project can run, Click on -> you can see below template
Preview of 3D City Race:
Summary
I hope you understood how to build a 3D city race in GDevelop Software.