You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the client fetches all its ressources at the current path (.). Basically, it means that at this current path should reside folders like chipset and maps (for now).
It would be way better to tell the client, when run in standalone mode (no server needed), that the project root would be elsewhere than ..
It is told that the resources shall be fetched in the current directory. So we should parametrize this setting.
There is a drawback according to the current solution though: the ResourceProvider acts as a singleton class, and it is called by a lot of components – widgets, game, and so on.
Its project has to be set by the right component, and should not be modifiable by any other component. That is, it has to be constructed with the right component. At the moment, since it is a singleton instance, its construction is not handled by any of the game component.
Just to precise that the font "arial.ttf" is also concerned by this problem, thus it needs to be inside the current folder, might be good to see if we can load one default font from the system if we don't find it
Ok, documentation can be enough, or maybe just a little zip with the essential resources for the project to work ? I don't know if that should be versionned either :/
About the resource provider, considering it will always be necessary at a moment or another, why not instantiate it when we start the client ?
Currently, the client fetches all its ressources at the current path (
.
). Basically, it means that at this current path should reside folders likechipset
andmaps
(for now).It would be way better to tell the client, when run in standalone mode (no server needed), that the project root would be elsewhere than
.
.The current behaviour is explained here: https://github.com/dummymeuporg/dummyclient/blob/master/src/resource_provider.cpp
The
ResourceProvider
class is responsible for fetching resources.Here:
It is told that the resources shall be fetched in the current directory. So we should parametrize this setting.
There is a drawback according to the current solution though: the
ResourceProvider
acts as a singleton class, and it is called by a lot of components – widgets, game, and so on.Its project has to be set by the right component, and should not be modifiable by any other component. That is, it has to be constructed with the right component. At the moment, since it is a singleton instance, its construction is not handled by any of the game component.
What we want is something like:
I will be thinking about a new design soon. In between, if you have any ideas, shoot them up here.
The text was updated successfully, but these errors were encountered: