Will the course cover undo Function?

Thank you for this really amazing perfect course, well-orginized focusing on clean code, giving as much explaining and a variety of ways to handle situations and keeping in mind that this game should be scalable and expandable, all these make it the best course I have ever enrolled in
I am just wondering if we will handle undo Functions in this course because I think they are crucial to strategy (puzzle) games like this one, is this approach best handeled using The Command pattern, or what is your thought about it, I haven’t finished the course yet but I think that this was the suitable place to add this function and I can’t see it there so I guess it’s not covered here, Could you add this to the course or to a separate youtube video , That would very great and thanks for the great effort

1 Like

That is certainly possible but not something covered in the course.

For simple actions it’s pretty easy, for a move action just move back to where it started the action.
For other actions, like Shoot, it becomes quite a bit more complex. If an enemy dies you need to handle reviving that enemy, re-setting it’s health, etc.

So it’s not an easy task but it’s certainly doable, something like the Command pattern could be good but again it becomes quite a bit more complex since the action impacts external things (like the shot unit)

3 Likes

Thanks for answering
yeah exactly we need to keep track of every action taken to be able to undo it .
Looking forward to try it at out

I have to disagree with the notion that an undo function would be crucial to any game. As a player, I feel that it takes away from the challenge, and feels cheaty. For instance, the Forza Motorsport series on Xbox has a “rewind” feature, very similar to an undo function, that I always turn off. It always infuriated me when I would forget and accidentally hit the button for it with a clumsy finger. So, personally, even though it’s definately doable, as it has been done before, I don’t feel it’s worth the time. Just my two cents. I guess a better point would be to know your player base, and what they want in a game. At least in Forza I had the option to turn it off.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms