AlexN Posted April 12, 2017 Share Posted April 12, 2017 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! Quote Link to comment Share on other sites More sharing options...
mattstyles Posted April 13, 2017 Share Posted April 13, 2017 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>`. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.