Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by SoulBeaver

  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!
  16. Hello tsphillips, it turned out to be something of that nature. I'm not sure why, but every row added 1 to an offset that then rendered my tiles incorrectly. For some reason, Tiled doesn't handle Tilemaps with gaps very well. I had a spritesheet similar to the one below: I say "similar" because this tilemap works fine in Tiled. Since my tileset is proprietary and I cannot distribute it due to the license, I cannot release the full, faulty tileset. Solution: Cut out the whitespace. I split the humongous tileset into five smaller tilesets with no gaps and now it works fine.
  17. Hello, I'm currently working on a tilemap as well, so I'll try to be of some assistance if possible. First, you're not resizing the map to fit the backgroundLayer, which you probably should do. bglayer.resizeWorld();Second, make sure you enable the physics system at the start of the game: game.physics.startSystem(Phaser.Physics.ARCADE);I'm not sure if this step is necessary, but I specified the body size for my player sprite player.body.setSize(24, 24);Let me know if any of those steps help in resolving the issue. If not, we can try digging a little deeper.
  18. Hello, I (re)created a sample map that I wish to load in Phaser: The map consists of three layers: Background, Objects, Creatures. They are comprised of four tilesets, of which Tiles is not used: And this is my code to load and display the Map in Phaser: export class Preloader extends Phaser.State { preloadBar: Phaser.Sprite; preload() { this.preloadBar = this.add.sprite(200, 250, "preloadBar"); this.load.setPreloadSprite(this.preloadBar); this.loadAssets(); } loadAssets() { this.load.tilemap("maze",
  19. Hello, I've recently acquired some sprites from Oryx and have attempted to load the sample Tiled file contained within. I'm able to load the assets just fine in my Preloader: loadAssets() { this.load.tilemap("oryx_tilemap", "assets/tilemaps/maps/oryx_test.json", null, Phaser.Tilemap.TILED_JSON); this.load.image("oryx_creatures", "assets/tilemaps/tiles/oryx_creatures.png"); this.load.image("oryx_items", "assets/tilemaps/tiles/oryx_items.png"); this.load.image("oryx_tiles", "assets/tilemaps/tiles/oryx_tiles.png"); this.load.im
  20. Hello rich, thanks for the help! Yeah, I was probably a little too eager with my question this time, I apologize. I worked on my phaser template some more this weekend and eventually figured it out along with a bunch of other niggling questions. Nevertheless, thanks for your quick and helpful reply!
  21. Update: Thanks to some browsing and help here in the forums, I've improved the layout of the project. I've also removed Underscore and replaced it with Lo-Dash. I've also refined the README to elaborate a little more on the code and any setup necessary. I think it's much clearer now. One problem I have is the setup necessary for PhaserIO. The process requires a git clone and then a git submodule update --init. I would like to make these steps unnecessary for Windows users, but I don't know how. I can't include PhaserIO because it would balloon my project into 200mb size and that's ju
  22. Hey everyone, inspired by Nokdu's post about Phaser with Meteor integration I decided to whip up my own little project skeleton and host it on Github. Here's a quick little FAQ: Q: Does it run on Windows too? A: Yes! Even though Meteorite is not supported under windows, you can emulate it's behavior. Instructions to do so are found in my README. With it, both Windows and *nix users shouid be able to build and deploy Phaser with Meteor. Q: Why Meteor? A: Meteor is its own grunt. It automagically bundles, minifies, serves and reloads your project. It has a plugin ecosystem from wh
  23. Hello everyone, I hop this question hasn't been answered yet. I want to layout the game in a manner similar to the Phaser Examples, but it was too complex for my needs. I also want to bundle phaser with meteor akin to this "Meteor with Phaser" post. Since the 1.8mb project is slightly too large for this site, the adventurous can get a copy of the project at MediaFire. The HTML page is HTML and Handlebars: <head> <title>phaser-meteor</title></head><body> {{> header}} {{> game}} {{> body}} {{> footer}}</body><template name="header"> &
  • Create New...