How do you handle unfound resources?
- by concept3d
For example your game expects a certain asset to be loaded what is the best way to handle it if the resource isn't found, for example:
Texture* grassTexture = LoadTexture("Grass.png");// returns NULL as texture is not found.
Mesh* car = LoadMesh("Car.obj");// returns NULL as 3d mesh is not found
What if for some reason the resource wasn't found e.g. deleted by user, misspelling while in development ?
Should I use Assertions (which is only useful while in development?
Exit the game gracefully ?
or even thrown an exception and try to handle it?
On a separate question, if I used a handle system instead of pointers (which I am already working on) I don't see how this would help me recover from unfound resources, Does a handle system help in situations like this?