TomLGD

Members
  • Content Count

    22
  • Joined

  • Last visited

About TomLGD

  • Rank
    Member

Recent Profile Visitors

727 profile views
  1. After a ton of research I have a solution... or kind of. First I tried to use the offsetX\Y of the layer to work around the restriction that the layer only can move by full pixels regardless of the scale factor of that tilemap layer. If I remove this "feature" the tiles will overlapping by subpixels and the whole map will look very messy and blurry. So my solution is based on a design resolution of 192x108 but with a real canvas resolution of 192 * 5 x 108 * 5. Then I have to make the camera follow the player by myself with a simple: game.camera.x = (this.player.x / 5).toFixed(0) * 5 - realWidth / 2; game.camera.y = (this.player.y / 5).toFixed(0) * 5 - realHeight / 2; As you can see I round the current camera position of multiples of 5 -> so by upscaled pixels. So the tilemap don't shakes independently. On the downside its not possible to move the camera "smoothly" around in the game cause we have this "by 5" steps with the camera. So this is not a real real one but more a workaround^^ Tom
  2. Hi, My pixelated game with the design resolution of 192x108 which is scaled up to fit a Canvas with the REAL resolution (fullHD for example) has a problem with a rendered Tilemap. I scale up everything in the game by a certain scale factor: S = realHeight / 108 so the game is always correctly scaled and when a sprite rotates the original pixel graphics are still the same. But for some reason the tilemap layers are working strangely. Cause the explanation is a bit tricky I recorded a video! As you can see, the map position variable is changed with every step by 1. But the layer graphic "snaps" to certain positions. The spikes are normal Phaser Sprites and behaving correctly. Why does the map do this? And how to achieve a smooth/correct appearance? Thanks, Tom
  3. That would set all bodys to the same size. so my current solution is this: all map layers are scaled with: this.layer.setScale(scaleRatio); and every added sprite is added to the game this way: addSprite: function(x, y, name) { var s = this.getScale(); var obj = this.add.sprite(x, y, "atlas", name, this.base); obj.scale.set(s); obj.x *= s; obj.y *= s; return obj; },
  4. Hi! I want to make a pixel game with a resolution of 144*256 pixels. I want to keep the pixel look also when I rotate a sprite. So the player is able to see tilted pixels. So i decided to set the real dimension of the game to the full available size like 1920*1080. Then I put everything inside a Group and scale the whole Group up so that the game fits the canvas. Also I'm using the Arcade physics and there is where the problem takes place. The physics bodies are not scaled with the group and so the whole szene is useless^^ So is there a solution to scale a whole stage or the "game" up to maximal resolution but working correctly with a design resolution? The Falsh engine Starling worked like this and that was very handy cause you get the real pixel count of the device without taking care of that. Thanks in advance^^
  5. Hi, for my game I use a simple state order like: Main Menu -> Map screen -> Level 1 -> Map screen -> Level 2 -> and so on That works well Just separate everything in logical chunks. But now I had the Idea of implementing some kind of minigames interrupting the level. And thats the point. If I make a state change, the state is resetted if the minigame itself is a state too. Other version is, that the minigame is just a game packed in a group on top of the current state. but this approach make some trouble too cause of physics side effects. So what I desire: Push a new state, play that state and then pop this state and get the old state right there where it ends before. For me this push/pop approach sound very "correct" and intuitive. Is this possible with phaser somehow? Thanks Tom
  6. Okay guys! Ich think I have some kind of solution! game = new Phaser.Game(WIDTH, HEIGHT, Phaser.CANVAS, 'gamediv', null, false, false); I changed from Phaser.AUTO to Phaser.CANVAS! Thad made the stunt^^ So I hope I dont need webGL stuff for my project...
  7. Just tested the game with phaser 2.6.2. Still the same error, when a sprite is touching/overlapping the border, the sprite will "loose" one line of pixels
  8. This is already the case, do difference with dis- or enabled
  9. My atlas has a size of 571x571 And yes the missing line happens at the point the sprite is touching the boarder.
  10. Hello, I am trying to make a game with phaser 2.2.8. The should look like an old school gameboy game. So the canvas has the dimensions of 160x144 pixels. The problem is a strange behaviour at the left and the top side of the screen. I attached an example to clarify what i mean. On the left pic the pilot wares glasses. You can see the connection between the 2 lenses. On the right pic the sprite looks compressed by one pixel, the connection disappears. Does someone knows why this happens? Or better how to solve this issue? Thanks, Tom
  11. Hi guys, for my game I want to support game pads in my Phaser 2.4.4 game. So far so good, the pad is working. But, if I change the tab for example and than go back to my game, the pad is not responsive anymore. Also I don't get a Disconnect event. So looks like Phaser 2.4.4 still thinks there is a pad or the pads push data dosent arrives the game anymore. I also tested several game pad and all have the same problem. So, is there already a solution for that problem? bye Tom
  12. But I cannot looking for all tile of the same ID and then change the collision body of that tile. cause the tile object don't have such a property
  13. Thanks, so now I'am doing this with a ties of 8x8 instead of 16x16. Its a bit more demanding to work with in Tiled but looks like the best solution^^
  14. Hi there, I'am working on a small tile based game. I use the tool "Tiled" for creating my tilemap and import it with phaser. The map ist build of a 8x8 pixel grid in size. BUT my tiles are actually 16x16 pixels in size. I do this to habe some kind of "half position" for chests or wooden boxes and so on. If I load it in Phaser it looks all right but the collision ist wrong. Cause the grit is 8x8 pixels, the bounding boxes of the tiles are 8x8 pixels too... How can I tell Phaser that it should use a bounding box with the double of width and height? And I don't want to slize my 16x16 tiles in 4 8x8 tiles caue that would cause in four times higher collsion checkts^^ thanks in advance Tom