Fun and games with Node.js

Rachel Simone Weil
Node.js Collection
Published in
4 min readMar 5, 2017

I’m giving a talk today at Nodevember, a Javascript and node conference taking place in Nashville. My talk, titled “Fun and games with Node.js,” makes two key points:

  1. If you want to learn or refresh your skills in Javascript, you should make a game using Node.js.
  2. If you’re already a Javascript developer, you should teach others how to make a game in Node.js.

One of the difficulties with learning Node.js is that there’s a lot of assumed prerequisite knowledge. Most Node.js tutorials and books you’ll find expect not only a familiarity with Javascript but a robust understanding of best practices for writing and organizing code, how servers and HTTP traffic works, and the latest Javascript features. They toss around jargon like “asynchronous” and “client-side,” words whose meanings are not self-evident. Overly-ornate verbs lead to confusion and intimidation. “Invoke,” “execute,” “hoist,” and “instantiate” are just a few twenty-dollar words, to poorly paraphrase E. B. White, that obscure simple verbs like “make” and “do.”

If you’re a Node.js developer, you might be thinking, “Well… of course you have to know basic Javascript before you can jump in to Node.js! That’s not an unreasonable request, is it?” Yet the new possibilities that Node.js has opened up have made Javascript all the more interesting to beginners, and those beginners may arrive to the scene and find little scaffolded learning. There are also many Javascript developers who, like myself, have real-world Javascript experience yet don’t come from a traditional computer science background. The terminology and analogies to other languages found in Node.js learning materials (“…just like you’d do it in a traditional .NET backend!”) can still provide barriers.

So how can beginners and the scrappy self-taught among us overcome the challenge of learning new vocabularies and concepts in Node.js? Perhaps by making a game. Games are familiar, fun, and engaging. They get your creativity and problem-solving skills going, and they are a great opportunity to create and learn on your own in your free time. If you make a game and it sucks, congratulations: you have completed the most important rite of passage, and you are now officially a game developer.

I encourage more seasoned Node.js developers to make a game and share the code with others who are just starting out. Your fun project might be just the push someone needs to advance through the self-paced learning process.

Here are links to two fun Node.js projects I built this year. The source code is available for these projects as well.

  • ConnectedNES: a WiFi modem peripheral and twitter stream for the original NES game console.
  • the dealwithit bot: Choose a photo, and a computer vision API will assist in automatically dropping pixelated shades on everyone in it.

If you’re interested in trying your hand at making a Node.js game, here are a few more open-source games and amusements to get you started. Most of these are accompanied by step-by-step tutorials.

Many of these examples also involve socket.io, an easy-to-use Javascript framework for sending data between a Node.js server and clients in real time. The socket.io website has a tutorial that walks through building a browser-based, real-time chat client that can be helpful to go through if you’re just getting started with websockets and real-time communication.

And last but not least, here are a few of my favorite developer resources for getting started with Javascript and Node.js.

And last but not least, here are a few of my favorite developer resources for getting started with Javascript and Node.js.

Working on a game with Node.js? Reach out on twitter if you do that sort of thing. I’d love to see what you’re working on!

Posted November 20 at 8:48 AM while hanging out in Nashville.

Originally published at nobadmemories.com.

--

--

Rachel Simone Weil
Node.js Collection

ɳɵ ɓɑɖ ɱɛɱɵʀɩɛʂ 💾 Design, 6502 ASM, Node.js, glitch, vintage tech + toys. See also: @femicommuseum. Whimsical PM at @Microsoft.