nak3ddogs

Members
  • Content Count

    77
  • Joined

  • Last visited

Everything posted by nak3ddogs

  1. pls help. this.generated.context = this.layer1.generateTexture( 1, Phaser.scaleModes.DEFAULT ,Phaser.AUTO); i tryed everything.
  2. hi! how can i use a frame of atlas for tilemap's tileset image? i cant? i have to copy out and make a new bitmapdata and use that? pls.
  3. what is the renderer and resolution property of the generateTexture function?
  4. helo. i want convert a i tilemap into tile sprite for my menu background. this.map = this.game.add.tilemap('tilemenu');this.map.addTilesetImage('tile','tileimage', 24, 24, 0, 0);this.layer1 = this.map.createLayer('Tile Layer 1');this.generated = this.layer1.generateTexture(); this.generated.dirty = true; this.testImage = this.add.tileSprite(0, 0, this.game.width, this.game.height, this.generated);i have no clue what is wrong.
  5. sry but i think this method is too complicated and need too much work. on a simple game btw your solution is nice
  6. helo. i tryed to make a pause screen. the problem is when i set this.game.paused = true, the whole game will be paused and i cant use animation and lots of function. my second try was a state over the lvl1 state and it could be work, but the new problem is: i only can pause the whole game and cant pause just a state. any idea? ty for advice
  7. hi! i would blur only the bottom of the game world. how can i do it? i thinked the best method is make a bitmapdata what is a screenshot of the game and after blur this and mask. but i no idea how to make a screenshot. it is the UI what i would make
  8. pause screen tools for animation and tween. to make a nice ui
  9. i thinked i can use the pixi filters natively
  10. hi! how can i use pixi filter? it wont work for me: this.grayFilter = new PIXI.GrayFilter(); this.aluljaro.filter = [this.grayFilter];i got this in console:Uncaught TypeError: undefined is not a function i thinked pixi have implemented pixi can i apply blur on the whole game? ty for any advice
  11. helo. when i set collision for a tile and i set setTileIndexCallback for the same tile, the collision will not work. do u know any method?
  12. change delta time when u have too fast sprite.
  13. hi! i had to rework my whole tiled map after updated the phaser.js. i wasted hours and after i found the problem. when in tiled i create a new map it is have option to choose layer format. i think first time i used base 64 but now the csv have worked for me. what are these formats? i save in json format
  14. Hi! Can i use animation or tween on "paused"? Destroy and create and visible is work on pauseupdate. So when i cant make a simple animation then i will make a counter and an array with images and i will change animations with use visible property and counter. When i make a tween at pause the tween is conter but not visible. Can i set a tween or sprite to update on pauseupdate and not on normal update? Sry for terrible english
  15. Phaser.Sound.fadeIn.prototype = function (duration, loop, customVolume) { if (typeof duration === 'undefined') { duration = 1000; } if (typeof loop === 'undefined') { loop = false; } if (typeof customVolume=== 'undefined') { customVolume= 1; } if (this.paused) { return; } this.play('', 0, 0, loop); var tween = this.game.add.tween(this).to( { volume: customVolume }, duration, Phaser.Easing.Linear.None, true); tween.onComplete.add(this.fadeComplete, this); },is it possible? im rly newby. pls help with syntax
  16. hi! the sound fadeIn(duration, loop)look like a good option but is is unusable for me when i cant set the end volume. in the docs i not see option for that but in my game the player can set music volume. someway can i solve this problem? ty for any advice
  17. okey i solved but it is not a nice solution. i made a global var(mainmenuhelper = false) at the mainmenu create function's start i check if (mainMenuHelpBoolean == true) { mainMenuHelpBoolean = false; console.log(mainMenuHelpBoolean) this.state.restart(); };and when i want to go back to main menu i use the global var if (this.life <= 0) { mainMenuHelpBoolean = true; this.game.game.state.start('MainMenu', false, false); };and now the groups are work
  18. nobody know how can i reset a group?
  19. Hi! pls help with state restart. i wanna switch back from game to main menu. after the switchback the groups of mainmenu are not exists. this.game.game.state.start('MainMenu', true, false); this.menu_group = this.add.group(); this.menu_group.add(this.bg_popup); this.menu_group.x = this.world.centerX; this.menu_group.y = this.world.centerY-10; this.add.tween(this.menu_group).to({y:this.world.centerY+10}, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 10000, true); this.menu_items_group = this.add.group(); this.menu_group.add(this.menu_items_group); this.alap_group = this.add.group(); this.options_group = this.add.group(); this.credits_group = this.add.group(); this.menu_items_group.add(this.alap_group); this.menu_items_group.add(this.options_group); this.menu_items_group.add(this.credits_group);ty for any advice
  20. okey. i found a solution. it will be okey for me in the first game. sooo.... this.game.physics.arcade.collide(this.game.player.sprite, this.platform5group, function(obj1, platform){ obj1.x += platform.deltaX; }, null, this)not too complicated
  21. When u Use tween on body, calculate the velocity from repositioning. It would be cool.
  22. Hi! First of all sry for my terrible english. I done a perfect method for me to move platforms with tween and i read the platforms's properties from the tiledmap json. The problem is coz i tween the sprite.x it is a repositioning and not a moving. But i wont tween the velocity coz this work pixel perfectly and i would use the quadratic easing I tryed this code but i not finished yet and it is not perfect. Somebody have a idea for better solution? My idea: make a invisible point tween this object and use acceleratetoobject method. I not tryed yet this.platform5group = this.game.add.group();this.platform5group.enableBody = true;this.platform5group.physicsBodyType = Phaser.Physics.ARCADE;this.game.map.createFromObjects('objects', 786, 'platform5', null, true, false, this.platform5group);this.platform5group.forEachExists(function(platform){if (typeof platform.xmove === 'undefined') { platform.xmove = 0; }if (typeof platform.ymove === 'undefined') { platform.ymove = 0; }if (typeof platform.blink === 'undefined') { platform.blink = false; }if (typeof platform.b_delay === 'undefined') { platform.b_delay = 0; }if (typeof platform.b_vis === 'undefined') { platform.b_vis = 1500; }if (typeof platform.b_hid === 'undefined') { platform.b_hid = 1500; }if (typeof platform.dest === 'undefined') { platform.dest = false; }if (typeof platform.d_out === 'undefined') { platform.d_out = 2000; }if (typeof platform.d_in === 'undefined') { platform.d_in = 2000; }if (typeof platform.allface === 'undefined') { platform.allface = false; }if (typeof platform.wait === 'undefined') { platform.wait = 0; }if (typeof platform.speed === 'undefined') { platform.speed = 1; }platform.tween_blink_out = null;platform.tween_blink_in = null;platform.body.immovable = true;if (platform.allface == false) {platform.body.checkCollision.right = false;platform.body.checkCollision.down = false;platform.body.checkCollision.left = false;}if (platform.xmove != 0 || platform.ymove != 0){this.game.add.tween(platform).to({x:platform.x+(platform.xmove*24), y:platform.y+(platform.ymove*24)}, Math.abs(platform.xmove+platform.ymove)*50/platform.speed, Phaser.Easing.Quadratic.InOut, true, platform.wait, Number.MAX_VALUE, true);}if (platform.blink) {platform.tween_blink_out = this.game.add.tween(platform);platform.tween_blink_out.to({alpha: 0}, 400, Phaser.Easing.Quadratic.Out, false, platform.b_vis, false).onComplete.add(function(){platform.tween_blink_in.start();platform.body.enable = false;},this);platform.tween_blink_in = this.game.add.tween(platform);platform.tween_blink_in.to({alpha: 1}, 400, Phaser.Easing.Quadratic.Out, false, platform.b_hid, false).onComplete.add(function(){platform.tween_blink_out.start();platform.body.enable = true;},this);platform.tween_blink_in.start();};},this);}, //end of createupdate: function () {this.game.physics.arcade.collide(this.game.player.sprite, this.platform3group);this.game.physics.arcade.collide(this.game.player.coinGroup, this.platform3group);this.game.physics.arcade.collide(this.game.player.sprite, this.platform5group, function(player, platform){player.x += platform.x - this.contactPoint;this.contactPoint = platform.x;}, null, this);this.game.physics.arcade.collide(this.game.player.coinGroup, this.platform5group);}, //end of update
  23. ty for straight answer. can u help me pls, when i use shoebox what is the ideal export option? is this the method for load the atlas in preload? game.load.atlas('sprites', 'assets/sprites.png', 'assets/sprites.js');