Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Can't handle more than one spritesheet? I'm fairly certain that there is no such limit. My project uses at least three spritesheet atlases and five different tilesets. Can you please show us what errors are logged when you try to load more than one spritesheet?
  2. As usual, I will begin with my tilemap: As you can see I added three objects that I want to use in my map as triggers. This is the object layer called Triggers in tiled. I did not change my loading code because I assumed that you don't have to load the object layer: constructor(game: Phaser.Game, key: string, manifest: any) { super(game, key); this.addTilesets(manifest.maze); this.wallLayer = this.createLayer(this.WallsLayer); this.backgroundLayer = this.createLayer(this.BackgroundLayer); this.shadowLayer
  3. I know this is from the now more-or-less defunct XNA framework, but luckily code doesn't stagnate. If you have some C# chops, why not try reading the source code for their sample "Input Sequence" which is a demonstration of doing just what you asked. It shouldn't be too hard to port their example to Phaser, I believe. http://xbox.create.msdn.com/en-US/education/catalog/sample/input_sequence_sample
  4. If you're okay with an alternative programming language that is close to ActionScript, checking out Haxe might be worth your while. They have some good UI libraries to use with HaxePunk, HaxeFlixel or Flambe. Maybe check around there?
  5. Lewster, are you sure? It looks as if most of the game is taking place in a canvas. I don't see why such games cannot be implemented in Phaser and complemented with a website built with Ember, or others. The only obstacle I see is that Phaser doesn't have premium networking support, and that could be relatively difficult to implement. Of course, I'm still new to Phaser as well and *very* green around the ears. I would very much like to hear your reasoning for considering Phaser as a less viable choice compared to other implementation strategies.
  6. Hello, I'm currently writing a little roguelike and I was presented with the same problem. Make the player move, but respect collisions. I ended up not using overlap or collision detection from the tilemap, but do the checks myself. It's easier than it sounds. Let's take a look at my map. A lot of the magic happens in the Tilemap; I extended the Phaser.Tilemap with a bunch of extra functionality. For example, in Tiled I have five layers: Walls (collision layer), Background, Items, Objects, and Creatures The blue knight, the drow and the blue ghost are creatures in the creature laye
  7. I have now submitted a request to investigate the issue regarding the incorrect .json file. You can find it here if you're interested: https://github.com/bjorn/tiled/issues/831
  8. Because of the proprietary tileset, I was not able to create a sample demonstrating the bug. However, it should be done, you are right. I'll send Riddick a message and ask him for the faulty tileset and I'll open a ticket.
  9. iirc, this is an issue with Tiled, not Phaser. You can see more details in my post regarding the issue (http://www.html5gamedevs.com/topic/10192-tiledmap-loaded-with-incorrect-tiles/). tl;dr: I noticed that the .json file was consistently off by about 1 tile per row. This increased the further down the tile was in the tileset image.
  10. Thanks for the heads-up! Yeah, I figured that I was trying to abuse the Phaser States. I've since refactored Player, Enemy and Animating into SubStates that my InGame state controls. Works a lot better that way, and I don't have to destroy or recreate the SubStates.
  11. Oh yeah, I had this problem as well. What worked for me is re-cutting the spritesheet. Are there any empty rows/columns in the the spritesheet? Remove all of those.Once I had a uniform spritesheet without gaps, the ids lined up with the proper tiles.
  12. Hello, I'm programming a roguelike and I've divided the main game into three distinct states: PlayerTurn, Animating, EnemyTurn. I do this to separate game logic and not have a humongous God class. Each state calls the other in a loop: PlayerTurn -> Animating -> EnemyTurn -> Animating -> PlayerTurn PlayerTurn: update() { var keyboard = this.game.input.keyboard; for (var inputCommand in this.actionMap) { var keyCode = toKeyCode(inputCommand); if (keyboard.isDown(keyCode)) { this.act
  13. Hello, I'm adding some extra functionality to the Phaser.Tilemap class and I've recently converted my loading code to use the new-ish Asset Pack feature. All of my tilemaps are loaded in sections like so: { "maze": [ { "type": "tilemap", "key": "maze", "url": "assets/tilemaps/maps/Maze.json", "data": null, "format": "TILED_JSON" }, { "type": "image", "key": "creatures_tileset", "url": "assets/tilemaps/tiles/Creatures.png" }, { "type": "image",
  14. I guess it's because it's a raster image and blowing up a .jpeg will blur the edges of your tileset. Can you vectorize the tileset, then try increasing the scale?
  15. Hello lastnightsparty, thank you for your input! It steered me in the right direction. First, Tiled does not export the transparent background color. If your tiles have a black background, Tiled will respect that in the editor but not export it. Phaser will then pick up the tiles and render them with a black background. Secondly, and this is largely my mistake, I used the wrong tileset image. Oops Thanks for the help!
  • Create New...