Setting up the game area (2024)

In this first part, we're going to set up the game area. Let's get started byimporting the start assets and setting up the game scene.

We've prepared a Godot project with the 3D models and sounds we'll use for thistutorial, linked in the index page. If you haven't done so yet, you can downloadthe archive here: Squash the Creeps assets.

Once you downloaded it, extract the .zip archive on your computer. Open theGodot Project Manager and click the Import button.

Setting up the game area (1)

In the import popup, enter the full path to the freshly created directorysquash_the_creeps_start/. You can click the Browse button on the right toopen a file browser and navigate to the project.godot file the foldercontains.

Setting up the game area (2)

Click Import & Edit to open the project in the editor.

Setting up the game area (3)

A window notifying you that the project was generated by an older Godot version may appear.Click Convert Full Project to convert the project to your current Godot version.

Setting up the game area (4)

The start project contains an icon and two folders: art/ and fonts/.There, you will find the art assets and music we'll use in the game.

Setting up the game area (5)

There are two 3D models, player.glb and mob.glb, some materials thatbelong to these models, and a music track.

Setting up the playable area

We're going to create our main scene with a plain Node as its root. In theScene dock, click the Add Child Node button represented by a "+" icon in thetop-left and double-click on Node. Name the node Main. An alternate method to rename the node is to right-click on Node and choose Rename (or F2). Alternatively, to adda node to the scene, you can press Ctrl + A (Cmd + A on macOS).

Setting up the game area (6)

Save the scene as main.tscn by pressing Ctrl + S (Cmd + S on macOS).

We'll start by adding a floor that'll prevent the characters from falling. Tocreate static colliders like the floor, walls, or ceilings, you can use StaticBody3D nodes. They require CollisionShape3D child nodes todefine the collision area. With the Main node selected, add a StaticBody3Dnode, then a CollisionShape3D. Rename the StaticBody3D to Ground.

Setting up the game area (7)

Your scene tree should look like this

Setting up the game area (8)

A warning sign next to the CollisionShape3D appears because we haven't definedits shape. If you click the icon, a popup appears to give you more information.

Setting up the game area (9)

To create a shape, select the CollisionShape3D node, head to the Inspectorand click the <empty> field next to the Shape property. Create a new BoxShape3D.

Setting up the game area (10)

The box shape is perfect for flat ground and walls. Its thickness makes itreliable to block even fast-moving objects.

A box's wireframe appears in the viewport with three orange dots. You can clickand drag these to edit the shape's extents interactively. We can also preciselyset the size in the inspector. Click on the BoxShape3D to expand the resource.Set its Size to 60 on the X-axis, 2 for the Y-axis, and 60 forthe Z-axis.

Setting up the game area (11)

Collision shapes are invisible. We need to add a visual floor that goes alongwith it. Select the Ground node and add a MeshInstance3D as its child.

Setting up the game area (12)

In the Inspector, click on the field next to Mesh and create a BoxMeshresource to create a visible box.

Setting up the game area (13)

Once again, it's too small by default. Click the box icon to expand theresource and set its Size to 60, 2, and 60.

Setting up the game area (14)

You should see a wide grey slab that covers the grid and blue and red axes inthe viewport.

We're going to move the ground down so we can see the floor grid. To do this, the grid snapping feature can be used.Grid snapping can be activated 2 ways in the 3D editor.The first is by pressing the Use Snap button (or pressing the Y key).The second is by selecting a node, dragging a handle on the gizmo then holding Ctrl while still clicking to enable snapping as long as Ctrl is held.

Setting up the game area (15)

Start by setting snapping with your preferred method. Then move the Ground node using the Y-axis (the green arrow on the gizmo).

Setting up the game area (16)

Note

If you can't see the 3D object manipulator like on the image above, ensurethe Select Mode is active in the toolbar above the view.

Setting up the game area (17)

Move the ground down 1 meter, in order to have a visible editor grid. A label in the bottom-left corner of theviewport tells you how much you're translating the node.

Setting up the game area (18)

Note

Moving the Ground node down moves both children along with it.Ensure you move the Ground node, not the MeshInstance3D or theCollisionShape3D.

Ultimately, Ground's transform.position.y should be -1

Setting up the game area (19)

Let's add a directional light so our scene isn't all grey. Select the Mainnode and add a child node DirectionalLight3D.

Setting up the game area (20)

We need to move and rotate the DirectionalLight3D node.Move it up by clicking and dragging on the manipulator's green arrowand click and drag on the red arc to rotate it around the X-axis, until theground is lit.

In the Inspector, turn on Shadow -> Enabled by clicking the checkbox.

Setting up the game area (21)

At this point, your project should look like this.

Setting up the game area (22)

That's our starting point. In the next part, we will work on the player sceneand base movement.

Setting up the game area (2024)
Top Articles
T Download Tamil 2022 Latest HD Movies
Here's what to know about Seine River water quality during the Paris Olympics
Knoxville Tennessee White Pages
Best Pizza Novato
Methstreams Boxing Stream
What happened to Lori Petty? What is she doing today? Wiki
Boomerang Media Group: Quality Media Solutions
Beacon Schnider
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
25X11X10 Atv Tires Tractor Supply
Terraria Enchanting
Paketshops | PAKET.net
Visustella Battle Core
What Happened To Father Anthony Mary Ewtn
Strange World Showtimes Near Amc Braintree 10
Simon Montefiore artikelen kopen? Alle artikelen online
Vanessa West Tripod Jeffrey Dahmer
Bcbs Prefix List Phone Numbers
The Exorcist: Believer (2023) Showtimes
How to Watch the Fifty Shades Trilogy and Rom-Coms
20 Different Cat Sounds and What They Mean
Christina Steele And Nathaniel Hadley Novel
PowerXL Smokeless Grill- Elektrische Grill - Rookloos & geurloos grillplezier - met... | bol
Persona 5 Royal Fusion Calculator (Fusion list with guide)
Scout Shop Massapequa
Never Give Up Quotes to Keep You Going
The Old Way Showtimes Near Regency Theatres Granada Hills
Red Cedar Farms Goldendoodle
Red8 Data Entry Job
What Is The Lineup For Nascar Race Today
Globle Answer March 1 2023
Cb2 South Coast Plaza
Workshops - Canadian Dam Association (CDA-ACB)
How do you get noble pursuit?
Will there be a The Tower season 4? Latest news and speculation
Toonkor211
Alternatieven - Acteamo - WebCatalog
404-459-1280
Drabcoplex Fishing Lure
Poe Flameblast
Busch Gardens Wait Times
888-333-4026
Sun Tracker Pontoon Wiring Diagram
Cocorahs South Dakota
Yakini Q Sj Photos
Celsius Claims Agent
House For Sale On Trulia
El Patron Menu Bardstown Ky
Quest Diagnostics Mt Morris Appointment
Fallout 76 Fox Locations
303-615-0055
Ranking 134 college football teams after Week 1, from Georgia to Temple
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 5936

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.