A space survival game with real-time highscores built with Meteor and Phaser.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.meteor
client
lib
server
LICENSE
README.md

README.md

goa-space-survival

A simple game built to learn how to integrate Phaser into Meteor-projects.

Gameplay

A simple way to use Phaser with Meteor:

(Meteor version 1.2 and newer)

  1. Insert script-tag in game.html
<head>
  <script src="LINK_TO_LATEST_VERSION_OF_PHASER.min.js"></script>
</head>
  1. In main client.js-file, add a template helper
Template.body.helpers({
  'initGame': function() {
    // helper that initiates Phaser
    game = new Phaser.Game(
      800, 600, Phaser.AUTO, '',
      { preload: preload, create: create, update: update, render: render }
    );
  }
});
  1. In game.html, add a call to the template helper initGame, that will initiate Phaser.
<body>
  {{initGame}}
</body>
  1. Use Phaser like you normally would!

DISCLAIMER

I do not own any of the game assets and will only use them

  1. in non-commercial software
  2. for my own learning.