Search the Community
Showing results for tags 'noob questions'.
-
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.