Short Version: It's not legal, but it's usually tolerated
If you use any content from an existing story/game/anime/anything, then your game will be a "derivative work" based on the original. As others have said, the bottom line is that derivative works are NOT legal without permission from the owner of the original work. This applies to stories, images, music, UI elements, sprites, and everything else.
Characters are a niche case; you cannot copyright a character in and of itself, but the work(s) the character comes from are copyrighted. Therefore, it's okay to create a character who is
similar to an existing character, either visually or in concept, but you cannot simply copy them from an existing work, or else your work will be considered derivative of the work the character originally came from. A character's image or name
can be trademarked though, so be aware of that.
It doesn't matter whether you are making money or not. If legality is what matters to you, then you should not make fan work, ever. There are exceptions for things like parody and education purposes, but those don't apply here; fan art is not the same as parody, no matter what some artists will claim.
However, the person who could stop you from creating/sharing a derivative work is the person or company who owns the rights to the
original work. If they tolerate your derivative work, nobody will take legal action against you, which is how fan art and fanfic are generally handled. Except in extreme cases, it's not worth it to prosecute hobbyists over copyright - small copyright holders can't afford to do it anyway, and for big companies the income they might be losing is not enough to be relevant.
In short, if you make a derivative work, there is a high chance that it will be tolerated (or ignored) by the owner of the original work.
However, if the copyright owner
does notice your work, or decide that they object to it, they have the right to:
- ask you to stop sharing the derivative work
- ask you remove any reference to their copyrighted material from your work
- take legal action against you, if you refuse to stop using their work
Basically, if you make a derivative work (fan art, fanfic, doujin, douin game - anything!), you must accept that the owner of the original work can stop you from sharing that derivative work, if they want. At any time. Even if you put in lots of your own work too. That's just how fan art works.
Detour because I find it interesting: Trademarks. You cannot copyright things like names or characters, but you
can trademark them. A trademark is registered by a business, and they can apply it to elements which are important to their business, products, or image (including things that cannot be copyrighted, like characters, words and shapes). For example, Spiderman cannot be copyrighted, although every work which contains him is. However, his image, logo and name are all trademarked, because they are part of the Spiderman "brand" which Marvel (or whoever) owns. Coke cannot trademark a bottle, but they can trademark the unique shape of their bottles, and stop other companies from designing bottles (or, say, a logo) using that exact shape.
Vocaloids.... I'm not sure about them. I don't know them well enough to know whether they are sold as tools rather than entertainment (though I suspect not). I'm sure they come with their own terms regarding ownership of material produced with them, so you'd best read that carefully, and find out.