Tony Manso
TonyManso
Recent Tech Decisions
26 points

Following

  • Bootstrap

    TonyManso SpaceBlaster.io


    I only use bootstrap in the "How To Play" page because it's responsive and gives a nice look/feel to even the most boring pages.

  • jQuery UI

    TonyManso SpaceBlaster.io


    I only use the modal dialog thingy in jQuery UI, which displays when the player is not currently playing. I'm not big on the DOM and so it would have taken me a lifetime to figure out how to do this on my own, as compared to the 5 minutes to install jQuery UI and invoke it.

  • jQuery

    TonyManso SpaceBlaster.io


    jQuery is used mostly because I needed jQuery UI for the modal dialog. Otherwise, I use it to reference DOM elements when I'm too lazy to type "document.getElementById(...)".

  • Node.js

    TonyManso SpaceBlaster.io


    Node.js is the foundation for the server. Using Express.js for serving up web content, and sockets.io for synchronizing communications between all clients and the server, the entire game runs as Javascript in Node.js.

    I don't know how well this will scale if/when I have hundreds of people connected simultaneously, but I suspect that when that time comes, it may be just a matter of increasing the hardware.

    As for why I chose Node.js... I just love JavaScript! My code is all original, meaning that I didn't have to inherit anyone's bad Javascript. I'm perfectly capable of creating my own bad Javascript, thank you! Also, npm rocks!

  • Socket.IO

    TonyManso SpaceBlaster.io


    I use Socket.IO because using HTTP requests for a real-time multiplayer game just blows! Even with websockets, I had to scrunch the data being transmitted down to a bare minimum, and do some cheap compression tricks so that I can send data in JSON format. Otherwise, I would have to resort to sending binary data. I may end up doing that anyway when the time comes that I need to scale.

    How do I use it? Each client opens a socket connection at startup. The server keeps track of these connections, and sends each client the visible portion of the Playfield repeatedly. The clients render this information, while sending requests and commands to the server (join,turn,fire,thrust,bomb,viewport change,etc.) in response to the player's actions. The server uses that to make adjustments to the player's ship on the Playfield.