Memory-Mapped Assets For More Efficient Loading
What is “memory mapping”? A Problem Arises Let’s use a texture as an example. When you load a texture, the computer does more work than you might think at first: The program has to allocate the memory for the texture, ask the OS for the corresponding file, and then the OS has to find, read and store the file’s data in memory. That phrase is a mouthful. (In reality it’s more complex than this, but I’m trying to not confuse you any further) ...
Flexible File Loading in Game Engines
“Flexible”? How? Why Developers might want the assets in their game to not be available and readable like a file that you hop on the game’s directory and yank, so game engines commonly pack assets into larger, commonly encoded, files. There are more reasons for this, however. For instance, what do you think is faster: Loading 10,000 tiny loose files or Loading one big file with the same total size as the tiny loose ones? Loading the larger, packed file is faster. This is because most of the time spent on loading files comes from reading file metadata, and seeking the requested file. (Your system knows where its files are, but it still has to go get them!) ...
Priority Stack: Modding Made Simple
“Priority Stack”? What is a “Priority Stack”? Definition Priority Stack is probably a misleading name, but the PS (Priority Stack) is just an ordered array of directories in the VFS (Virtual File System). (This is the name I came up with, feel free to correct me/msg me about it on my email, since this concept wasn’t invented by me) The stack will typically look something like this: mods/cool-mod/ mods/even-cooler-mod/ mods/** base_game/ Why is this useful? And how does it even work? ...
Filesystem Abstraction in Game Engines
How would one even abstract a filesystem..? Why Before explaining how, allow me to explain why to implement an interface to abstract the filesystem. The most surface reason for this is: On a Windows filesystem, files are on a folder like so: C:\Users\You\Game\data; On a Linux filesystem, it would look more like: /home/you/game/data; On a PS Vita, (if I’m not mistaken) it looks like: app0:/data (app0 being the game’s package id); In a Browser (WASM for instance), they are in virtual memory. ...