Seu primeiro jogo 3D¶
In this step-by-step tutorial series, you will create your first complete 3D game with Godot. By the end of the series, you will have a simple yet finished project of your own like the animated gif below.
The game we'll code here is similar to Seu primeiro jogo 2D, with a twist: you can now jump and your goal is to squash the creeps. This way, you will both recognize patterns you learned in the previous tutorial and build upon them with new code and features.
You will learn to:
Work with 3D coordinates with a jumping mechanic.
Use kinematic bodies to move 3D characters and detect when and how they collide.
Use physics layers and a group to detect interactions with specific entities.
Code basic procedural gameplay by instancing monsters at regular time intervals.
Design a movement animation and change its speed at run-time.
Desenhar uma interface de usuário num jogo 3D.
Entre outras coisas.
This tutorial is for beginners who followed the complete getting started series. We'll start slow with detailed instructions and shorten them as we do similar steps. If you're an experienced programmer, you can browse the complete demo's source code here: Squash the Creep source code.
Você pode seguir esta série sem ter feito o 2D. Contudo, se você é novo no desenvolvimento de jogos, recomendamos que comece com o 2D. O código de jogo 3D é sempre mais complexo e a série 2D dará a você fundamentos para seguir adiante mais confortável.
We prepared some game assets so we can jump straight to the code. You can download them here: Squash the Creeps assets.
We will first work on a basic prototype for the player's movement. We will then add the monsters that we'll spawn randomly around the screen. After that, we'll implement the jump and squashing mechanic before refining the game with some nice animation. We'll wrap up with the score and the retry screen.