Generally one file will be faster, since there's a non-trivial overhead in opening a new file handle, and you'll usually have to wait for a disk seek too. Of course you can always pack your small files into one larger file, the easiest and most obvious way would be to pack your resources into a jar (which you might have to do anyway).
Yeah well, when I distribute, I want to offer some kind exe wrapper for windows users. So I will see if that works with a jar of the whole project.
Conserving memory space is a nice idea, but do you really have to? How many sprites are we talking about here? What size are they when loaded into ram? You may be making extra work for yourself when you don't really have to.
We are talking about a game the size of Diablo 2, all 2D sprites... so there are lots of them.
And naturally you want to conserve as much memory as possible, so that also low spec PCs can play it, with no problem. As Diablo 2 does of course.
Right now, I load every sprite I need on map change.
Even so there are many sprites involved, it seems to be very fast.
So, as of now my main concern is not the sprites, but actually text files.
It's about Items and their data, which, in my case, mainly involve:
Name(String), Description Text(String), Artwork(BufferedImage), Icon / Symbol (BufferedImage)
Now what I'm doing is: Whenever the game needs any data about an Item, it will load (ingame, not map change) the data.
Which involves reading in, one XML file per Item for all the text and at the moment 2 Images to be loaded from file.
Obviously once loaded it won't be loaded again.
On that note I am also not sure if I should unload all unnecessary resources on map change aswell.
Also, It's like I have any performance issues as of now at all; but I just want to make very sure it stays that way as the game grows.