#javascript : Do you like games ? (part 2)
▻https://hackernoon.com/javascript-do-you-like-games-part-2-9d4141ca2493?source=rss----3a8144eab
On this topic: Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6Time to get started on the core components of the game engine. We should be able to render something on the #canvas before the end of this article!Note: please be aware that I’ll add links to specific pieces of code in the GIT repository history tree. This will make it easier for you to run the same code I did when describing a specific feature.We’ll start by working on the classes that have no dependencies like: Game, AssetLoader and EventDispatcher then progress onto others that might extend these.The Game class could:accept a Scene as an optional constructor argumentkeep a reference to all created sceneshave public methods for adding and removing scene(s)have a public loop() method which will trigger the update() method on all (...)