jouniii

Members
  • Content Count

    75
  • Joined

  • Last visited

About jouniii

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.sc5.io/
  • Skype
    jouni.airaksinen

Profile Information

  • Gender
    Not Telling
  • Location
    Finland

Recent Profile Visitors

751 profile views
  1. jouniii

    Phaser 2.5 Roadmap (and request for ideas)

    I'd like the pixi v4, but I fear it means there will be Phaser 2.6 as well to fix and patch new issues. The current pixi v2 works fairly well imho and I'd rather just switch directly to Lazer if it brings similar functionality anyway as pixi v4 update would do. What I really would like to see is some internal patches/fixes. - Support texture compression, it would give much needed improvements for texture heavy games on mobile, hard to do externally - Patch to support more of the TexturePacker (and other) options such as the pivot trim/crop (would give optimization on webgl filter's when the filterArea would be "automatic") and rotation, again hard to do externally - Support for preloaded image resolutions (based on the the url @NNx). Now you can start the game with resolution for pixi, but the image BaseTextures don't get their resolutions set (defaults to 1). You have to manually access the private cache._cache.image to post-process the objects to support hi-dpi the pixi v2 way. Pixi v4 has more generic regex for the url processing. Other than that, hi-dpi works very well. Pool class is something one can easily implement. not sure if needed for Phaser. I already see Phaser is getting some bloat which could/should be plugin or just external extra code instead. I'd rather concentrate on features more deep internal improvements. Of course Lazer in it's nature would (as far as i understand) be more modular in this sense too.
  2. jouniii

    image loading per devicePixel data question!

    Note that devicePixelRatio can be fractional and the loaded asset base texture does not get it's resolution set. Right now easiest is to post process the cache entries in game.cache._cache.image. There's no callback for this. Check the object's url for the resolution key and set object.base.resolution. Also you need to create the Phaser game with resolution option. This way the higher resolution works pretty much automatically and all game code is written as-if you had only 1x assets and coordinates, even if resolutions would be fractional and you'd mix different resolution textures.
  3. I suspect the issue is with the timer changes where animation time is kept constant and causes frame skipping if fps cannot be held constant. You can try fix it with setting lower target fps, but note that your animations will then run multiples faster and you need to adjust. Another option (which I chose) is to force tweens/animations back to old style timing which does not skip, but just slows down the animation thus it looks smooth although slower. Note the down side is that Timer based events are run then in different cycle and animations may not synchronize with timers. I think this was the main reason for the change. ie. you say play tween for 2000ms and have timer event for 2000ms - new way makes sure these are executed with same real time period. Old way allows the tween to drift. For tweens it is just setting it's frameBased property (not sure if there was default in tween manager to be set), but I had wrapper for tweens so it was just adding single line there after creating a tween. Don't remember off the shelf if there was something similar with sprite animations.
  4. One other correct way would be to use interfaces to describe the new property to allow type checking on this sort of "mixins".
  5. jouniii

    Tweening a Variable

    Personally I recommend using properties for this, so you can do more than just change value of variable. My personal approach is "timeline" tween from 0 to 1 and then using it as reference how to modify composition of values. You get away with one tween and can do work of many tweens in properly synced style.
  6. jouniii

    Phaser 2.4.0 "Katar" Released

    Thanks! I just upgraded from 2.1.3 to this version. Few small changes, mostly due some workarounds I needed for 2.1.3. Few notes.. PIXI version has bug with WebGL filters and Masks. Doesn't allow both to be used at the same time if the parent/child is set in certain way. I was able to workaround this by adding mask as child to a Sprite/Image. Using Group doesn't work. The game object can take the new "resolution" parameter, however the as the PIXI's texture loader is not used, the BaseTexture.resolution is not set automatically (PIXI detects at least @2x). I went and created boot state which reconfigures the cache's image data based on the url's, that way the textures are automatically resized by PIXI. But it's a hack, I think the Loader should do it automatically (or provide configurable callback to do it).
  7. Getting back to old thread. I suspect it's just depending font. You probably need try try with Arial and capital ÄÖÅ if it's an issue. In anycase, I have not tested with the new Phaser.Text if it's fixing this problem. I saw this in the issues (the padding property should "do" the same trick with better results): https://github.com/photonstorm/phaser/issues/1518
  8. Problem is in PIXI.Text. It calculates text height with rendering character "M" (capital M and it's not configurable), and it probably is not enough to cover those umlaut dots. You probably could patch that part of code or do some workaround as I did. It's a bit silly workaround: Add line feed to text (\n) to make it larger. Still not good, so offset with lineSpacing 10 or something fitting. You need to readjust the text position as it goes a bit off, but atleast text displays correctly.
  9. jouniii

    Phaser Performance with large resoluton

    I haven't found ie. 15 textures to be an issues (of course not every one is full size) on mobile webGL. Though about 10 is used at the same time. However biggest factor is the DPR size, my experience shows that about 1.25 (not full 2) is already enough to "fool" higher retina feeling and works well in many mobile devices performance wise. iPhone 6 plus and latest iPads can work fine with 1.5 - 1.75 DPR, although iPhone 6 plus would ask for 3. So key really is to use proper DPR and texture atlases. If game is heavy on effects and sprites, you may want to throttle those down with some rules (ie. based on Android version, etc)
  10. jouniii

    Changing game size to fit page

    Better late than never. Two places. state.init() and custom Phaser.Plugin postRender which looks up a "needs resizing" flag window.resize sets. Probably would change correctly, but I wanted to make sure it changes in that stage to prevent any issues.
  11. jouniii

    Phaser 2.3.0 "Tarabon" Released

    Maybe I'm looking from wrong place, but the Phaser api documentation style has changed? The new one is not as usable as they direct links to the "copy of source code" are missing. Best feature of whole API as many times you need really to learn what Phaser really does if you want to use Phaser properly.
  12. jouniii

    Audio Poblem [Windows Phone 8.0 IE 10]

    My experience shows that it's best to disable audio on Windows Phone, or just leave it to be long background music loop or such if you want to keep something. Audio tags work poorly, eat the precious CPU and memory on those mobile devices. Similar issues with desktop IE, however as CPU and memory issue is better on desktop you can get away with working but little bit choppy audio.
  13. Webaudio would allow queueing into future, but Phaser Sound only fires the play when called. Thus is causes small gaps. To have seamless playback you need a bit latency and tell in advance the webaudio to play next sound. This is how real sequencers work anyhow.
  14. jouniii

    More efficient way to do this (masking)?

    Maybe your problem is that the move event is called too ofter. Try to cache it's data and only scratch in batches instead of scatching everything (and redo already scratched position). I'm not familiar with masks as you point out they use much CPU power. Also you seem to create new image everytime instead of updating existing one (if that's even possible). That's of course expensive task.
  15. It's easy to forget you are working in html. My solution was (also better performance) to have external (overlay) div element which you update with any text and any html/css. It is good if you don't need to update it's position (which wouldn't be a big problem either though). The debug.text is not meant to be used extensively anyhow.