Advance your Code in Godot : Apply 3 Principles for any Project - Gdscript Tutorial @nanotechgamedev
Advance your Code in Godot : Apply 3 Principles for any Project - Gdscript Tutorial  @nanotechgamedev
Uploaded May 2024 | Updated November 2026, 3 hours ago
Through the development of my RTS project I have come around some structural issues that were quite hard to figure out as I couldn't brainstorm solutions working with Godot,

So on this video I am going to share how I applied 3 important principles that allowed my project to be built as I wanted. This is some groundwork to implement the AI in my project as I want AI behaviors to be controlled through attributes.

Github Page Link for Traits System: (Godot-Proposals nº6416)
github.com/godotengine/godot-proposals/issues/6416

This video would have helped me a lot when I first started to brainstorm solutions for my project, so if you are building a RTS or a game with unique objects like an RPG, and you are thinking how to have a system that allows to design units easily just by changing some options, I am going to show you how I did it for my RTS project,

What I am going to present here took quite a while to figure out and stablish having started from scratch, hopefully you won't have the same issues as I had,

The first principle is what I have talked a lot in other videos, modular scripts, because at the moment Godot doesn't allow multiple inheritance in gdscript with it's classes, and the project I am building needs a lot of specialized isolated code, it's a perfect candidate to creating re-usable modular script pieces, so I have developed a system using static scripts in order to work around that problem,

The second one is about creating attributes for objects, the need for attributes was evident as RTS have many different objects that share the same structure but are completely different, making it quite a challenge to structure in code, however, having considered them as attributes I could create a solution that allows me to combine or separate as many attributes as I want, in order to build objects with a combination of different behaviors, using attributes is the way to go about that.

The third one is how the those two first ones allows you to build the complex objects we need, with modular code the behaviors we want can be isolated functions stored and ready to be used at anytime anywhere in another script, through attributes we can select and combine the behaviors we want, which in turn will allow us to make the complex objects we want.

This isn't a beginner tutorial, so if you don't completely understand, don't be discouraged, this is something that took quite some time to figure out, but I believe that it will be very useful if you want to build real complex games with Godot,
Advance your Code in Godot : Apply 3 Principles for any Project - Gdscript TutorialRts in Godot Part 3 : Adding Camera Rotation and Zoom To an Rts Project In Godot from ScratchGodot RTS Formation Part 1 : Basic System - Formation Module in Godot 4RTS Fog of War done in Godot - Part 3 Final : Applying Fog of War to TerrainsHow to make RTS Selection System in Godot (Part 4) : Coding From Scratch - Making an RTS SeriesHow to make a basic house in Blender : Newbie 3D Lowpoly Beginner House TutorialRts in Godot Part 51 : New ECS Manufacture System for an Rts Project Made In Godot from ScratchRts in Godot Part 55 : Unit Selection Build Menu for an Rts Project Made In Godot from ScratchRts in Godot Part 9 : Targetting a Tree with Units for an Rts Project Made In Godot from Scratch
Nanotech Gamedev |

Advance your Code in Godot : Apply 3 Principles for any Project - Gdscript Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER