Published by: 0

Spaceship game developed in HTML5 with the powerful Phaser JavaScript library. This game has been designed to provide a fun and addictive experience.

The game’s source code is available on GitHub, allowing developers to explore and contribute to the project if they wish.

Recently, I migrated it to PhoneGap to generate an application of the game, which expands its accessibility and allows players to enjoy it on different platforms.

The game controls are simple and easy to understand. In the desktop version, players can use the arrow keys to move and the ‘Ctrl’ key to shoot. In the mobile version, players can touch the screen to move and use a red button to shoot. Additionally, I have implemented a unique functionality: players can use the accelerometer of their device to move the ‘Death Star’ in the game.

The game’s code is written in JavaScript using the Phaser library. In it, a new game scene is created and the necessary elements are initialized. A sprite image called ‘atari’ is loaded, and a tileSprite is created in the game using this image. Additionally, a custom visual effect has been implemented using a fragment shader, providing a unique and appealing look to the game.

During the game, the custom pipeline is constantly updated to apply the visual effect. Furthermore, the position of the tileSprite is controlled based on the pressed keys, allowing players to navigate the game intuitively.

Get ready to embark on an exciting space adventure!

Code on GitHub

Change log

  • 1.1a Migrate to PhoneGap to export Android APK.

Controls

  • Cursors – Move
  • Ctrl – Shoot

In Mobile

  • Touch screen – Move
  • Red button – Shoot
  • Acelerometter – Move the “Death Star”

Play in: Play Game | Android