bilginhalil

Members
  • Content Count

    11
  • Joined

  • Last visited

About bilginhalil

  • Rank
    Member

Contact Methods

  • Twitter
    bilginhalil
  1. @aldehitdevelop Ciddi :)) Bir vps açtım kullanıyorum şuan.

  2. UHAL'in en kral hocalarını belirliyoruz. Oy vererek fikrinizi belirtin!! :) https://t.co/CcjTr0mS6m

  3. bilginhalil

    Phaser problem while collision to the ledge

    Setting anchor to (0.5, 1) amazingly solved the problem. Thanks. )) Should i set the body width or height of a player or ledges ? Is it neccessary?
  4. bilginhalil

    Phaser problem while collision to the ledge

    Is there anyone who has an idea about it?
  5. Here is my preload function function preload() { game.load.atlas('soldier1', 'assets/spritesheets/soldier4_full.png', 'assets/spritesheets/soldier4_full.json', Phaser.Loader.TEXTURE_ATLAS_JSON_HASH); game.load.image('desert', 'assets/images/desert.png'); game.load.image('desert_ledge', 'assets/images/desert_ledge.png');} And this is create function create() { game.physics.startSystem(Phaser.Physics.ARCADE); map = game.add.sprite(0, 0, 'desert'); // The platforms group contains the ground and the 2 ledges we can jump on platforms = game.add.group(); platforms.enableBody = true; ledges = [ [0.5, 0.6, 70, 499], [0.5, 0.6, 330, 499], [0.5, 0.6, 600, 499], [0.8, 0.6, 290, 274], [0.5, 0.6, 150, 389], [0.5, 0.6, 500, 389], [0.5, 0.6, 500, 163], [0.5, 0.6, 150, 163], ]; ledges.forEach(function(info){ var ledge = platforms.create(info[2], info[3], 'desert_ledge'); ledge.body.immovable = true; ledge.scale.setTo(info[0], info[1]); }); player = game.add.sprite(50, 150, 'soldier1'); player.anchor.setTo(.5, .5); player.enableBody = true; game.physics.arcade.enable(player); // Player physics properties. Give the little guy a slight bounce. player.body.bounce.y = 0.2; player.body.collideWorldBounds = false; //player.body.setSize(player.body.width*0.7, player.body.height); player.frameName = 'Idle__000.png'; setAnimations(); player.animations.play('walk'); player.body.gravity.y = 700; cursors = game.input.keyboard.createCursorKeys();}Finally here is update function update() { game.physics.arcade.collide(player, platforms, null, function(player, ledge){ if(cursors.down.isDown) { console.log('down'); return false; } if(player.body.velocity.y < 0) return false; return true; }, this); // Reset the players velocity (movement) player.body.velocity.x = 0; if (cursors.left.isDown) { // Move to the left player.body.velocity.x = -150; if(player.scale.x > 0) { player.scale.x *= -1; } if(player.body.touching.down) player.animations.play('walk'); } else if (cursors.right.isDown) { if(player.scale.x < 0) { player.scale.x *= -1; } // Move to the right player.body.velocity.x = 150; if(player.body.touching.down) player.animations.play('walk'); } else { if(player.body.touching.down) player.animations.play('idle'); } if (cursors.up.isDown && player.body.touching.down) { player.body.velocity.y = -420; player.animations.play('jump'); }}Now When I start the game there is a space between player and ledge which i don't want to exist If i change spritesheet to another atlas space reduces I think this is not about atlas files because when i debug sprites it seems that character doesn't have any padding. So how can i get rid of this problem ? Where am i missing ? Thanks in advance.
  6. bilginhalil

    Examples in examples.phaser.io

    i think that was about my browser (chrome) . Almost of physics examples wasn't working(like quadtree - collision infos). but now it seems like they are okay.
  7. bilginhalil

    Examples in examples.phaser.io

    Hello , almost of examples in examples.phaser.io doesn't work. :/ is there anyone who fix that problem?
  8. bilginhalil

    Collision detection issues

    Actually, my problem is not solved yet :/ . I am making a game like hockey . user score a goal with dragging itself into the ball to bring forward the ball. I use collide function. but when users stick touches the ball , stick and ball enter to each other like your bird and rocks (is it bird or bee? ).
  9. bilginhalil

    Collision detection issues

    we have same problem but there is no solution yet :/ . we are waiting an administrator or something
  10. bilginhalil

    Confusing collision

    i have same problem :/ . it seems like administrators don't want to answer.
  11. bilginhalil

    How to detect collisions while dragging a sprite?

    so how can i use it ? game.physics.collide(); is not working :/ i need something like @Mario
  12. can you help me about that issue http://www.html5gamedevs.com/topic/3132-how-to-detect-collisions-while-dragging-a-sprite/#entry27882
  13. bilginhalil

    How to detect collisions while dragging a sprite?

    when will you integrate p2.js ?