Jump to content

Installation


rgbz
 Share

Recommended Posts

I am just starting to look into testing Phaser3, but I am trying to figure out what is the best way to set it up on my mac book pro. I have tried sudo  npm install phaser3-project-template  but the npm install always fails. I do have the latest node LTS installed (8.9.4).

Is there something I am doing wrong or is there a better way to get started.

 

I appreciate any assistance, thank you.

Link to comment
Share on other sites

The absolute simplest way to start a project I have found is to run `npm install phaser@beta` and then include the dist bundle directly via a script tag in your index.html

<html>
<head>
<script src="./node_modules/phaser/dist/phaser.js"></script>
</head>
<body>
<script> var game = new Phaser.Game(...);</script>
</body>
</html>

Run your project using a really simple HTTP server like http-server (from npm) in your project root so it can serve from the node_modules folder.

Anything beyond this will require you to plan out a project structure and possibly set up a more intelligent web server.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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