A definition of a game sound, which is a viewable, contains a path to the sound file.
However, the game logic needs no such information.
It may need, however, to know the duration of the sound, to know after how long to delete the entity containing the corresponding sound existence component.
The distinction comes here:
- A viewable may contain a path to the resource file.
- A logical viewable may contain something like the duration in seconds, or width and height in pixels.
One may be tempted to think of logical viewables as of another case of inferred cache.
That is not quite the case, because logical viewables might be serialized to the disk so that an intercosm is guaranteed to play correctly, regardless if some viewables change on the disk.
For example, someone may replace an image or a sound on the disk, effectively giving it different dimensions or duration, but, as we have saved the original value of logical viewables,
we may still use them, keeping the behaviour of the simulation identical, despite the viewables now looking different.
Thus, logical viewables are indeed inferred, but they are not caches.