This tutorial starts with teaching how to organize the code using the Model, View, Controller (MVC) strategy and the principles of Object Oriented Programming (OOP). Then, it shows how to program movement, draw a tile map, and detect collision. Finally, the tutorial teaches how to animate the sprites, load levels, and collect items.
After watching, you will be able to apply the same priciples to create a game of your own.
You can watch the video below, or on the the freeCodeCamp.org YouTube channel (3 hour watch).