logo
Videos
Back to Videos
generalID: WhuyrNGOasQ

The Secret of OOP: What is a Class and How Does It Save Your Project from Chaos? | Episode 7

Views

303

Duration

09:14

Published on

1/10/2026

In this seventh episode of the Godot 4 game programming course, we transition to one of the most important advanced programming concepts: "Object-Oriented Programming" (OOP). Today, we learn how to use the magical class_name keyword to give our scripts an identity, allowing the engine to distinguish between different object types like enemies, trees, and players. The video explains the concept of "Inheritance" and how to build a base class containing shared attributes (like health and death) to be inherited by other characters, saving you from rewriting code hundreds of times. We also cover using "Resources" to professionally organize inventory and weapon data, along with a crucial warning about "Circular Dependency" that can crash your game. This lesson is your key to transforming your project from scattered files into an organized, scalable system similar to those used in major game studios.

OSTA

Teaching Game Development

Building the future of games, one line of code at a time.

Subscribe to the Channel

Related Videos

The Right Way to Program Enemies and Spawners in Godot 4 | Episode 3

The Right Way to Program Enemies and Spawners in Godot 4 | Episode 3

Osta Logo

© 2026 Osta. All rights reserved © OSTA