Search the Community

Showing results for tags 'question'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 35 results

  1. Help with scales?

    So I've been following along with a tutorial to make my first game in Phaser. I'm trying to understand everything the tutorial is saying, but I can't find an explanation for everything. For example, the background image being used in the game is 400x32. However, the tutorial says the following: // Scale it to fit the width of the game (the original sprite is 400x32 in size) ground.scale.setTo(2, 2); My question is this; if the original size is 400x32, then why does seting the ground scale to 2, 2 work out? The game made in the tutorial works, and the ground does fit the width, but wouldn't the ground have to be 400x2 or something like that to have the proper width? I'll attach the tutorial file to this post so you can see the whole thing. I attached the tutorial text itself, and "part9.html" is the completed code that came with the tutorial. I don't think my code is needed to answer my question because I'm just following along with the tutorial, and it's just a less completed version of part9.html. I also have one more question regarding the ground. The tutorial says this: // Here we create the ground. var ground = platforms.create(0, - 64, 'ground'); Again, if the size is 400x32, then why does -64 work to put the ground at the bottom? What does 64 do in this code? I guess I'm just looking for an explanation of why the code I posted works. I understand the rest of the code in the file, just these 2 lines are what confuse me the most. I'd greatly appreciate any help I can get, thanks! Edit: I realize now that in the first line of code I pasted here, the 400x32 is talking about the size of the platform itself, not the whole background. Still, how does the (2, 2) scale a 400x32 platform to fit the whole background? tutorial.html part9.html
  2. Hey guys, I made a game on my Macbook pro, I use scale.set() in many places and use the screens height/width to help place sprites. The problem is that my Macbook has a retina screen (which has a pixel density of 2.0). When I play my game on a non-retina (normal 1.0) screen the game is blown up to look massive. The way to fix it would be to divide any numbers I use for size/position by the pixel density. This however seems weird as I have to have this everywhere somevar * game.device.pixelRatio Is there a way to do this better?
  3. I'm trying to update a rectangle drawn using drawRect by changing the value of fillColor but I can't get it to work. Here's my code: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create}); function preload() { } function create() { this.rect =, 0); game.stage.backgroundColor = '#FBFAFA'; this.rect.beginFill(0xf44253); this.rect.lineStyle(15, 0xf44253, 1); this.rect.drawRect(350, 250, 100, 100); game.input.onDown.addOnce(changeColour, this); = this.rect; } function changeColour() { debugger; var newColour = Phaser.Color.hexToRGB('#42f445'); this.rect.graphicsData[0].fillColor = newColour; console.log("clicked"); } On mouseclick changeColour is getting called and I can see in the debugger this.rect.graphicsData[0].fillcolor is being changed from 16007763 to 21165125 which are the correct color values in 0xAARRGGBB format. Do I need to call a function to get this.rect to redraw the rect primitive? I know I can call this.rect.clear() and call beginFill/drawRect again with the new color but I'd seen other examples on this forum of people just setting fillColor directly.
  4. Hi guys, I was wondering, how do I get my picture added to that top image thing on the homepage? Yknow it shows like a posts image, then u can check out the link below it? Thanks,
  5. Hello. I am very new to PIXI, so please bare with me. I have been in search of good API for my game. The game uses a map which contains tiled images as well as a bunch of path on the screen. Think Google Map, except a lot simpler. I was able to use PIXI to implement the map background where it scrolls and loads tiled map images as needed. I was also able to draw paths onto the map. Now the problem is that I cannot figure out how to interact with those paths. I used PIXI.Graphics to create and draw a path. I applied mouse events to it. But no event is fired. I was able to get the even to fire if I made the graphic into closed path will fill. But unfortunately that will not work for my purpose. Is there any way to accomplish this? Any way to interact with just a path (could be complex paths with multiple segments and/or curves) rather than enclosing shape? Thanks in advance!
  6. Painting Shots

    Hi, im new here. I have one big doubt, I´m making a game where you shoot ink, and I'd love to staint the floor with it. But I don´t know how. Does anyone know how to do it? Any ideas? Thanks.
  7. Problem with Tiled ( Probably )

    Hello, Phaser Community! I'm new to HTML5 development, and i've got some problems. Currently i'm working on platformer movement. If a character moves to the edge of the platform, he gets instantly moved to the beginning of that platform, GIF - Here's my Level1 code: Game.Level1 = function(game){}; var map; var layer; var player; var player_test; var heart; var MAX_SPEED = 48; var ACCELERATION = 1; var DRAG = 500; var GRAVITY = 920; var JUMP_SPEED = -250; var RIGHT = true; var LEFT = false; var JUMP_TIME = 0.5; Game.Level1.prototype = { upInputIsActive:function(duration) { var isActive = false; isActive = this.input.keyboard.downDuration(Phaser.Keyboard.Z, duration); isActive |= (this.input.activePointer.justPressed(duration + 1000/60) && this.input.activePointer.x > game.width/4 && this.input.activePointer.x < game.width/2 + game.width/4); return isActive; }, upInputReleased:function() { var released = false; released = this.input.keyboard.upDuration(Phaser.Keyboard.Z); released |=; return released; }, leftInputIsActive:function() { var isActive = false; isActive = this.input.keyboard.isDown(Phaser.Keyboard.LEFT); isActive |= ( && <; return isActive; }, rightInputIsActive:function() { var isActive = false; isActive = this.input.keyboard.isDown(Phaser.Keyboard.RIGHT); isActive |= ( && > +; return isActive; }, create:function() { map = this.add.tilemap('lv1', 8, 8 ); map.addTilesetImage('Tileset', 'tileset'); layer = map.createLayer(0); layer.resizeWorld(); map.setCollisionBetween(1,5); player =, - 32, 'player'); player.animations.add('run_left', [0, 1], 13, true); player.animations.add('run_right', [2, 3], 13, true); player.animations.add('idle_left', [8, 8, 8, 8, 8, 8, 9, 9, 9, 9], 5, true); player.animations.add('idle_right', [10, 10, 10, 10, 10, 10, 11, 11, 11, 11], 5, true); heart =,, 'heart'); heart.animations.add('idle', [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8], 18, true); player_test =, - 20, 'player_idle_test'); player_test.animations.add('test_idle', [0, 1, 2, 3, 4], 13, true); this.physics.enable(player, Phaser.Physics.ARCADE); this.physics.arcade.gravity.y = GRAVITY; player.body.maxVelocity.setTo(MAX_SPEED, MAX_SPEED * 10); }, update:function() { this.physics.arcade.collide(player, layer); var onTheGround = player.body.blocked.down;'idle');'test_idle'); if (player.body.velocity.y>0) { if (LEFT == true) player.frame = 6; if (RIGHT == true) player.frame = 5; } if (this.leftInputIsActive()) { player.body.velocity.x += -ACCELERATION/3; LEFT = true; RIGHT = false; } else if (this.rightInputIsActive()) { player.body.velocity.x = ACCELERATION/3; LEFT = false; RIGHT = true; } else { player.body.velocity.x = 0; if(LEFT == true && RIGHT == false && onTheGround && player.body.velocity.y == 0) {'idle_left'); } if(RIGHT == true && LEFT == false && onTheGround && player.body.velocity.y == 0) {'idle_right'); } } if (this.leftInputIsActive() && player.body.onFloor) {'run_left'); } if (this.rightInputIsActive() && player.body.onFloor) {'run_right'); } // Set a variable that is true when the player is touching the ground if(onTheGround) { DRAG = 2250; ACCELERATION = 750; } else { DRAG = 1750; ACCELERATION = 1000; } // If the player is touching the ground, let him jump if (onTheGround) { this.jumping = false; } // Jump! Keep y velocity constant while the jump button is held for up to 150 ms if (this.upInputIsActive(100) && (this.jumping == false)) { player.body.velocity.y = JUMP_SPEED * JUMP_TIME; player.animations.stop(); if(LEFT) { player.frame = 7; } if(RIGHT) { player.frame = 4; } } // Reduce the number of available jumps if the jump input is released if (this.upInputReleased()) { this.jumping = true; } } }
  8. [SOLVED] AI movement question

    Alright, been stuck on this for a few days and starting to think I'm overlooking a very simple solution. I have a character that I want to walk back and forth on the screen. He needs to walk to one edge, turn around, then walk to the other edge, again turn, walk, etc.; rinse and repeat. I've tried simply '+=' and '-=' on his x coord with an if statement but he wont seem to walk in the other direction. Example, writing 'steve.x += 1;' then 'steve.x -= 1;' won't work. He gets to one edge but then stops. I've also tried using tweens but he seems to become jittery as he's a spritesheet already, maybe? His physics body will stay, but the pixels themselves seem to move outOfBounds. Anyway, here's the full code for what I'm working on, any help is greatly appreciated. Also still learning Phaser so any feedback on code flow is helpful too! Thanks!
  9.{},this); game.input.onUp.add(function(){},this); They are triggering when I click!
  10. Take a look at the WebGL rendering in this fiddle: Note the extension of the polygon beyond the 200px width it is defined to be. Is this a bug or a feature? If it's a bug, I'll file an issue. For reference, the fiddle includes a PIXI Canvas rendering and a ProcessingJS rendering. Thanks.
  11. Hello fellow 3D engineers, at the moment I'm working on a replacment of our old 3D system (was a plugin). I am using babylon for this and I am really impressed so far. The work flows easily through the hands. So I have a small problem, might be a really small one. We have a costumizeable pavillon. I build the Roof construction for one side of the roof. (it has a repeating triangular form). Then merged the mesh, created six instances and rotated them around the center to place them properbly. The main work is finished (calculation and boolean subtractions). Now I just want to polish the scene with shadows etc. I have already read what to do to sovle the problem with self shadowing (bias value). But what I see now is that the roof parts a illuminated the wrong for me. Please look at the screenshot. Is this right? It looks wrong. I can't say whether this is a bug or I am doing something wrong. Thanks for any help and best regards Kevin
  12. Hi, I have been using Pixi.js for a few months now and I am wondering if it is possible to erase lines drawn on a PIXI.Graphics object. Basically I have some functionality where I am able to draw on a Graphics object on a Sprite using mouse and touch events. My issue is that the sprite has a texture which is not just 1 color. If the texture was blue I would just draw with blue color to "erase" the lines i had drawn earlier with another color. If I was not using Pixi.js I could use the functionality shown here: This eraser functionality is excactly what I need, but I need it in Pixi.js. Is it possible to adapt this same functionality in Pixi.js? Any suggestions or tips would be great.
  13. I need some code explained.

    Hi. I was just rewriting this thing and searching for stuff i don't understand while rewriting it. Here is jsFiddle: . I learned a lot doing so, but there are still a few things I don't quite understand. -why did she use those prototypes? Can't I just put those functions inside the constructors with "this."? Was it to make it less cluttered or something? -why is everything in a function? Is it to "encapsulate" it from other potential code? (I hope I'm using this term correctly) I also know it isn't well optimized/there are things which can be improved (I know the purpose of the presentation wasn't to make it optimized, but finding flaws in it may be a good exercise!). Things I found: -projectiles aren't deleted after flying out of the view. -speed of the game depends on the framerate. Sooo, could someone explain these things to me and maybe find some other flaws? (I would like to strip it out of everything and make some simple games using this)
  14. Hello community. is there a way to handle this type of collisions with tilemaps ?I'm starting with phaser and i couldn't find any similar example
  15. cant get states to work please help

    I have been trying to separate my code into states but no matter what I try the game comes up with a black screen, and an error saying "No state found with the key: playTest " . Here is my code: Thanks for any help this has been bothering me for a while *Note: each colour is a different file (index,load and playTest). Index: <!DOCTYPE html><html> <head><meta charset="utf-8" /><script src="phaser.js"></script><script src="load.js"></script><script src="playTest.js"></script></head> <body> <script> function create() { var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'game'); game.state.add("load",load);game.state.add("playTest",playTest);game.state.start("playTest");};</script></body</html> load: var load = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create}); function preload() {cursors =; //allows keyboard"sky","assets/sky.png");} function create() {"playTest")} play: var playTest = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update,}); function create() {,0,"sky");,16,"test"); = true; //centers = true;; } function update() { }
  16. In my game I want an animation to play when the player collides with a red block and dies. I used the arcade physics system and said a function called gameOver should trigger when the player and a block overlap. The animation I'm using is an explosion, the function then calls for the player to be killed and removed from the canvas and for the explosion sprite to be added and for it's animation to play. The problem is that the function only plays the first frame, I'm assuming this is because either the function only runs once after they overlap or because the player dies and therefore without the player nothing is overlapping and the function stops. Tl;Dr: how do you make a death animation play after a sprite dies Thanks for any help My code: *Note the relevant part is coloured green. var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update,});var Rx = Math.random () * 800; // ball spawns in a random placevar Ry = Math.random() * 600;var Bx = Math.random () * 800; var By = Math.random() * 600;var Gx = Math.random () * 800 var Gy = Math.random() * 600;var colours = ["redBlock","greenBlock","blueBlock"];var colour = colours[Math.floor(Math.random()*2)];var score = 0; var scoreText;var collideCounter = 0;var playerX = 10;var playerY = 10; function preload() {cursors = game.input.keyboard.createCursorKeys(); //allows keyboard"redBlock","assets/red.png");"greenBlock","assets/green.png");"blueBlock","assets/blue.png");"explosion","assets/explosionSheet.png",433,410);"block","assets/block.png");} function create() {; = true; //centers = true;; Rblock =; Rblock.enableBody = true; for (var i = 1; i < 4 ; i++){var RblockT = Rblock.create(i * Rx,i * Ry,"redBlock"); // x and y are randomy coordinates the ball spawns atRblockT.body.velocity.setTo(200,200);RblockT.body.collideWorldBounds = true; RblockT.body.bounce.set(1);} Bblock =; Bblock.enableBody = true; for (var i = 1; i < 4; i++){BblockT = Bblock.create(i * Bx,i * By,"blueBlock"); // x and y are randomy coordinates the ball spawns atBblockT.body.velocity.setTo(200,200);BblockT.body.collideWorldBounds = true; BblockT.body.bounce.set(1);} Gblock =; Gblock.enableBody = true; for (var i = 1; i < 4 ; i++){GblockT = Gblock.create(i * Gx,i * Gy,"greenBlock"); // x and y are randomy coordinates the ball spawns;GblockT.body.velocity.setTo(200,200);GblockT.body.collideWorldBounds = true; GblockT.body.bounce.set(1);} player =,10,"block");;player.body.collideWorldBounds = true;player.scale.setTo(0.2,0.2); explosion =,700,"explosion");explosion.animations.add ("explode",[1,0,2],2,true); scoreText =,16,"Score:0",{ FontSize: "32px",fill: "#CCFFFF"});test =,32,"test:",{ FontSize: "32px",fill: "#CCFFFF"});test2 =,50,"test:",{ FontSize: "32px",fill: "#CCFFFF"});} function update() {,Rblock,gameOver,null,this);,Gblock,addPointG,null,this);,Bblock,addPointB,null,this); function addPointR (player, RblockT){score += 1;scoreText.text = "Score:" + score;RblockT.kill();} function addPointG (player, GblockT){score += 1;scoreText.text = "Score:" + score;GblockT.kill();} function addPointB (player, BblockT){score += 1;scoreText.text = "Score:" + score;BblockT.kill();} function gameOver(){player.kill();explosion =,player.body.y,"explosion");explosion.anchor.setTo(0.5,0.5);"explode");} playerY = player.body.velocity.y; //playerY tracks the y coordinate of the player and is used to tell where the explosion should spawnplayerX = player.body.velocity.x; //playerX tracks the x coordinate of the player and is used to tell where the explosion should spawnplayer.body.velocity.x = 0;player.body.velocity.y = 0; if (cursors.up.isDown){player.body.velocity.y += -200;} if (cursors.down.isDown){player.body.velocity.y += 200;} if (cursors.left.isDown){player.body.velocity.x += -200;} if(cursors.right.isDown){player.body.velocity.x += 200;}}
  17. I want a ball to bounce but my current code isn't working and I don't know why, thanks for any feedback. My Code: * I have made the parts of the code which are relevant green var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update,});var x = Math.floor(Math.random () * 800); // ball spawns in a random placevar y = Math.floor(Math.random() * 600);var text; function preload() {cursors = game.input.keyboard.createCursorKeys(); //allows keyboard"block","assets/block.png");"redBlock","assets/red.png");"greenBlock","assets/green.png");"blueBlock","assets/blue.png");} function create() {; = true; //centers = true;; block =,y,"redBlock"); // x and y are randomy coordinates the ball spawns; player =,10,"block");;player.scale.setTo(0.2,0.2);player.body.collideWorldBounds = true; } function update() { player.body.velocity.x = 0;player.body.velocity.y = 0; block.body.velocity.x += 50;block.body.velocity.y += 50; if(x >{ //if the balls x coordinate is larger than the width of the screen make the x velocity block.body.velocity.x = block.body.velocity.x * -1; //of the ball the opposite of what it is, making it seem like it bounces off of it.} if(x < -{ //if the balls x coordinate is smaller than the width of the screen make the x velocity block.body.velocity.x = block.body.velocity.x * -1; //make it bounce} if(y >{ //if the balls y coordinate is larger than the height of the screen make it bounceblock.body.velocity.y = block.body.velocity.y * -1;} if(y < -{ //if the balls y coordinate is smaller than the height of the screen make it bounceblock.body.velocity.y = block.body.velocity.y * -1;} if(cursors.left.isDown){player.body.velocity.x += -200; } if(cursors.right.isDown){player.body.velocity.x += 200;} if(cursors.down.isDown){player.body.velocity.y += 200;} if(cursors.up.isDown){player.body.velocity.y += -200;}}
  18. How to set up Phaser in Brackets IDE

    I downloaded Brackets and opened my files in it, but once I open the html file the canvas is all black and two errors come up. These are, error 1: Failed to load resource: the server responded with a status of 400 (Bad Request) and error 2: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://127') does not match the recipient window's origin ('http://127'). *note: I took out some of the numbers in the brackets of the second error since it displays personal data regarding the server. Thanks for any help
  19. Is a local web server like cloud9 necessary to code in phaser? I heard about it recently but up until now i have simply been opening the canvas on my web browser and everything has been working fine. I dont use anything like cloud9 to run my code and havent had any problems. But even the phaser setup talks about downloading a local web server. So ultimately im confused, do we really need one, and if so why. I dont seem to have any problems just coding and opening it in my browser.
  20. problem with code please help

    I'm trying to have my sprite jump, and the conditions are if he is on the floor and if I'm pressing the up key. But he wont jump even when he's on the floor. When taking "player.body.touching.down" out of the code the sprite jumps so I'm assuming something in my code is interfering with hit detection between the player and the ground. Here is the code: (I have coloured the part of the code which I assume is the problem and anything that is relevant green) Any help is greatly appreciated var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update,});var rightCounter = 0;var leftCounter = 0;var score = 0;var scoreText;var obstacles;var highScore = 0;var highScoreText;var x = 50;var y = -50; function preload() {cursors = game.input.keyboard.createCursorKeys(); //allows keyboard inputgame.load.spritesheet("doggie","assets/doggie.png",32,32);game.load.image("treat","assets/cookie.png");game.load.image("sky","assets/sky.png"); game.load.image("platform","assets/platform.png");game.load.spritesheet("boulder","assets/boulderComplete.png",95,96);} function create() {game.physics.startSystem(Phaser.Physics.ARCADE); = true; //centers = true;; game.add.image(0,0,"sky");scoreText = game.add.text (350,16, "Score:" + score, { fontSize: '32px', fill: '#ffffff' });highScoreText= game.add.text (16,16, "Highscore:" + highScore, {fontSize: "11px", fill: "#ffffff" }); ground =; ground.enableBody = true; var platform = ground.create(0, - 30,"platform");platform.body.immovable = true;platform.scale.setTo(3,1) treat = game.add.sprite(200,0,"treat");game.physics.arcade.enable(treat)treat.body.gravity.y = 300; treat.body.bounce.y = 0.2; treat.body.collideWorldBounds = true; treat.scale.setTo(0.2,0.2); player = game.add.sprite(300, - 100,"doggie"); game.physics.arcade.enable(player);player.body.gravity.y = 480; player.body.bounce.y = 0.2; player.body.collideWorldBounds = true; player.animations.add ("left",[0,1],5,true)player.animations.add ("idleLeft",[1],5,true)player.animations.add ("idleRight",[2],5,true)player.animations.add ("right",[2,3],5,true) boulder = game.add.sprite(100,-10,"boulder"); game.physics.arcade.enable(boulder);boulder.body.gravity.y = 1000; boulder.body.bounce.y = 0.2; } function update() {player.body.velocity.x = 0; if (cursors.left.isDown){ player.body.velocity.x = -300;"left");leftCounter += 1;rightCounter = 0;} else if (cursors.right.isDown){ player.body.velocity.x = 300;"right");leftCounter = 0; rightCounter +=1; }else if (cursors.up.isDown){player.body.velocity.y = -200;"idleLeft"); // This is the part of the code that doesn't work}else if (leftCounter > 0) {"idleLeft")}else if (rightCounter > 0){"idleRight")}if (highScore<score){ highScore = score;highScoreText.text = "Highscore:" + highScore;}else {highScoreText.text = "Highscore:" + highScore;} function eatTreat() {treat.kill()treat = game.add.sprite (Math.floor(Math.random()*800),0,"treat")game.physics.arcade.enable(treat)treat.body.gravity.y = 300; treat.body.bounce.y = 0.2; treat.body.collideWorldBounds = true; treat.scale.setTo(0.2,0.2);score += 1;scoreText.text = "Score:" + score;} function boulderReset(){boulder.kill();boulder = game.add.sprite(Math.floor(Math.random() * 800),-10,"boulder"); game.physics.arcade.enable(boulder);boulder.body.gravity.y = 1000; boulder.body.bounce.y = 0.2; } function gameOver(){score = 0;scoreText.text = "Score:0", score;} game.physics.arcade.overlap(player,treat,eatTreat,null,this);game.physics.arcade.overlap(boulder,ground,boulderReset,null,this);game.physics.arcade.overlap(boulder,player,gameOver,null,this); game.physics.arcade.collide(player,ground);game.physics.arcade.collide(treat,ground);game.physics.arcade.collide(boulder,ground);}
  21. Hi, I'm a beginner with Phaser and Javascript and have been learning by playing around with the wonderful Game Mechanic Explorer (by John Watson @yafd) I noticed in the double jump example that on mobile (iphone) double jumping wasn't working. I'm not going to paste in all the code just the code I think deals with the issue. // Set a variable that is true when the player is touching the ground var onTheGround = this.player.body.touching.down; if (onTheGround) this.canDoubleJump = true; if (this.upInputIsActive(5)) { if (this.canDoubleJump || onTheGround) { // Jump when the player is touching the ground or they can double jump this.player.body.velocity.y = this.JUMP_SPEED; // Disable ability to double jump if the player is jumping in the air if (!onTheGround) this.canDoubleJump = false; } }// This function should return true when the player activates the "jump" control// In this case, either holding the up arrow or tapping or clicking on the center// part of the screen.GameState.prototype.upInputIsActive = function(duration) { var isActive = false; isActive = this.input.keyboard.justPressed(Phaser.Keyboard.UP, duration); isActive |= ( + 1000/60) && > && < +; return isActive;};From what I gather is that if (this.upInputIsActive(5)) condition is never met on mobile. My question is why doesn't this work on mobile and if someone could point me in the right direction to solve this so it does work on mobile. Thanks!
  22. Embedding game in website?

    Hello, I've made a game in phaser. It's all in a html file with the assets folder next to it. Now how do I actually put it on my website that is hosted on Google Sites? I'm very new to web development. Thanks.
  23. Hello! I'm puzzling through how one would use an Entity-Component System with Phaser. Normally, I'd add a Sprite component to an Entity, but Sprites in Phaser are kind of like entities, in that they are more than just a texture. Also, Sprites are added to the Game, which then handles rendering them. Normally an ECS-style System would handle their display, so I'm feeling a bit lost. How do I use an ECS with Phaser? Specifically, I'm trying to use ces.js, but if someone has a better library, let me know! Thanks!
  24. Cannot view sprite render/debug

    Hello again everyone. I'm having trouble with trying to look at my characters collision box. I was looking at this example and I implemented the offset collision to my character, the problem is viewing how it looks like just like in the example. I am currently using the basic template provided on Github, and it doesn't seem to incorporate a render function. I tried to add one, but I kept getting errors.
  25. Hello everyone. Recently I uploaded my game on the web using cocoonJS. I got the email momentarily and (I do not know if I was suppose to do this or not) I tried to click the link using my phone's email client. The link lead to a blank page. I was using an iphone at the time for testing purposes. I don't know if my file structure inside the ZIP was organized in a way to work or not, because the game runs fine on a desktop. Can anyone tell me how they prepared their ZIP file for cocoonJS and how your file structure looks like? Also was it wrong to open the link within the phone? Thank you all in advance.