Tuesday, 19 February, 2019 UTC


Summary

This article is the second part of a Javascript game tutorial.Here you can read the first partLet's create the spaceshipNow that the background is finished, we can start setting up our space vehicle! Let's create a Player.js file and add it as a script to index.html.In essence, we want this ship to appear near the screen's left border. We also need its anchor (position of the object) in the center of the sprite, and we can rescale it because it is perhaps too large:class Player{ constructor() { …