Jump to content

yougotashovel

Members
  • Content Count

    18
  • Joined

  • Last visited

  1. I like that the docs are now built into the official Phaser website, and i like the autocompleting search function. However the sticky header is taking up a large portion of the screen, making it annoying to read on smaller screens. The section that's sticking seems only relevant for those that repeatedly need to change which version they're reading. Which for my own case i'll select the version and then really don't need the option omnipresent, not sure how other developers are working with the docs. Example here: http://phaser.io/docs/2.4.4/Phaser.Physics.Arcade.html Just a polite sug
  2. After a lot more testing. I've found the following to be pretty consistent regardless of the amount of sprites, images, text, tweens and animations used: 1 graphics object = 60fps (as a background only, if layered on top of other objects then 35-40fps) 2 graphics objects = 35-40fps 1 graphics mask = 30fps max (no matter how many other graphics objects are used) 1 moving tilesprite = 30fps 2 moving tilesprites = 15-25fps If all masks, graphics and tilesprites are removed then i've found i can get steady 60-62fps, using Canvas+ in iOS --- EDIT --- For clarification the above was using W
  3. @Gods I'm also getting nowhere near 60fps, at best i'm averaging around 25-29fps sometimes 40fps with Canvas+ on iOS. I don't have that many things happening on screen at any one time, largely static pages, a dozen objects per scene, some with intermittent animations, a few tweens, some text, and a few more complex transitions that drop the frame rate from time to time. Nothing i would consider particularly heavy use, although i imagine because i'm using entirely retina images and have to load a few 1-3 full spritesheets per scene that has something to do with the performance. After some
  4. @ludei I've been experiencing this same issue, has there been any updates to this since december? In my case i have an audiosprite with 10 sounds, and when i call play on any part of the audiosprite it appears to play the first few-hundred milliseconds of the whole file, then the part that i have referenced. @valueerror did you find a good workaround for this yet?
  5. Ah, okay. I'm guessing, but would you need access to different cpu cores to bypass this? I guess you can't do that in javascript. I just like moving loading screens as it feels like something is actually happening and things haven't frozen. Are there any other methods/techniques that could help or produce a similar effect? Or is the only way to have static loading screens? Cheers
  6. I'm experiencing heavy drops in framerate when dynamically loading content, which is affecting tweens i have running. I have a loading screen that pops up and tweens a handful of objects. While the new content is loading the frame rate drops from around 40-30 to 10 or less, and causes the tweens to be really jumpy. Can anyone explain why this is occurring? Thanks
  7. Great! This is exactly what i was looking for. I threw your code in, and that gave me a good indication of what i needed to do. I copied the PIXI text prototype, and changed line 369 from this: baseline = baseline * 1.4 | 0;To this: baseline = baseline * 1.6 | 0;1.8 is too much, it changes the cutoff to the bottom of the text. I should probably tweak the code more to get the anchors working perfect, but this is a good fix for now. Thanks so much!
  8. Update: I have found that if i use wordWrap in the text styling, then the first line of text has the same cutoff at the top, and the font works fine for all lines below. So i think this is an issue with the bounds of the text object. 1. Is there a way to change the bounds of the text? 2. or add a padding to the text object, so the text is further away from the border of the object? I still haven't found a solution, If anybody could help it really would be appreciated. Thanks
  9. Found one possible solution. this._tweens[t]._objectAbove doesn't appear to exist when passed into the console, but the below does, and works. this._tweens[t].target--- Anybody else who needs to pause tweens in a group or array, this code now works: Phaser.TweenManager.prototype.pauseGroup = function(obj, children) { var o, c, t, len; if (Array.isArray(obj) ) { for (o = 0, len = obj.length; o < len; o++) { this.pauseFrom(obj[o]); } } else if (Phaser.GROUP && children){ for (c = 0, len = obj.children.len
  10. Okay now i see that obj._tweens and obj._add don't exist. And that the script is referencing 'this' as the TweenManager. Still struggling to get it to work though. I can get log information on everything in the script except inside this loop: for (t = 0, len = this._tweens.length; t < len; t++){ if (obj === this._tweens[t]._object){ console.log(this._tweens[t); this._tweens[t].pause(); }}
  11. I've been trying to extend the functionality of TweenManager, so it can resume and pause everything within a group. I adapted the code from here: http://jsfiddle.net/lewster32/L3u3gp5k/ http://docs.phaser.io/TweenManager.js.html#sunlight-1-line-127 When debugging with console, _tweens and _add are undefined for each object, so the function doesn't work. I think the code is correct? Any ideas why this isn't working? I'm guessing i've missed something crucial about _tweens. Here's the code: (This goes out to Rich and Lewster) Phaser.TweenManager.prototype.pauseAllFrom = function(obj,
  12. I'm trying to check if a whole group is outside of the visible bounds, so i can process it for cleaning up memory. I've got my world bounds set to this: var w = window.innerWidth, h = window.innerHeight;game.world.setBounds(0, 0, w, h);I've tried a few things, but i guess what i'm looking for is something like "group.events.onOutOfBounds()" I realise this doesn't exist, but is there anything that would do the job? Is it possible to check if a group is out of bounds, or do i have to check everything in the group individually? Thanks
  13. It looks like it was simplified in the latest version of Phaser to include chained tweens. tween.onComplete.add(function(){ console.log('complete');}, this);Found the solution in this topic: http://www.html5gamedevs.com/topic/11529-tween-onstart-callback-problem-in-phaser-221-works-in-204/?hl=%2Btween+%2Boncomplete
  14. I'm getting this error too, trying to find a solution.
  15. Ahhhh, thanks. They're all named so similar, and i don't know why i didn't see the pivot property before!
×
×
  • Create New...