just look at MegaPhilX for a Example(
http://megaphilx.com/?page_id=26).
he started to make his 'own' Megaman game with his friends and cooperative workers. and it's gameplay was really same as original megaman, so did you think he release that game without any credits or because of wanted moneys? Nope, they never wanted moneys or stealing ideas or profits, because they just wanted a Tribute also wanted to make their own megaman fan-game. also they are used to be just bunch of megaman fans, but they already made it with getting other gamer's attentions. making a non-profit, non-selling, sharing with gamers and author-tributing own 'fan-game'.
still if you don't get it, here's some picked words about does making of fan game is illegal;
It doesn't matter if your game is not for sale but just sharing.
It doesn't matter if it's just a fangame.
It doesn't matter if the piece is obscure.
discounting a third word, you can make your own plants vs demons mod. also if you made so far with really liked that game so much or telling a original autuor's property, that's not a stealing. that's a tributing between with fan-gamers and original-staffs.
but just don't take it too much serious, and least you tributed for original authors already. again, if your game is not for sale among with credits for author, then you're free to make.