Creating a Mario fangame is not legally advisable.
Why Nintendo Will Shut It Down
Copyright: Nintendo owns exclusive rights to reproduce, distribute, and create derivative works of Mario, his likeness, level designs, music, and code.
Trademark: “Mario,” “Super Mario,” character designs, logos—all registered. Unauthorized use causes consumer confusion.
Precedent: Nintendo has issued DMCA takedowns / C&Ds to AM2R (Metroid 2 remake), Pokémon Uranium, Super Mario 64 HD, Mario Royale, and dozens more.
Consequences
GitHub / itch.io / Game Jolt takedown.
Cease-and-desist letter → legal fees.
Domain seizure, asset freeze if ignored.
Reputation damage in dev community.
Safer Creative Outlets
Original IP: Design your own plumber, mechanic, world. Celeste, Hollow Knight, Shovel Knight started as Mario-inspired originals.
Non-commercial fan art / fiction / ROM hacks: May fall under fair use if transformative, non-commercial, and not distributed via app stores—but Nintendo’s tolerance is near-zero.
Apply for a license: Extremely rare; Nintendo almost never grants indie fangame rights.
Respect IP law. Build your own legacy instead of borrowing Nintendo’s.