My partner and I actually interviewed writer Parker Bennett back in 2010, which can be seen on the site
HERE.
He and his partner Terry Runté did in fact play the games in research for their writing, with SMB2 being the primary source of inspiration. Parker told us that they made it a point to insert as many references and homages as they could as few else on the production was making an effort to do so. Their script, which can be read
HERE, owed a lot more to the games in terms of creatures, items, locations and general concepts. My personal favorite were the inclusion of coin box phone booths and "Donut Land" donut shop.
I'd be happy to answer any other questions. I can recall just about everything about the film offhand and provide references.