Create HTML5 Vertical Endless Runner cross platform games

Using Phaser framework and other FREE software
Endless runner games are gaining more and more popularity and they are really easy to code.
I will take you by hand through the creation of a complete HTML5 vertical endless runner cross platform game with a lot of features and room for customization.
100 pages + 31 source code examples with a free update to come in a few days.

Creating your own backgrounds with Adobe Photoshop Scripting

Emanuele Feronato Javascript, Photoshop

Some Photoshop versions ago (actually I can’t tell which Photoshop version featured scripting first) Adobe developed the capability of executing scripts inside Photoshop.

A script is a series of commands that tells Photoshop to perform a set of specified actions, such as applying different filters to selections in an open document. These actions can be simple and affect only a single object, or they can be complex and affect many objects in a Photoshop document. The actions can call Photoshop alone or invoke other applications.

Scripts automate repetitive tasks and are often used as a creative tool to streamline tasks that might be too time consuming to do manually. For example, you could write a script to generate a number of localized versions of a particular image or to gather information about the various color profiles used by a collection of images.

My case was a bit different: I was looking for a background full of numbers to use in the enhanced version of my Flash math game in less than 2KB so I started googling a bit until I stumbled upon a series of images like these ones:

I wanted something like that but all images I found were taken from sites like Depositphotos or similar sites so I told to myself: “are they really charging for some stuff I can do in a couple of minutes”? And I decided to create a Photoshop script to do something similar on my own.

Let me show you how i managed to do a background with numbers:

First, Photoshop lets you choose the language you prefer among VBScript, AppleScript and JavaScript. I used JavaScript because it’s the only one working both on Windows and Apple machines.

Then, Adobe provides a tool called ExtendScript Toolkit you can find in your Program Files -> Adobe -> Adobe Utilities folder and which allows you to test your scripts on the fly, but you can use your favourite text editor as long as you save your scripts with jsx extension then load them in Photoshop with File -> Scripts -> Browse.

So, I made a script to write 1000 random numbers in random positions with a random color and a random alpha, with this script:

And once executed here’s an example of what I got:


Now I am able to make virtually any kind of numbers-letters background in a matter of seconds.

Download the source code and the resulting PSD.

Stay up to date
Follow me on the social networks and never miss a post.

Official Emanuele Feronato Facebook page

Official Emanuele Feronato Twitter account

From null to full HTML5 cross platform game

I will take you by hand from the bare bones of JavaScript programming through the creation of a full cross platform HTML5 game, with detailed explainations and source code.

If you don't know where to start, then From null to full HTML5 cross platform game is the book for you.

Comments 3

  1. Bojan

    Thanks for the script. I tested it and it works but also it takes some time. Scripted Patterns is one of amazing features in Photoshop which is usually overlooked by users. I am about to go beyond actions and variables and scripting patterns can be good starting point. Thanks for highlighting this feature and Photoshop capabilities.

Leave a Reply

Your email address will not be published. Required fields are marked *