filmov
tv
Modular Upgrades Made Easy Using the Strategy Pattern

Показать описание
In this video we'll look at an application of the Strategy Pattern to game dev in Godot 4.
The Strategy Pattern is a programming pattern useful for switching how an algorithm works at runtime. We use it a little differently here to apply a variable set of upgrades to a projectile fired by the player. A very closely related term is "polymorphism" if you're familiar with that.
Project Link:
Resources:
Timestamps:
00:00 Intro
00:12 The Strategy Pattern
00:17 Simple list example
00:50 Number filter class
02:17 But why use it?
02:34 Applying upgrades
02:55 GitHub and project info
03:34 Godot time
03:51 Base upgrade class
04:19 Player upgrade usage
04:38 Upgrades as resources
05:10 Custom upgrade
05:59 Possibilty for extension
06:11 Semi-important announcement (You are free to leave)
The Strategy Pattern is a programming pattern useful for switching how an algorithm works at runtime. We use it a little differently here to apply a variable set of upgrades to a projectile fired by the player. A very closely related term is "polymorphism" if you're familiar with that.
Project Link:
Resources:
Timestamps:
00:00 Intro
00:12 The Strategy Pattern
00:17 Simple list example
00:50 Number filter class
02:17 But why use it?
02:34 Applying upgrades
02:55 GitHub and project info
03:34 Godot time
03:51 Base upgrade class
04:19 Player upgrade usage
04:38 Upgrades as resources
05:10 Custom upgrade
05:59 Possibilty for extension
06:11 Semi-important announcement (You are free to leave)
Modular Upgrades Made Easy Using the Strategy Pattern
A quick and easy pantry makeover!
New Matter Smart Switch Experience! Unboxing and Installing the SONOFF MINIR4M #sonoff#matter
Did you know you can do this?! 🤯 I love an ikea hack and I’m using @DixieBellePaint AD #ikeahack...
Super Simple Queen Bed Frame - DIY #bed #shorts
Soft close hinge | How to install | Easy installation #shorts
Thermoelectric Peltier Cooler Build & Freezing Water! #cool #engineering #experiment #electronic...
Closet makeover with IKEA AUDRAL system! We were looking for a budget solution for this storage
2025 Zetta City Module 1 – Russia's Smartest Urban EV:
Experience true opulence in your kitchen with our exquisite luxury kitchen sinks.
Take a tour of my updated desk setup and home office. #desksetup #homeoffice
Product Link in Comments ▶️ Nordic Rain Modern Waterfall Shower Set
Why prefab shower pans are awesome! #shorts #youtubeshorts #diy
The Best Sim Setup
How to install a window made easy! #diy #remodeling #carpentry #diyprojects
Easily Upgrade ALL Your Gear
Best TV Unit Design For Living Room 2022 | TV Cabinet Design Modern, TV Wall Panel #tvunitdesign2022
STYLE YOUR SPACE | Modern Wardrobe Ideas for Bedroom
Wireless Camera Module For Quadcopter Drone #spycamera #minicamera #shorts
The Best Way To Fix The Massive Problem With The LEGO Sanctum Santorum Modular... #shorts
Be Sure to Remember this Tip! How to Wire Up Ethernet Plugs the Easy Way #shorts #diy #tips #cable
I Built a $10K Shed For $1900
Bathroom Elegance Redefined Smart Bidet Toilet Upgrades for Cleaner Living #toilet #bathroom #shorts
Genius Foldable Boat (@masterfishes)
Комментарии