silvanet

Members
  • Content count

    3
  • Joined

  • Last visited

About silvanet

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. silvanet

    running game examples

    Thanks so much. Got that and extracted zip into \phaser-examples folder in \inetpub\webroot. Phaser master git repo sits in \inetpub\webroot\phaser. Now, if I open \phaser-examples folder as a project in either Brackets or Visual Code editors, it opens live in a local server. I can open project root's index.html and open any folder from there, for example the games one, and the samples play live. Now, on to learning.
  2. silvanet

    running game examples

    I'm doing this on a Windows 10 PC. I have php installed. I cloned phaser-master git source into inethub/webroot/phaser directory. Cloned the phaser-examples-master into inethub/webroot/phaser-examples directory. index file in examples says can use phaser debug runner. link shows a php file. What exactly do I have to do with that file? Not clear to me. Thanks for help.
  3. I have simple game that I had working fine on localhost from Visual Code. Decided to try it out on Cloud9. Configured Cloud9 user and permissions (separate from Admin group) I downloaded the phaser-master from github. The file contains hidden .github folder and .gitignore file. Then there are v2, v2-community, and v3 folders. To use Phaser in cloud9 I'm asuming I have to upload the files in the v2 folder. I did that into the cloud9 root. The html file is: <html> <head> <meta charset="UTF-8" /> <title>Coin Game!</title> <style> html { background: black; } canvas { margin:auto; } </style> </head> <body> <script src="phaser.js"></script> <script src="game.js"></script> </body> </html It is located in the cloud9 root folder. I rand npm install experss from the terminal in the cloud9 instance root. Then I ran npm init --save. I'm not sure if I have to do this, but I ran a simple install of node.js server from a terminal window in the cloud9 root. The command I used was: npm install node server When I try to run my game.js file from cloud9 editor window, it errors at this line: // setup game when the web page loads window.onload = function () { game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update, render: render }); What is says is "window is not defined" It ran so easily on my local node server. I did all the local work from Visual Code. It set up and ran the server. It was using an extension called live server. I'm not sure exactly what it does; but if I just open up the local files directory, check node, then run node game.js, I get the same error of window not defined. I'd like to get this to work on cloud9 for learning purposes. I'd appreciate any help, please.