Refactoring input was a great lecture

Since the start of the course I had been cringing at each occasion in which we used direct input references, but following as I had seen it would be refactored later. I still thought it was strange to not do it “proper” from the start.

Now I can say: THANKS. This lesson taught me how to go about refactoring something like that in an easy and tidy manner, whereas before I would have just panicked and considered a similar refactoring as something huge, complicated, and nightmarish, with a huge potential for mass failure.
This is going to be a huge skill, probably more important than anything else the course taught so far (and man, did it teach me a LOT. It’s mindblowing.)

5 Likes

It’s also important to keep in mind that many of these courses are designed for a complete beginner, so they will teach a simple topic, then make it more complex later on.

You’ll probably find that there are many things that are done in the courses that don’t make as much sense to a professional or an advanced programmer, but the course needs to be accessible to as many people as possible without leaving the beginners behind.

3 Likes

I’m glad you enjoyed it!
Definitely don’t be afraid of refactoring, it is a natural part of development and an extremely important skill.
Believe me I did a ton of refactoring as I was planning and building this course, what you see in the final video lectures is after all that refactoring which is why the code is so clean.

4 Likes

I came here to post pretty much what ianiancilla said.

My first instinct would have been to add the new Input System first and work through it, but refactoring this way, ensuring things still work, and then swapping over is a much better solution.

One of the many excellent lessons in this course.

A number of the concepts in this course such as events, generics and interfaces are not the first thing I consider when making a game, I initially just want to make cool things happen. I can see how you should freely code to your own level initially as long as you are aware that at some stage you should review your architectures and improve the product. And by doing that improvement maybe the next project includes more of it up front.

Rather than stifle the creativity just get that prototype humming to the best of your ability and then refactor.

Another great lesson.

1 Like

Privacy & Terms