Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Hey, I am trying to use a texture atlas that comes with xml and not json. its actually one from kenny nl's free assets, which seems to come with xml only. i cant find a phaser example which loads an xml, and if i convert the xml to a json using an online converter, the json is formatted wrong ( " Atlas JSON Hash given, missing 'frames' Object" ) thanks
  2. thanks, that sounds like its exactly what i need to look into
  3. I have been working on a game in javascript, and I'm stuck as to how to handle saving and loading. I want to ultimately publish it both as an online browser game and as a downloadable desktop application (which I'd do with electron). But for now it is just a browser game. You can see it here by the way on my github page: https://jpchaufan.github.io/ What I have going now is not really working. I tried using local storage. The problem is that the game is kind of minecraft-like, in that it has an infinite world, that keeps generating as you walk around. When I stringify the worl
  4. Thanks MTiger, that solution worked, just increasing the tile bias, like this: this.game.physics.arcade.TILE_BIAS *= 2; This article here explained why, in case anyone is interested: http://thoughts.amphibian.com/2016/02/dont-fall-through-tile-bias-in-phaser.htm
  5. I m building a little platformer-type game and am having this problem: When the player is moving really fast, (basically when he falls a large distance) he no longer collides with stuff, and falls right through the floor. This problem comes up when I switch from making regular sprites in a group for floors and platforms, to loading in a tilemap from Tiled. I also notice a change, which is my only hint that something is working differently with the physics - the sprite's body.touching property no longer reads, and instead body.blocked now reads. So for example, if I let the player j
  6. so i have a game where there are different enemies who look different and so have different spritesheets. and i have a pool of objects mechanism to recycle the dead enemy objects into new ones, kinda like this: var enemy = this.state.enemies.getFirstDead(); if (!enemy){ enemy = new MyGame.Enemy(this.state, cords.x, cords.y, data); this.state.enemies.add(enemy); } else { enemy.reset(cords.x, cords.y, data); } so the problem is like this: sprites are not properly having their animations changed from their old selves to their new selves. th
  7. thanks for the help tom, it worked out when I made all the frames the same size and then adjusted the collision box specially for frames like duck, like you said
  8. ok but then how would i deal with the smaller pictures that get a bunch of extra space added to their collision box? all the smaller frames will collide before the image actually touches
  9. I am running into all sorts of trouble when animating sprites with frames of different dimensions. I mean like if frame 1 of a walk animation is 30x35 and frame 2 is 38x38, for example, i have a problem keeping the sprite level with the floor. it will either fall through the floor, or be up in the air. I have tried to set the anchor y point to 1 so that it stays level with the ground, this would be ideal if it worked I have tried using setSize to try and keep the sprite object's dimensions fixed throughout the animation, not as ideal of a solution but it didnt work anyways.
  • Create New...