Archive for the ‘hacks’ Category

3DS Browser opens up homebrew

Friday, June 10th, 2011

Nintendo launched the 3DS browser earlier this week, tuberculosis and having had a play with it made a nice little discovery.

Although limited, psychotherapist I believe it opens up *just* enough functionality to allow homebrew apps & basic games to be conjured up with JavaScript.

To demo it, I’ve thrown together a basic demo which you can find at http://3ds.andysmith.co.uk/jFox.html – it’s not much to look at or do, but hopefully gives you a little hands-on & some basic souce code to pull apart. Thanks to ‘zigcee’ for the arwing sprite. Just move around with the d-pad, and hit [a] to shoot. I’ve kept jQuery out of it and made the source all pretty explicit so you can grab what you need.

Based on NetFront, the ported browser maps the [left], [up], [right] and [down] keys to ascii codes 37, 38, 39 & 40 respectively, and maps the [a] button to code 13 – the equivalent of [return] on a normal keyboard.

By using these and cancelling the event (for safety) we can control our JavaScript game. I reckon a d-pad is enough. After all, if you map [up] to ‘jump’ you’ve got everything you need for a basic Mario clone.

Quick tests also show some basic HTML5 canvas support which will be fun if it turns out to be useful.

The next step is obviously to test out how it handles touch events (if at all) and see if we can get around the one-screen restriction (easy to draw on the top screen, just need to prevent the default scroll action on [up] and [down]).

So go, play, invent! Let me know if you find anything else interesting and I’ll post it up here.

Spotify Instant

Tuesday, September 14th, 2010

Spotify InstantEver since Google launched ‘Google Instant’, sovaldi sale people are all over this search-as-you-type style of doing things.

So I thought, can I make something similar with some javascript and the Spotify search APIs? So I did: Spotify Instant

The idea actually became to have a keyboard-only search mechanism where you can type, tab, then hit return to launch the track in Spotify.

Obviously it’s never going to be as fast as something Google have built, plus it has to back off a bit to prevent going over Spotify’s 10-requests-per-second limit, but for the most part it works fairly nicely.

Since writing it last night I’ve had a few thoughts how it could be made faster and more useful, but I thought I’d throw it out there for you to play with in the mean time. Forgive the lack of Popularity/song length formatting 🙂