I recently stumbled upon a React Native library so perfect for my needs that I would have been silly not to use it…

Last year.

You see: I needed to add pinch and drag gesture support to the React Native app I’m building. It’s totally possible, albeit entirely impractical, to do so using just the code that ships with React Native. This library abstracted things so that all I needed to do was:

Unfortunately, it was last updated 9 months ago and isn’t compatible with new React Native applications. I set about refactoring the code so that it would…


React Native is the Wild West. There’s so much to discover and build, and it can be a fun journey. Sometimes, before you can start panning for gold, you have to make the tent you’re going to sleep in. And build the saloon you’re going to drink your sarsaparilla in. And commission the trader you’re going to sell your gold to.

This past week, I wanted to take a feed of images, and make minor changes to each. The web developer in me thought; “Let’s use canvas for this. There are already loads of resources explaining how to do the…


Religious rant about to happen. My apologies, in advance, if you’d rather not see it.

So many people (myself included) like the idea of an all-powerful God. But that only God can judge people? Pfff.

Let’s focus on Christians (because it’s what I know, and shouldn’t make assertions about other faiths I don’t…)

How many times do you recall Jesus telling prostitutes off as they wash His feet or prepare His food? Or tax collectors as they open their homes to feed him?

Jesus hung out in the bars and the slums, and people saw His love and approached for…


As the FIG voting representative for SilverStripe, I need to balance my views with those of the community. I cannot simply vote because of how much I personally like or dislike the topic/person.

It’s clear something has gone wrong. There are reports of fake Github accounts, fake downloads, fake mailing list messages. All confirmed but unattributable. There are signs that it might be Roman, and the simplest hypothesis is that these things originate with him, to promote this code.

The truth is that we do not know, and cannot prove, he has done these things. If he has, I do…


In JavaScript!

I recently learned about Pick’s Theorem. It’s a simple way to calculate the area of simple polygons, in a grid of equidistant points. If you’ve not heard of it, check out the video!

I was curious about how I could make an interactive version of the algorithm. I imagined some kind of grid, on which I could click to build a polygon. And then it would work out which points were inside and which were on the boundaries, and finally calculate the area inside.

It turned out to be fun!

Drawing the grid

It would help if you were familiar with the Canvas…


A while ago, I started a small survey. The purpose of the survey was to find out a little more about the feasibility of writing for a living. You see, I write quite a bit of technical (code-related) stuff. I’ve always been curious of whether I could do this full-time.

Of the 76 people who completed the survey, only 3 seem to think I they could.

Motivations

It was interesting to see (from this admittedly small sample size) that motivations for writing fall roughly into 3 categories:

  1. Mostly for learning
  2. Mostly for sharing/teaching
  3. Financial/person brand growth

Roughly 10% of writers mentioned…


This morning I “finished” a book I’ve been working on, for a while. I felt elated and considered how well my life was going. I played with my kids, had a hot shower, a warm meal. I took the train to the city and walked through the sunny streets, to the programming job I enjoy.

On the way, I remembered a song I’ve been listening to. It opens with the words:

Though all the wealth of men was mine to squander
And towers of ivory rose beneath my feet
Were palaces of pleasure mine to wander
The sum of it would leave me…


With AdonisJS Fold

I’ve been spending lots of time in JavaScript land. Mostly with ReactJS and Redux, but also a bit with AdonisJS. Adonis is pretty new (as though the others aren’t), so most folks haven’t heard of it.

If you’ve done any recent of PHP development, you’ve probably heard of Laravel. It started as a fresh take on traditional web MVC, and has continued to grow in popularity and maturity. It is, not to put too fine a point on it, my favourite PHP framework.

Adonis is so much like Laravel, in terms of the developer experience. It’s takes obvious cues from…


Making Games

Previous | Next

These few posts have taught me a great many things. Two, in particular, stand out. The first is that there’s an endless amount of things we can add or change about our games. The second is that this is a rewarding and tiresome activity.

I began with the desire to learn how to make a simple platform game, and we’ve covered almost everything I need to build that game. I don’t want to stop here, though. I want to keep on learning and refining. I want to keep on sharing those experiences with you.

Edit:

I’ve written a book about these and more topics → https://www.amazon.com/dp/1484224922


Making Games

Previous | Next

It would be pretty limiting if players could only move upwards by jumping through gaps, or on boxes. Those aren’t the only options though. We still have to learn about elevators, stairs, and ladders. So let’s build a ladder!

What we’re going to cover

You can find the example code at https://github.com/assertchris/making-games/tree/ladders

Creating our first ladder

Let’s begin our ladder by copying the Box class:

You’ll need to make a ladder.png image. I chose to use a simple 64px by 192px sprite. Be sure to add this…

Christopher Pitt

Programming → Robotics → Minecraft

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store