HYPOTHETICALY
Say I were to create a game, a lego star wars game, noncommercial, but to distribute it freely. If I were to NOT use the word "Star Wars", and NOT use the word "Lego", but have starwarzy aspects like the force and lightsabers, and have the characters appear to be legos but have different proportions, but still look like legos. Would this be illegal?
Quite possibly.
Keep in mind that in addition to the images themselves that may be copyrighted, I'm pretty sure that the terms "lightsaber" and "the force" are trademarked as well.
You might be OK if your "modular man" has a "glow sword", but if you call it a lego guy with a light saber they can take you to the cleaners.
On top of that, keep in mind that even 'confusingly similar' words are protected -- so calling it 'leggo' or 'mego' or something is still a grey area where they have a good chance to win if the trademark owners decide to make an example out of you.
Finally: There are exceptions to those rules for things like satire where you're making fun of something (which is why many of the TV skits making fun of a movie or something aren't getting into trouble) -- but the satire definition is hard to stretch to a full-length production (movie, game, or otherwise)