I've been reading about this at Game Dev places. Here is how I understand about the legality of making "fangames" that are based off of other media (books, video games and shows) (correct me if I'm wrong):
- Is it legal to create them but do not sell/make a profit out of them? Illegal.
- What if I give credits to the author and all who own the rights to the original content? Still illegal.
- What if I keep the story but change all the names, terms, graphics, etc.? Legal. This is your game then.
Nr1: Its "kinda" legal but the creators / company behind them can come and tell you to stop wich you must oblige otherwise they sue, this happened alot of times with fangames, nintendo closed alot of them. "now you look at it how you want, illegal or legal"
Nr2: Yeah, they dont care about that... they will sue if they want and you cant do anything about it.
Nr3: Depends, you must change the story as well, if you throw it in 1:1 every word they speak ect... then they could sue, if you change it enough then they can still sue but its much harder to make a case but dont forget, depending on who you try to copy, they may have millions if not billions and an army of lawyers so either way, if they want they will close you down. (generally speaking ofc, there are alwas exceptions.)
Then it depends on countries and their laws ofc.
Basically fangames are most of times a bad idea, its ok if you want to learn things in the process of making them but why not make then a original game inspirated from the fangame, fangames = you wont make any money and if then you make yourself pretty vulnerable and always live with the risk that the company behind it closes you down...
After all it happened, google it and you will find some people who were closed down by the companies behind those games.