SmileBoom made the neat Petit Computer software for Nintendo DSi, which let people create games playable on a DSi or 3DS using BASIC. An updated version made for Nintendo 3DS is in the works and slated for release in Japan this fall.
Petit Computer 3rd Edition Smile Basic has a function that makes graphics pop out so you can easily create stereoscopic 3D games. SmileBoom is also adding help functions, a library of graphics and sounds, and a sample program which you can use as a reference.
After you create a game, you can share it by uploading the file onto the internet, but you will probably need the Petit Computer application to run it.