Getting started with phaser for HTML 5 game development

I have a long history of making games in a vanilla js style in which I am writing everything from the ground up. I do like that approach, but the draw back is that it is time consuming. Another part of me wants to just work with what is out there to begin with, and just focus on whatever it is that sets my project apart from the epic ton of games that are out on the Internet all ready. So That being said I have been focusing in on phaser as my first major HTML game framework to help me speed things along on game prototypes.

Read More

A jQuery.prototype.add method example

I am very late to the seen when it comes to jQuery, in many ways it’s time has passed. Still it is very popular, so I feel compelled to learn a thing or two about it, and author some content on it.

This post will be about the .add jQuery prototype method that is used on a collection to add some elements from one selection too another. Out of the gate this does not quite work as expected, but once you get how it works it is easy to see why it is helpful.

Read More

The lodash _.clone method For shallow copying of objects.

When dealing with objects in javaScript often I just need to create them, and reference them, but some times I may want to copy one. The process of cloning an object can some times be a bit complicated, there are shallow clones, deep clones, and many other concerns surrounding objects when making copies of them such as the prototype chain and circular references.

In native javaScript there is the Object.assign method, but browest support for Object.assign only goes back so far, and it is only helpful for making shallow clones of objects. Also Object.assign will not work out so great in some cases when it comes to deep cloning of objects.

So there are many options in lodash when it comes to copying objects as such the lodash _.clone method which might be a good starting point at least when it comes to getting started with researching what the options are when it comes to using lodash as part of a project. The draw back with the lodash clone method is that it can only be used to make shallow clones, but sometimes just a shallow clone will work just fine, and it is nice to have a quick method at the ready to make a shallow clone and move on to more important things with a project.

So in this post I will be taking a quick look at the lodash clone method, as well as some other options for making shallow clones using lodash.

Read More

Getting started with post requests using hapi and node.js

Post requests are an important aspect of any kind of full stack application. You have some data on the client, and you need to shoot it over to the back end system. Doing so in hapi is pretty easy, in this post I will be covering a very basic approach that does not even require any kind of client system, apart from just a simple postIt function that will be copied into the console.

Read More