Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

IO approach in engine/framework

$
0
0
Hi, During the journey of creating my 2nd 3D engine, I'm basing quite some of the approaches on the Game Engine Architecture book (Jason Gregory). I've now arrived on the topic: IO. In short, the target platforms for me are PC, XBone and PS4. With this main assumption I thought of the following logics/ guidelines to follow: - I can assume file/folder structures will work on all 3 platforms, when I use '/' as a folder separator -- I will define 1 global with the base folder for the application, the rest will 'inherit' from there (which can be anything, independent of the 'mount' or drive) -- for now I'll create 1 subfolder with data/files that might need write access, so later on I only have to worry about 1 subfolder (settings, configs etc.). - file extensions can be longer than 3 characters (in Linux based FreeBSD on PS4) - all class members functions needing to load a file, shouldn't have to now about the file structure of the logical application, so they will all take a full filename string including path (combining root + subfolder + filename and separators is then the responsibility of the caller/ calling code) - some functions will need to be passed a folder, because contents in that folder need to be read OR I can simply define a small list of defined subfolders (under root/ base), because it won't be more then 5 to 10 folders in total (data/shaders, data/textures, data/objects, data/sound etc.) My questions: - what do you think about this approach? - regarding the last point, which of the 2 options would you apply? -- option 2 might work fine but feels a bit 'static', not very flexible (on the other hand, would you actually need flexibility here?) Any input is appreciated, as always.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>