Screentendo is a clever desktop application that allows you to select any portion of your Mac desktop screen and automagically turn it into a playable level of Super Mario Bros.
The app works, explains creator Aaron Randall, by launching a semi-transparent, resizable window on your screen. Once you place the Screentendo window over an area and click inside the window, it will cause the app to render a game level based on what's within the window.
Randall walks through the process the program, which was created using Cocoa and Sprite Kit, uses to do this, in great detail on his blog. In a nutshell, the app creates a screenshot, runs it through a bunch of filters to find a strong outline to build a level around and then passes it to a bit of code that actually builds the level.
The game building relies on some pre-coded game logic to create the structure and then tosses in some familiar background imagery and a player sprite. The rest relies on the physics built into the Sprite Kit.
Randall calls the project a proof-of-concept hack, but it looks to me like something he should work on to at least create an easy to install bit of software. Right now, if you want to check it out, you'll have to go grab the code over at GitHub.