Jump to content

first steps


AlexN
 Share

Recommended Posts

I am sorry if I post in the wrong place, it just seems I miss some very important step. I am new to Phaser. I followed all the required steps:

- setup a server

- downloaded the phaser soft

Now, I just don't get how do I ... 'activate' it, so to say. 

How do I USE the Phaser folder that I have unziped? Is it just a sort of a big library like p5.js?

Thank you in advance!

Link to comment
Share on other sites

I don't know what p5.js (did you mean P2? which is included with Phaser) is but Phaser is indeed a big library (actually, its a collection of lots of small libraries and some bindings to hold it all together). The easiest way to use it is to include the main script file using a script tag, this will place a global variable called `Phaser` on to the window, now include another script tag with your code and you can use the Phaser object from global (there is a nice colourful console log when Phaser bootstraps you can look for). This is a normal loading pattern for JS libraries/frameworks.

You can also include Phaser from a CDN, like `<script src='https://cdnjs.cloudflare.com/ajax/libs/phaser/2.6.2/phaser.min.js'></script>`.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...