Well, i can’t really give to you strong advices about it, as i didn’t develop yet a successfully game (“Real Game” is still in development).
However, I can give you some advice. For example, I decided to make my game a multiplayer one, but I aim lan parties, or at least games “between friends”. There is a ton of reasons for this.
If you create a multiplayer game for a larger scale, you’ll have to deal with a lot of stuff not directly related to the network, like a registration system and a lot of anti-cheat measures. Then, you’ll need to create a centralized server, and this server will be exposed to attacks. You also need to be sure that your server will never restart, and never crash. You need to ensure that passwords etc. are safe, and you’ll need an encrypted connection (and if I remember it well, there is no such thing in spidermonkey yet).
I come from a time where games like “Unreal Tournament”/Warcraft 3 was common, and people were able to play even without an internet connection, with just cables. Now, if you want to play any game, you need an internet connection, even if the game is not an online game, as the thing you buy in the store is more or less a key to let you download the complete game. Ok, it’s not entirely like that, but we are coming to it (especially with things like steam … I hate it so much). We are really driving to this world where you explore the internet with google, you install games with steam, watch videos with youtube and play online games on battle.net, talking with your friends on skype, accessing internet through one of the 2 or 3 ISP. Sigh …
Anyway, what I wanted to say is that you may consider this scale for your game, if it’s possible (if it makes sense). But first of all you should have a look at the “tchat” example (not sure it’s still working) and, in general, at tchat example with a lot of network libraries. It’s one of the most common examples because it’s also the simplest and the more “appreciable” for its complexity. Yeah, it’s basically “take every messages and echo them to everyone” in its simplest form. Every online game is just more complexity build over this. If you can make something with a client-server thing in it and make it usable on a mobile device, you are good to go for your online game.
…Or not, as you’ll need to learn a lot of annoying things like threading and lag compensation. Also, note that multiplayer games are a lot harder to create than solo games.