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
If we ever want to be able to distribute our game, we can't go opening or writing files at random locations. Windows, Linux and Mac have different conventions about where files are supposed to be, and none of them allow writing to the directory where the executable lives.
So I would like to replace all direct calls to fopen etc to calls through PhysFs, which should manage these things for us.
I also think we should put all those calls behind an anti-corruption-layer of our own (engine.h), in case we ever need to move away from PhysFs. It sounds a bit like gold-plating (it kinda violates YAGNI and KISS), but File_Exists and a few others are already there, and it was a huge help to have this layer when moving from Grim to SDL. I might reconsider this if it's too much work, though. :)
The text was updated successfully, but these errors were encountered:
I wouldn't necessarily enforce an extra API layer for file I/O, even when we can do it without a run-time overhead. But anything that makes the program more modular is welcome at this point. :)
If we ever want to be able to distribute our game, we can't go opening or writing files at random locations. Windows, Linux and Mac have different conventions about where files are supposed to be, and none of them allow writing to the directory where the executable lives.
So I would like to replace all direct calls to fopen etc to calls through PhysFs, which should manage these things for us.
I also think we should put all those calls behind an anti-corruption-layer of our own (engine.h), in case we ever need to move away from PhysFs. It sounds a bit like gold-plating (it kinda violates YAGNI and KISS), but File_Exists and a few others are already there, and it was a huge help to have this layer when moving from Grim to SDL. I might reconsider this if it's too much work, though. :)
The text was updated successfully, but these errors were encountered: