It's good to think about what can affect what else, and also about speed vs memory trade-offs.
My preferred way is a simple text file inside my project folder, showing the structure of both the internal files, and since we are talking on the Löve forums, the save folder as well. For example:
Code: Select all
bin -- project folder
dat -- assets
gfx -- graphics, spritesheets, tile atlases... may be subdivided further
ani -- animation data, describing how one "object" would animate
sfx -- sound effects
bgm -- background music
fon -- fonts
sha -- shaders
vox -- voice tracks
map -- map data
mid -- midi sheets, also music
mod -- tracker modules, also music
...
src -- my own lua files, may be subdivided further
lib -- 3rd party stuff
-- name of lib creator
-- libname
main.lua
conf.lua
usr -- save folder
sav -- save files
ini -- config files (controls, etc...)
scr -- screenshots
log -- debug & error reporting
mod -- mods, zip files should be good enough :3
hst -- high score tables, if applicable
rpl -- replay files, not really video, just input over frames (deterministic that way)
vid -- recorded video, series of canvases exported to png; not a realtime thing, probably creatable from replay files though.
...
The above also makes sure that there are no similarly named paths between the two "root" directories Löve gives you access to.
My fetish for 3-letter directories notwithstanding, i find this
quite clean as it is, and it could be specialized more if need be.
As for those trade-offs that i mentioned, those usually come into the "foreground" when one's optimizing an already working codebase, though with experience, huge refactoring can, in most cases, be averted. Also, since lua is not a strongly typed language, my code's usually missing everything that has "class", "factory", "emitter", "builder", "generator", and similar, appended to them. In general, i don't really have a "great plan" of sorts when it comes to modules and interoperability between them; if it works, it works, cleaning can come later.