Tuesday, April 9, 2013

This was also an awesome idea  video game developing here I come lol.



 3D games controlled with your gamepad

Have you ever tried to play a non-Flash browser game nowadays? The graphic capabilities are amazing, especially when you see game clones like Quake.
But when playing this stuff you're always tied to your keyboard and the (mostly) clunky mouse. This is a major disadvantage, in particular for action games, it really holds them back from the browser.
Wouldn't it be cool if you just could plug your Xbox controller into your PC and start playing your favourite browser game? This is not a future vision anymore, say hello to the Gamepad API!

If you are having a gamepad around your desk, plug it in right now and enjoy some games, that already are using the Gamepad API. Programming the input controls also is a piece of cake, check out this code snippet or even better, run it yourself:
  1. <div id="gamepads"></div>
  2. <script>
  3. function gamepadConnected(event) {
  4.   var gamepads = document.getElementById("gamepads"),
  5.     gamepadId = event.gamepad.id;
  6.  
  7.   gamepads.innerHTML += " Gamepad Connected (id=" + gamepadId + ")";
  8. }
  9.  
  10. window.addEventListener("MozGamepadConnected", gamepadConnected, false);
  11. </script>
If you would like to know more about browsers' 3D capabilities check out Three.js and Jens Arps' open source 3D simulator engine Ascent built on top of it. Mark Hammil watch out, we might need you for another Wing Commander sequel!
Little something cool here i thought i'd share:


$('light').fadeIn();

The Arduino microcontroller platform is a grade A example for an "out of the box" JavaScript use case. For those of you, who are not familiar with the Arduino platform, here's a super famous quote from its website:

"Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

The Arduino itself only supports code written in C, which is still no big deal. With a few lines of C (besides that others have done this work for you), the Arduino can receive commands through its USB port via the serial port protocol.
But how can you access the serial port via JavaScript? Clearly not from the browser.
Node.js to the rescue!
Due to the efforts of community advocate Chris Williams, we have a Node serial port library, where we can send data over the old SP protocol. This was the initial breakthrough, based on the library other people came up with a more abstract approach for Arduino's capabilities. For instance the node-arduino and duino libraries.
The hottest and coolest library around the block for JS driven Arduino programming by now isjonny-five. Check out Bocoup's blog for some hot shit they've done with the Arduino platform and plenty of plug-ins. Also the JSConf video from Nicolai Onken and Jรถrn Zaefferer might give you a spin of what's possible today with little code.

Monday, April 8, 2013

                                 Basic start. Always a good place to begin if i do say so myself

I found this for those of you that thought this, on the day stuff got real.
At this point the class is almost done and i have learned so much from Dr. Henderson and my class mates. Things from PHP to JavaScript to MySQL. My first post in this blog is thanking everyone for making this class an amazing learning experience!