BrenX

Members
  • Content Count

    13
  • Joined

  • Last visited

  1. Just posting an update. I rolled back to 2.3.0 and all tilemap performance issues went away. That might indicate a regression in the 2.4.x development stream. I'm not familiar with the changelog from 2.3.0 to 2.4.0 (I could look it up) but I wonder if any big changes were made to tilemap rendering, collisions, etc.
  2. FYI, I rolled back to Phaser 2.3.0 and my frame rate went back up. Anything from 2.4.0 and up kills it.
  3. I'm working through some ugly tilemap performance issues in 2.4.4 myself. You might want to try an older version to see if your issues go away. In my case, all was well in Phaser 2.2.2 and an upgrade to 2.4.4 killed performance. Please update us if you find the culprit. ...and good luck!
  4. Great game, JM. I like the simple, focused design, the feel of the jump physics... The music is a good fit, too. The whole thing is sprinkled with "clever". One bit of advice: if you were to think up a theme that is more compelling than a kind of generic dark cave, it might make it more engaging... If you want help making assets, a story, etc. let me know. I think there's some good potential here. Keep it up!
  5. The parameters I see coming in are: scrollX = 561 scrollY = 629 left = 35 top = 39 right = 85 bottom = 76 ...so, nothing out of the ordinary, from what I can gather. I put in a conditional breakpoint and the dimensions of the rendered area (in tiles) never goes above 51 x 38. The minimap is drawn using an approach I came up with that goes something like this: I created a scaled-down version of my tileset where each tile is 1px x 1px (I used "nearest neighbor" to keep the scaling from trying to be too clever and smoothing out the colours). At run time (on level start), I draw the base minimap bitmap sprite by traversing the tilemap and mapping the tile locations in the real map to the pixels in my mini tileset. The minimap is drawn once, one pixel at a time. During gameplay, I draw a rectangle sprite on top of this bitmap and update its position as the user moves about the level. I just need to map the global coordinates to a pixel position in the minimap, offsetting it for the size of the rectangle (which is calculated using the viewport size). Gravy.It all seems to work quite well, other than the overlay rectangle's movement being a little jittery. I need to write a smoothing method that averages the player position to fix that. If I remove the minimap altogether, there's no perceptible impact on performance.
  6. Ok, a quick follow-up. Here is the output from the Chrome profiler. It looks like my processing is being pegged by TilemapLayer.renderRegion() and to a lesser degree Game.updateLogic().getImageData()
  7. Thanks so much for following up, Jack. I tried the Phaser Debug plugin and it is very useful. Of course, its usefulness is directly proportional with my ability to understand the output... so I have a bit of learning to do. Clearly, the problem is the postUpdate > stage processing (I've attached a screenshot). I'll have to do a bit of research to find out exactly what that is and what it is in my code that might be causing this processing. I'm on the trail and will post back when I've learned more.
  8. Bonjour Bastontan, Est-ce que vous avez résolu votre problème? Je souffre du même malaise avec une carte bien plus petite, en plus. Je suis passé de Phaser 2.2.2 à 2.4.4 et tout est presque figé lorsque le point de vue bouge dans ma carte. Hello Bastontan, Did you ever resolve your issue? I'm suffering from the same probem, with a much smaller map on top of it. I upgraded from Phaser 2.2.2 to 2.4.4 and everything is nearly frozen now when the point of view scrolls around the map.
  9. Hi Preece. Sorry for the delayed response but I am having exactly the same issue after upgrading a game from 2.2.2 to 2.4.4 I'm a bit at a loss to fix it. My map is 96x96 with 2 layers and collisions on specific tile ranges on one of those layers. Performance dropped from 55-60 fps to ~5-15. I know this response is coming in months later. Did you ever figure out a solution?
  10. Thanks for answering, JackFreak. When you suggest that I could improve performance by decreasing the size of my tilemap, would that involve developing some kind of "load/render only the visible parts of the tilemap for a large world"? Is there an out of the box mechanism for this? I can of course figure out what parts of a larger map are visible and somehow grow the in-memory tilemap as the user approaches a seam between two sub-maps. But this seems like overkill for a map that measures in at 96x96. I may just have to stick with a older version of Phaser if upgrading means that my world has to be smaller... the whole point of the game is to give a large area to move around in. I'm going to have a look at the link you sent and see if it's worth porting over. I may be too far along to justify too much effort changing tilemap implementations... but it's good to know there are options. I have a hard time believing that I'm pushing the rendering limits with my map size. I'll report back if/when I figure anything out. I welcome any other input.
  11. In case it's pertinent, here is the code for my camera settings:this.game.camera.follow(this.sprite, Phaser.Camera.FOLLOW_TOPDOWN_TIGHT);My map has 2 layers. One is a partially transparent overlay. Scaling is set using the following code: this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;this.game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;this.game.scale.pageAlignHorizontally = true;this.game.scale.pageAlignVertically = true;
  12. Hi all, I have picked back up a project I started a while back and have run into some issues. I decided to upgrade from 2.2.2 to 2.4.4 assuming that all of the effort and improvements will be a benefit. I learned that the scaling API had changed a little, so I fixed my code to use the appropriate methods, discarding the deprecated ones. That eliminated the exceptions I was seeing. Unfortunately, though the game now runs, I have found that my FPS has dropped from around 55-60 to 5-15. I can toggle between these two versions of Phaser 2 and instantly see the difference in FPS. Everything else about the game looks the same and nothing is being reported in the logs. The only clue I have is that the drop in FPS occurs when the tilemap is scrolling. My game uses the following APIs/functionality: Tilemaps (made in Tiled), collisions set using this.map.setCollisionBetween(2, 4);Audio (mp3)Tried out both Canvas and WebGL rendering (no perceptible difference)Arcade physicsI'd greatly appreciate any tips/gotchas I should be watching for. Is there some flag I should be setting to correct the scolling problems? Thanks!
  13. Thanks a lot for providing this example. Very elegant solution, IMHO. I was wondering if anybody else is seeing the ~1px tearing between the text and border on Chrome or the weird lines in IE... (This might be a side-effect of using JSFiddle/inlined base-64 encoded assets, for all I know.) If you are seeing this, does anyone have a solution to fixing the rendering issues? Thanks again, Brenten