Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Godot 4 Space Shooter Class #11: Health, Temporary Invincibility, and Game Over”.
Other ways we can help with Godot.
Learn with a mentor
Scheduled Game Development courses with live guidance and a certificate.

Course/Training Unreal Engine — Procedural Animation for Humans in Unreal Engine 5
★ 5.0 (60)

Course/Training Unity — Learn to Code by Making a 2D Platformer in Unity & C#
★ 5.0 (10)

Course/Training Construct 2 — Creating a Top-Down Shooter Game in HTML5
★ 5.0 (10)
Have it built for you
No time to learn Godot? Our team can do the project for you.

Development Service: Unity — Building a Battle Royale RPG Game Using Unity and Blender Ultimate Class
★ 5.0 (26)

Unity Development Services — Become a Unity Game Developer Learning Paths
★ 5.0 (12)

Development Service: Unreal Engine — Unreal Engine 4 – Build Your First Game with UE4!!
★ 5.0 (12)
Get notified about new Godot classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
In this episode, the ship has three lives. When hit by an enemy, the ship blinks and becomes invulnerable for a moment. When lives run out, the text 'Game Over' appears, and the Enter key starts a new game. Hello, welcome to episode 11. A challenging game must be beatable. We add lives, a blinking effect with twin, and a game over screen.
Open hood.tscn. Add a life label in the top right with the text 'Lives: 3', as well as a game over label in the center of the screen with the text 'Game Over' and a hint to play again. The game over label is hidden by disabling the visible property. Hood.g is added with functions to show lives and show game over. Open player.gd Add a 'hit' signal and an invulnerable flag. When an enemy enters and the player is not invulnerable, the enemy is destroyed, the signal is emitted, then twin makes the ship blink six times before invulnerability is disabled again. Open main.gede. Add the variable 'lives: 3' and finish. Connect the 'hit' signal, lives decrease, and hood is updated. If lives run out, call game over. The game over function stops the enemy timer, hides the player, and displays the 'Game Over' text. In the _process function, if finished and Enter is pressed, the scene is reloaded with a cool reload effect. Save and press F5. Let enemies hit the ship, lives decrease until game over, then press Enter to play again. Want to be able to make your own game?
Cerdas Inovasi Digital offers game development courses with Godot, Construct 3, and Unreal Engine
Game education and promotion game development services for schools and businesses, as well as selling this tutorial project file complete with its assets.
Want to master all of this series? From a blank project to exporting the game as a Windows application?
All 14 episodes, complete with step-by-step PDF guides,
are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy the single class with lifetime access. Subscribe now on the premium page at cerdasinovasidigital.com.
Contact our WhatsApp, or visit cerdasinovasidigital.com.
Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →