Комментарии:
pks make more design pattern tutorials.
ОтветитьThis is pretty retarded. Normally, an undo-redo systems simply uses two stacks. One for undo, one for redo. What are you messing about for with that convoluted single list? 🙄😂😢
ОтветитьI've watched the observer pattern video dozens of times and have fully integrated the pattern into my own project. Although I understand not wanting to deviate from a 'pure' command pattern, I think it would be far more useful to show the command pattern together with the observer pattern. I won't have any trouble converting it over when I'm implementing it myself, but people new to observer might have trouble. Perhaps you could make a new video, something along the lines of 'Integrating observer and command patterns', which could cover this topic.
ОтветитьI never though about using object pooling for the commands! what an intelligent idea
Ответитьso well explained
ОтветитьI wanna see something about S.O.L.I.D, That would be interesting to see you cover this.
ОтветитьI think adding the undo command to the list is better done after execute. If execute fails, and you want to run the undo, the last one failed, and the undo will fail.
Ответитьthis channel is really awesome. Thanks for another great video!
ОтветитьGood tutorial. I would like to mention, that I prefer to use Stack in such case. More flexible and code looks more elegant. Thx for sharing such great explanation of this pattern.
ОтветитьI guess, we can use two stacks for undo and redo
ОтветитьWhy doesn't this guy have more subscribers? Goldmine, thanks
ОтветитьI can see this being used in tutorials for any game, where you want to progress through particular moves and allow the player to go back to a previous step.
Would this be overkill for that or is this exactly what you'd use?
Love your style of teaching, you earned my sub, sir! You mentioned behaviour trees in the state pattern video and I'd be delighted if you made a video about that topic.
Ответитьsuch a nice and clean tutorial
ОтветитьTy for your work! :)
ОтветитьIm still cant understand the difference between this one to memento undo redo
Ответитьthanks for sharing your knowledge! +1 sub, greetings from Bolivia
Ответитьthanks, great video
ОтветитьHey, thank you for your tutorials. Do you think it would be possible to make a tutorial on aligning an moving object with uneven terrain, especially its rotation? For example if my cube goes up a slope it should rotate to match the slope angle. Its the rotation part to align it with the terrain that I don´t understand how to do in bolt. That would be such a great help and there are no other bolt tutorials that tackle that topic.
Ответитьgreat video, clear and well explained.
In general though I would personal favour a "stack" instead of a list as by design you can push and pop the commands onto the undo redo stacks and avoid having to maintain indexes etc. Also while I 100% agree on encapsulating a commandhandler/manager It is still ill advised to expose that implementation detail out of the character. If a character can undo/redo his movement it shouldn't matter how that happens, if it is delegating or not, so to avoid Law of Demeter violations I would keep the Undo/Redo calls on the Character and internally delegate them to my handler `public void Undo => commands.Undo() ` etc.
I would have created a new list for redos that got cleared if you enter a new command. Undo removes a command from the list and adds it to the redo list. Redoing removes it from the redo list and puts it back into the main command list.
ОтветитьIs there another pattern you'd like to see covered? Which one?
Ответить