• Content Count

  • Joined

  • Last visited

About spkez

  • Rank

Profile Information

  • Gender
  • Location
    United States
  • Interests
    Running, Horses, Old Timey Westerns, Space, Space Westerns

Contact Methods

  • Twitter
  1. spkez

    Loading Images

    Hi, I'm new to this whole phaser thing, and I looked around for an answer to my question, but here I am. Here is the github project that I am working on. In my main.js file, which I have in the root directory of the project, I load the images as follows: // Load the imagesfunction preload(){ game.load.image('background', 'TagJam18/images/Background.png') game.load.image('platform', 'TagJam18/images/Platform.png') game.load.image('Wall', 'TagJam18/images/Wall.png') // Sprite sizes are inconsistent so there is no way to do these with constants // The only real way is to resize the window sprite. // I definiitely do not feel like doing that. game.load.spritesheet('dog', 'images/DogSprite.png', 16, 8) game.load.spritesheet('window', 'images/WindowSprite.png', 16, 16)}Then in my create function I try to load my image. // Create the scenefunction create(){ // Physics is a perfectly fine way to do things for this. // The ARCADE engine has all the physics we need for a simple platformer game.physics.StartSystem(Phaser.Physics.ARCADE) // Add in the background. game.add.sprite(ORIGIN, ORIGIN, 'background')However, when I try to run my game, what I get is a black screen. Am I doing something wrong with my folder directories? I have all of my images in an image folder inside of the TagJam18 folder. I'm not very confident that I am referencing them correctly.
  2. Okay. I can now shed some light on it now that I putzed around with it for a while. Here's what you want to do. Go down to your little console in your cloud9 environment, open and copy the hellophaser folder into the home directory. The command should look look something like this: cp -r resources/tutorials/01\ Getting\ Started/hellophaser .That's not super human readable, so I'm going to explain to you what's happening in case you ever need to do a similar operation. First of all This is your copy command: cpIt can copy stuff from one place and put it into another place. But the cp command does not by default move entire directories. So we need to tell cp to dive into the directory and copy all the stuff in there to the new thing as well. We do that with this flag: -rFlags are just little modifications that we make to commands. -r stands for recursive. The next part is a little hairy: resources/tutorials/01\ Getting\ Started/hellophaserThis just tells cp where to find the stuff that needs copying. The strange part that you might wonder about is the backslashes. Those are just escape characters to let cp know that the spaces are not us moving onto the next part of the command, but instead is still a part of the location that we want to copy. Our final step looks straightforward: .But it doesn't mean what you might think at first glance. In english, a period marks the end of a sentence. A command to a computer is like a command in the form of a sentence, but we don't end computer sentences with periods when we're talking to the computer. We use the enter key or the return character. So what does this period mean? It's actually a directory. It's the directory where you are located right now, where you are running the command. So if you use this symbol it will be in the folder that contains your project, which in this case will likely be "~/workspace" where the tilde or "~" is the project domain space for your specific project, or in other words "phaser".
  3. Hey there, I am also a Phaser.io noob, but I am pretty familiar with cloud9 so let me try to explain the problem a little better since I am having the same problem too. There is no obvious way in cloud9 to run code. If you go to the hellophaser.html file, you can run that file, but all you get is an index of all the files ever. From there, I tried entering into the address bar for the cloud9 the /hellophaser addition that is perscribed in the getting started tutorial. This renders a page not found error. So. I guess the question is how can someone run code in an already set up phaser repository on cloud9?