Learn how to create a platformer game using vanilla JavaScript.
了解如何使用香草JavaScript創建平臺游戲。
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.
本教程首先講授如何使用模型,視圖,控制器(MVC)策略和面向對象編程(OOP)的原理來組織代碼。 然后,它展示了如何對運動進行編程,繪制圖塊圖以及檢測碰撞。 最后,本教程將教您如何設置精靈的動畫,加載水平并收集物品。
After watching, you will be able to apply the same priciples to create a game of your own.
觀看后,您將可以應用相同的原理來創建自己的游戲。
You can watch the video on the the freeCodeCamp.org YouTube channel (3 hour watch).?
您可以在freeCodeCamp.org YouTube頻道上觀看視頻(觀看3小時)。?
翻譯自: https://www.freecodecamp.org/news/platformer-game-turorial-javascript/