Ansimuz

Members
  • Content Count

    28
  • Joined

  • Last visited

About Ansimuz

  • Rank
    Member

Contact Methods

  • Twitter
    ansimuz

Recent Profile Visitors

972 profile views
  1. Ansimuz

    Parallax Background

    In phaser 2 to simulate parallax background when the camera moved I used: background.tilePosition.x = this.layer.x * -0.2; Heres the complete logic in Phaser 2 // create globalMap = game.add.tilemap("map"); globalMap.addTilesetImage("tileset"); this.layer = globalMap.createLayer("Tile Layer 1"); this.layer.resizeWorld(); background = game.add.tileSprite(0,0, gameWidth, gameHeight, "background"); background.fixedToCamera = true; // update background.tilePosition.x = this.layer.x * -0.2; How would be the best way to do it in Phaser 3? parallax_bg.tilePositionX = ?
  2. Ansimuz

    setTileIndexCallback context

    I just figure it out! I put the setTileIndexCallback outside the SlugPrototype and inside the create state. As I read here: http://www.html5gamedevs.com/topic/1471-how-to-handle-collision-between-sprite-and-tilemap/
  3. Ansimuz

    setTileIndexCallback context

    I'm trying to change the velocity of an object with a callback from "setTileIndexCallback" but with no luck. I can read its body velocity but cannot set it. Slug = function (game, x, y) { x *= 16; y *= 16; Phaser.Sprite.call(this, game, x, y, "atlas", "slug/slug-1"); this.animations.add('crawl', Phaser.Animation.generateFrameNames('slug/slug-', 1, 4, '', 0), 10, true); this.animations.play("crawl"); this.anchor.setTo(0.5); game.physics.arcade.enable(this); this.body.setSize(20, 11, 7, 10); this.body.gravity.y = 500; this.body.velocity.x = 40; this.body.bounce.x = 1; globalMap.setTileIndexCallback(3, function(){ console.log(this.body.velocity.x); this.body.velocity.y = -50; }, this); } Slug.prototype = Object.create(Phaser.Sprite.prototype); Slug.prototype.constructor = Slug;
  4. Hello World, I'm a pixel Artist and Game Designer sharing my work for the #gamedev sake. I just released a Free Public 2D Platform Pixel Art Pack for everyone. Check it out I even made an online Demo made with Phaser so you can see it in action: http://pixelgameart.org/demos/sunny-land/ Download this Pack at my site where I will be posting each month a Public Pixel Art Pack (code included): http://pixelgameart.org/web/portfolio/sunny-land/ Cheers and happy #gamedev
  5. Ansimuz

    Anti-alias when scaled. How to get crisp Pixels?

    @Imerso Thank you. I couldn't make it work, I'm really new to phaser and didn't know how to implement it. But... I found a solution rather easy. I just added a css rule to the canvas element like this: canvas { image-rendering: -moz-crisp-edges; image-rendering: -webkit-crisp-edges; image-rendering: pixelated; } Heres the original source: https://belenalbeza.com/retro-crisp-pixel-art-in-html-5-games/
  6. Hi, What's the best approach to avoid anti-alias (blurred pixels) when i scale my game? Thanks.
  7. Ansimuz

    Collision between entity and map not working

    Ohh that solved the issue. It was a logic problem after all. the game.physics.arcade.collide never executed because of the alive condition. Thanks Samme.
  8. Ansimuz

    Collision between entity and map not working

    Thanks Kseiver. Here's the url of the buggy game. http://ansimuz.com/phaser/first-game/ I cant see the issue. Seems like I'm not entering the parameters for game.physics.arcade.collide Correctly. game.physics.arcade.collide(this.player.sprite, this.layer);
  9. Ansimuz

    Collision between entity and map not working

    It doesn't throw any error. It just doesn't collide. the player goes thorugh as it there was not floor while falling.
  10. Hi, I'm learning phaser and got this issue. The collision between the player and the map is not working since I moved the player to its own file (player.js) as an object Im calling this in the update function on the play.js game.physics.arcade.collide(this.player.sprite, this.layer); I'm creating the tile map in the play.js createWorld: function () { this.map = game.add.tilemap('map'); this.map.addTilesetImage('tileset'); this.layer = this.map.createLayer('Tile Layer 1'); this.layer.resizeWorld(); this.map.setCollision(1); }, Here's the player.js file function player() { this.preload = function () { }; this.create = function () { this.sprite = game.add.sprite(game.width / 2, game.height / 2, 'atlas', 'player01'); this.sprite.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(this.sprite); this.sprite.body.gravity.y = 500; this.cursor = game.input.keyboard.createCursorKeys(); }; this.update = function () { }; } Originally the collision worked well before putting the player in a different file, but I can't make the collision work now.
  11. Ansimuz

    RPG Pixel Art Assets for FREE!

    You are welcome
  12. Ansimuz

    RPG Pixel Art Assets for FREE!

    Hey, Just released a new Pixel Art Assets Pack perfect for RPG or adventure games. It contains fully animated spritesheets and a whole Town Tile Map. Feel free to download it here: http://ansimuz.com/site/archives/752 No attribution required but appreciated it.
  13. Ansimuz

    [Impact] Started an HTML5 dev tutorial series

    Just released part 3 of my series on Impact: Your First HTML5 game using ImpactJS – part 3
  14. Ansimuz

    Looking for Game Art assets for FREE?

    Yeah i been working fulltime on this project. Spread the word.
  15. Hey, I am sharing a pack containing spritesheets, map tiles and a few sounds. It's completely FREE under the Do what the fuck you want license. Perfect for prototyping your games. Check it out: http://ansimuz.com/site/archives/606