A term you might hear amongst programmers is "reactive programming" (AKA rx programming), which is a bit different than being shown in this video. In reactive programming, we _react_ to state changes and typically do a series of transformations. It's kind of like combining functional programming with the observer pattern. While reactive programming is great, I wanted to focus exclusively on the idea of observing basic state as if the state were a lifecycle of its own, rather than something to be transformed and consumed. In other words, this video is about _observing_ the lifetime of a given state, rather than reacting and transforming a given state. Another term you'll hear is event-driven programming. In fact, some will say that the observer pattern _is_ the essence of event-driving programming. While listening to events is a part of observing state changes, it doesn't capture _initial_ state, which is a key element in the pattern IMO.
This Observer pattern really reminds me of ECS (Entity Component System) with how a system loops through the desired Components (tagged instances for the Observer) and then can change them while still having access to the current state unlike Events. Is this in any way connected, or just a coincidence?
Nice educational video! I use observe pattern in my own game for cooking, if this video was around when I was coding it, it would’ve been a great resource for that, love the content.
Thanks. I've used all of these methods before but I haven't necessarily had the technical language to communicate it to others so I really apricate this type of content!
around 12:20 what is the purpose of calling clean in another thread when its already in its own thread and there is nothing else after the if statement in the function body?
Depends on the use-case. The task library is essentially an abstraction layer on-top of coroutines. Using raw coroutines are useful if you specifically need them for coroutine-specific tasks (e.g. creating a generator function). If you just need to spawn a "background" task of some sort, using task library is preferred.
A term you might hear amongst programmers is "reactive programming" (AKA rx programming), which is a bit different than being shown in this video. In reactive programming, we _react_ to state changes and typically do a series of transformations. It's kind of like combining functional programming with the observer pattern.
While reactive programming is great, I wanted to focus exclusively on the idea of observing basic state as if the state were a lifecycle of its own, rather than something to be transformed and consumed. In other words, this video is about _observing_ the lifetime of a given state, rather than reacting and transforming a given state.
Another term you'll hear is event-driven programming. In fact, some will say that the observer pattern _is_ the essence of event-driving programming. While listening to events is a part of observing state changes, it doesn't capture _initial_ state, which is a key element in the pattern IMO.
This Observer pattern really reminds me of ECS (Entity Component System) with how a system loops through the desired Components (tagged instances for the Observer) and then can change them while still having access to the current state unlike Events. Is this in any way connected, or just a coincidence?
the legend returns
It's the first time I see someone talking about desing patterns in Roblox. That's awesome!!!
I love these videos. I love to learn about other programmers’ wisdom.
Nice educational video!
I use observe pattern in my own game for cooking, if this video was around when I was coding it, it would’ve been a great resource for that, love the content.
Thanks. I've used all of these methods before but I haven't necessarily had the technical language to communicate it to others so I really apricate this type of content!
love to watch this kind of videos,always learn smth new about scripting!🔥🔥
I really like ur last 2 videos and the Aerotopia devlogs.
around 12:20 what is the purpose of calling clean in another thread when its already in its own thread and there is nothing else after the if statement in the function body?
Hey can you make tutorials about funky lua-u stuff?
How long have you been programming and how did you start?
His first roblox scripting video was 14 years ago, so I assume a while.
task.spawn or coroutines for threads?
Depends on the use-case. The task library is essentially an abstraction layer on-top of coroutines. Using raw coroutines are useful if you specifically need them for coroutine-specific tasks (e.g. creating a generator function). If you just need to spawn a "background" task of some sort, using task library is preferred.
Use Actors :)