Getting started with multi touch in phaser with the pointers array.

The pointers array in phaser ce will contain an array of pointer objects for each non mouse pointer object. This can be useful for working on any project that may involve multi touch. It can be thought of as an alternative to the pointer1, pointer2, pointer3, etc objects available via game.input. In this post I will be covering some examples that make use of this array than can be used to set up multi-rouch in a phaser ce project with javaScript.

Read More

Working with pointer objects in phaser.

When making a phaser ce project, these days it’s important to try to make games that are well designed with both mobile and traditional desktop systems in mind. As such it is important to understand the nature of touch events, and the mouse. That is how they are different, but more importantly how they are the same, as they are both a means of how to point at something. They can be thought of as pointer devices, as such this post is about how to go about working with pointer objects in phaser.

Read More

Starting and stopping full screen in phaser.

Switching two and back from full screen is pretty easy in phaser, there are just two methods, and a property of interest via game.scale to get started with it. There are also properties that can be set to fill to the screen of the device, and preserve aspect ratio. In this post I will be writing about setting a game in actual full screen with the phaser scale manager. However this does not seem to work on some browsers, as it is something that can often be restricted. So I have written another post on toggling pseudo full screen in phaser, that is actually just a way to scale up the canvas of the game. So you might want to check that out if what is written here does not work out okay for you.

As such this post will be a quick overview of how to get this one out of the way, and on with your project in a flash.

Read More

Basic text in phaser

In just about any phaser 2 game there is going to be a need to display some text, either because it is something that needs to be displayed, or for debugging purposes. There is of course bitmap text that can be used in Phaser, but that is a bit involved, as it requires a few asset files. If you just simply want to display some text, and are not two concerned about how it will look for now, there are the text game objects that can be used.

Read More

Using the keyboard in phaser via game.input.keyboad

In this post I will be outlining a quick demo in which I am moving a sprite around the screen using the keyboard in phaser ce, using an instance of the keyboard handler via game.input. I will also cover the different options on how to work with keyboard input. It is possible to poll a key from an update method, or create an object in which handlers, can be attached, as well as a combination of the two if desired.

Read More