• Content Count

  • Joined

  • Last visited

About silvanet

  • Rank

Recent Profile Visitors

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

  1. I'm following a course, using CE version 2.10. I used it on a prior project (same version) in which init: function() { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; }, worked perfectly to align and scale the background, but for some reason that same code is not working on the new project. We're referring to the phaser.min.js in a script section at the bottom of the index.html file as before. I'm literally stuck. I know I can use coordinates, but that is a pain in the butt. It seems to be roughly scaling, but with the background image definitely not centered either horizontally or vertically. I'm editing with Visual Studio Code version 1.34 stable. BTW, can you suggest a nice bracket coloring extension that works nicely with Phaser?
  2. 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.
  3. 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.
  4. 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.