Arduino Joystick Controller with WebSockets #78

Closed
wants to merge 12 commits into from

3 participants

@sbstjn

Want to play BrowserQuest with an old school gamepad? With these changes you can control BrowserQuest with an Arduino and a SparkFun Joystick Shield Kit. Just run the node-arduino-socket for piping the joystick's commands through a web socket to BrowserQuest…

  1. Merge
  2. Prepare your Arduino with a SparkFun Joystick Shield Kit
  3. Upload CallbackExample.pde by Sudar Muthu
  4. Get node-arduino-socket for Arduino-to-WebSocket communication and check http://localhost:8099 for connection
  5. Start your BrowserQuest server on port 8000
  6. Copy client and shared from merged BrowserQuest to node-arduino-socket's public/browserquest
  7. Open http://localhost:8099/browserquest/client and enjoy BrowserQuest with a gamepad!

Includes code from @sgricci, see PullRequest #24

@sbstjn sbstjn referenced this pull request Apr 10, 2012
Closed

Key Movements #24

@sgricci

Awesome patch! I wish I had the actual tools to put it to use!

@justinclift justinclift commented on the diff Sep 13, 2012
client/index.html
@@ -29,6 +29,10 @@
<meta property="og:description" content="Play Mozilla's BrowserQuest, an HTML5 massively multiplayer game demo powered by WebSockets!">
<link rel="stylesheet" href="css/main.css" type="text/css">
<link rel="stylesheet" href="css/achievements.css" type="text/css">
+ <script src="/socket.io/socket.io.js"></script>

Hmmm, this seems to introduce a new dependency, and is hardcoded to the root.

Any chance this can be made relative? i.e. src="socket.io/socket.io.js"

I too included socket.io in my branch but put it in js/lib/socket.io. Not sure where it should properly live but that seemed like the best place since things like underscore.js are in there.

Yeah, js/lib/socket.io seems like the right place for it.

Can we make it optional somehow, so it's only pulled in if needed?

i.e. for people running on OpenShift, and for anyone using an Arduino controller?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nickdesaulniers

Thanks for taking a look at the source code for BrowserQuest! BrowserQuest was developed by Little Workshop on behalf of Mozilla to showcase how the Web is the ultimate cross platform for games.

Mozilla does not currently have the resources to maintain BrowserQuest, but you should check out some of these amazing community forks instead! Feel free to add your fork to the wiki.

English

Korean

Android

Windows Phone

Erlang based

  • sedrik/bqs - Erlang implementation of the BrowserQuest server

C++ based

Related

  • HabitRPG - A habit building program which treats your life like a Role Playing Game
    • Uses the BrowserQuest character icons (CC-licensed) for some of their stuff, and is looking to contribute back the icons they've developed since

No longer actively developed

French

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment