-
Content Count
118 -
Joined
-
Last visited
Everything posted by shohan4556
-
Hi, I just open sourced my game "Fuzzle" the game I made with PhaserJs and published on play store, hope the source code may help somebody. github repo
-
I think your code is ok, your state is changed, every state by default has a black background color. try to print which state it after clicking console.log(game.state.getCurrentState()); // it will print the current state.
-
I am also following this post curious to know the solution
-
Hi, I have made this just now , please have a look making health bar
-
collideCallback objects being passed are undefined
shohan4556 replied to KonceptZer0's topic in Phaser 2
I think your platforms group did not have any arcade physics. So that its didn't found the body property. try this , var platforms = game.add.group(); platforms.enablebody = true; then try again. -
Choose 1 random sprite in a group with a particular property
shohan4556 replied to fitness23's topic in Phaser 2
you can try something like this, var mychild = myGroup.getRandom(); if(mychild.attackZone==true){ // do stuff } or try this Phaser.ArrayUtils.shuffle(myGroup); // shuffle group here myGroup.updateZ(); // apply the changes myGroup.forEach(function(enemy){ if(enemy.attaxkZone==true){ // dostuff // break } }); Hope this helps. -
I think tween have the delay property. tween.to(properties, duration, ease, autoStart, delay, repeat, yoyo) : and tween have the method tween.repeatDelay(duration); you can use this.
-
Hi, how to play this game.
-
your code seems ok I think you need to set cloud anchor point 0.5. like this this.clouds.setAll('anchor.x', 0.5); this.clouds.setAll('anchor.y', 0.5);
-
I have used arcade physics so many times and it works fine for mobile devices. you can try crosswalk to wrap your game its good.
-
may be this size of the image is not power of two if it is 529px then make it 512px and now it should work fine.
- 4 replies
-
- phaser frameworks
- image
-
(and 2 more)
Tagged with:
-
what is the control to play this game no instruction here and there also.
-
what is rule to play this game.
-
Hi, I have create a simple tilemap using tiled editor the map has just single layer but when I tried to collide my player with tilemap then this wired problem happened. Sometimes my player collide correctly sometime it overlapping. pic more more details understanding. here is the minimal code for full project https://github.com/shohan4556/Cowboy-Shooter/tree/master/script MyGame.playState.prototype = { create: function () { console.log(game.state.getCurrentState()); this.game.physics.startSystem(Phaser.Physics.ARCADE); this.map = this.game.add.tilemap('tilemap'); this.map.addTilesetImage('sheet','tileset'); // create the layer this.layer = this.map.createLayer(0); this.layer.resizeWorld(); this.map.setCollisionBetween(0, 133); }, update: function () { this.game.physics.arcade.collide(this.player, this.layer); }, the first image is overlapping and the second image is colliding with the tile. it happens randomly when I move my player around.
-
you can separate your prefabs code in different js files and call them when need.
-
what will be the canvas_height_max and canvas_width_max size ?
-
what I have to do at this point ?
-
[Help] Collide same sprite with different image
shohan4556 replied to shohan4556's topic in Phaser 2
I dont understand why isPointPath can do this. I want to do with Phaser. is there any way to do it with Phaser. -
Hello, fellows I am making a color games and I am struggling to implement the idea pleas take a look the image attachment. I want to collide the red square with red block and yellow with yellow blocks. thanks.
-
are you making this game without any framework ?
-
really impressive game I like this game very much. I have already share this game with my friends. one question how did you adjust music ?
-
nice game. How did you wrap the game cordova, coconjs or crosswalk ?
-
game.world.enableBody = true; not working on groups?
shohan4556 replied to noway's topic in Phaser 2
this.mygroup = this.game.add.physicsGroup(Phaser.Physics.ARCADE); this.mygroup = this.create(xx,yy,'mysprite'); yes you have to enableBody = true if you use game.add.group(); If you use physicsGroup then it does not required enableBody = true because its enabled by default. -
phaser [Help] Different sprite position problem for mobile devices
shohan4556 replied to shohan4556's topic in Phaser 2
I tried your code but I dont know why its not working. The scaling method you showed here I had used my project before it just scale game objects but the position problem is still happening.