Tag Archive: Javascript

Apr 23

Create your first Node Module and publish it to the NPM registry

NPM Init

Installing Node Modules through NPM NPM is the Node Package Manager, it makes it easy to install external libraries and frameworks for use in your own projects. With NPM installed you can simply type: npm install module-name Upon running this command, npm will fetch that module from the repository and place it within the “node_modules” …

Continue reading »

Mar 23

Installing and switching between multiple versions of Node.js: n vs. nvm

The need for a Node Version Manager Sometimes it is necessary to be able to quickly switch between versions of Node.js without having to uninstall and reinstall a new version. Perhaps one project is written for an older version of Node.js and works on that version, but you’d like to easily test it against a …

Continue reading »

Apr 10

Creating a Hex Grid for HTML5 Games in Javascript

In my last post, I described how to do some of the calculations for determining the required measurements to build a hexagon. Today I’ll show you how to take that a step further and build a hex grid or game-field out of those hexagons. Let’s start with the overview and pseudo-code for populating our grid …

Continue reading »