If we start developing our game, we’ll eventually need to create an entity that handles all of our assets. We’ll call it
ResourceManager. We’ll see how to create one that allows you to add images, fonts, and sounds to your games.
The main idea behind the resource manager is to cache assets that we’ll use more than once and to have a centralized and abstracted way to create assets.
In order to be able to define resources, we need to create a module that will be in charge of handling this. The main idea is that before calling a certain asset through
ResourceManager, it has to be defined in
ResourceDefinitions. In this way,
ResourceManager will always have access to some metadata it needs to create the ...