Build a City Race 3D Game using GDevelop

In this article, you will learn about how to build a City Race 3D Game using GDevelop.

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.
 
City Race 3D Game Build Using gdevelop
 
After condition choose platform and click on -> HTML5(Android and web games) platform
 
Click -> Open Empty Project, Create a new empty project.
 
City Race 3D Game Build Using gdevelop
 
Scene Conditions
 
After opening a new project, an empty scene condition will be displayed. After that, a new event sheet must be added.
 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 

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.
 
City Race 3D Game Build Using gdevelop
City Race 3D Game Build Using gdevelop 
City Race 3D Game Build Using gdevelop
 

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.
 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 

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, 
  1. Route object
  2. etincelle
  3. fumee object
  4. frein object
  5. ok, Done.
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 

List Of 3D Objects

 
We need to change Object Editor conditions,
  1. Mur 3D object
  2. Skycraper object
  3. shop 3D object
  4. Smoke object
  5. Sparks object
  6. Background object
  7. 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.
 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 

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.
 
City Race 3D Game Build Using gdevelop
 

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,
  1. Voitures
  2. Batiment
  3. ok,Done.
City Race 3D Game Build Using gdevelop
 

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.
 
City Race 3D Game Build Using gdevelop 
 

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.
  1. Right key is pressed->Do +130*TempsFrame() to the direction of voiture
  2. d key is pressed -> Do +130*TempsFrame() to the direction of voitur2
  3. left key is pressed -> Do -130*TempsFrame() to the direction of voitur2
  4. Up key is pressed -> Variable acceleration of volture is<700
  5. OK, Done.
City Race 3D Game Build Using gdevelop
 
You must follow the below conditions:
  1. Variable acceleration of voiture is>300
  2. Down key is pressed
  3. 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.
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 
Move the cars according to their accelerations:
  1. Add to the voitures a force, angle: voitures.Direc() degrees and length: voitures.variable(acceleration) pixels.
  2. Do -10*TimeDelta() to variable acceleration of voitures
  3. Move voiture away of voiture2 (only voiture will move)
  4. Move voiture2 away of voiture (only voiture2 will move)
  5. OK, done.
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 
Now, the output can be displayed.
 
Finally, your project can run, Click on -> you can see below template
 
Preview of 3D City Race:
 
City Race 3D Game Build Using gdevelop
 
City Race 3D Game Build Using gdevelop
 

Summary

 
I hope you understood how to build a 3D city race in GDevelop Software.