tldr;
How about we recommend this API:
.image(file_path) -> pygame.Surface
.image('images/bla.png'), note no os.path.join needed.
.sound(file_path) -> pygame.Sound
.font(file_path) -> pygame.Font
.music(file_path) -> calls music.load() on the file.
We have these available, but don't recommend:
.get_file(file_path) -> open file
.find_data_dir() -> folder for 'data'.
.find_file(file_path) -> finds the full path to the file.
Something for later:
.preload(images, sounds, fonts, music) preloads files perhaps over network or perhaps multi core, or just into a cache.
I think this API is simple, and it's possible to do a fairly good implementation and a very quick easy implementation in time for pyweek.
Perhaps we can have a namespace package pygame.resources, released on pypi as pygame_resources. Or maybe include it in a 'skellington' package? If so, what should that package be called?
----
Ok, I am happy to avoid pkg_resources. Does it give us anything at all?
Here's the pyglet approach to resources loading. Note there's also a config interface, for user game options. Something that everyone eventually writes. I think these are all good, but out of scope for now.
http://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/api/pyglet/pyglet.resource.html
Note: for network connections I think gamejs (a JS lib that is fairly close to the pygame API) shows a fairly nice way to do it. You can have a preload('bla.png', 'yes.png') call to tell it to immediately go off and load images. (This API could also let us easily implement a)
It's common for people to have their resources libraries make resources.load('bla.png') return the same Surface, by storing a weak reference to it in a cache. An advanced implementation could do this I think.
I don't have benchmark numbers for you, but it definitely is faster to load one file than 100. Way less seeks (on media like SD cards, and magnetic disks this is more important). It's also faster to do one read, rather than "random reads" (there's lots of IO benchmarks online proving this is true). On high end modern SSDs with the latest kernels and best file systems you can get multi core disk IO when the moon is aligned right. Many games use 'pack files' for speed, instead of the file system. Note, this is still true even in web browsers - having a big image (sprite sheet) is faster, and uses less memory than having many separate images.
For optimal loading from disk, having one big file with the separate files start and end positions is a good idea. Then you can load each one with mmap (so the image is only in memory once... the file cache), and then use separate python processes to load each image in with mmap (pygame can load images via mmap). Unfortunately some image routines are not multithread safe, so the GIL is held sometimes... meaning processes are faster to load pygame images on python. On some graphics card/OSes you can even mmap the raw files directly from the file cache into GPU texture (on some apple hardware you can do this). Another trick for when you have a cold file cache (like the first time you load the file) is to first start a 'cat' process sending the pack file to /dev/null, this uses an optimised kernel path to put the data into the file cache.
Anyway... that was a bit of a digression.