Code Super Mario in JS (Ep 11) - JSON Entity Spawning

In this episode we are learning how to refactor our code so that we can place entities in the level by defining them in the Level JSON. We also have two great bonuses; our main function will be refactored to use async/await and we will create a recursive generator for use in our tile pattern reuse. Since we are writing modern JS this code might not run on all browsers yet. I was running Chrome 61 when I wrote this and if you wish to follow I recommend you do too. Twitter: Source code with step-by-step commits: Music: Demoscene Time Machine
Back to Top