ChubbRck

Members
  • Content Count

    50
  • Joined

  • Last visited

Everything posted by ChubbRck

  1. Hi all, I got WebPs with Alpha working; however, the WebP is animated (or should be). It isn't playing in Phaser. I'm assuming this isn't supported and I'm SOL; however, I just wanted to check. Does anyone know how to get animated WebPs to play in Phaser?? Please don't suggest using spritesheets -- I'm writing a demo that leverages an API that delivers animated webps, so for this purpose, I need to play animated webps. Thanks!
  2. A follow-up question for anyone. My child sprites are being rendered beneath their parent whereas they should be drawn on top. I can't imagine why this would be. Anyone have any ideas? EDIT: My bad, I was adding the child sprites to another group
  3. Can this really be? What is the point of autoCull in this case? I have a large side-scrolling world where the camera moves left to right. I have enemies positioned at launch positions that are 'asleep'. They self-activate when near the camera bounds. I'm worried I'm wasting a lot of power by 'rendering' these 100-200 objects offscreen. A slightly different question, but does renderable = false really not offer any performance benefit in this scenario?
  4. jyapayne, thanks again so much for your support - this app has me really excited to make some standalone executables with Phaser. I had a question maybe you can shed some light on, although admittedly, it is kind of a long shot. I'm wondering if I could submit a Phaser game, perhaps leveraging web2exe to ID@Xbox, Xbox One's independent publishing portal. Does anyone here have any experience with that (or with comparable programs for Playstation 4, Wii U, etc.), with or without Phaser?
  5. Ah, of course! Since the position is relative, I was positioning the child way off screen by adding the position of the child to the parent. You're the man. Thank you -
  6. I'm also having weird issues resizing tilesprites. (Basically, they won't resize when I change their width and height properties). Is this a known bug?
  7. Hi there, I'm having an issue where a child sprite does not respect the depth of the parent's group. Meaning that other objects will render on top of the parent sprite as expected, but not the child sprite, which appears on top of both the parent (expected) AND other objects (unexpected). First, I am extending the sprite class: var Wall = function (game, x, y, width, height) { Phaser.Sprite.call(this, game, x, y, 'wall-border'); this.width = width; this.height = height; this.anchor.setTo(0, 1); game.physics.arcade.enable(this); this.body.immovable = true; var child = this.addChild(game.add.tileSprite(0,0,100,100,'wall-pattern')); // this.game.add.existing(child); // (THIS LINE IS THE PROBLEM) child.x = this.x + 10; child.y = this.y - 10; child.anchor.setTo(0, 1); child.width = this.width - 20; child.height = this.height - 20;}The problem is that the tileSprite created as a child does not appear in game unless the commented out line is added, but if so, it appears on top of all other objects (does not respect the parent's group ordering). Do I need to add the child to the same group as the parent or....? I know I'm doing something dumb, so any guidance is appreciated. Thank you!
  8. This is truly fantastic, thanks so much! Had a quick question, I'm trying to build for OSX and noticing that everything works great except for SFX and music. I couldn't find anything in the issues or docs about this. Is there an obvious flag or something I'm missing? Thanks for any help you can provide!
  9. FWIW, I believe using emitter.setXSpeed(min, max) and emitter.setYSpeed(min, max) achieves what I was looking for.
  10. Case in point, I have come across this thread and found no solution posted, even though it was found. My forum-related activities have been negatively affected this day.
  11. Hi all, I'm interested in building a 2d shooter or runner game (think Gradius) where the levels are designed ahead of time. That is to say, the platforms and enemies would NOT be procedurally generated, but rather part of a scripted level. My plan was to give the player a positive x velocity, moving him/her to the right in a long world (currently 6000 pixels wide) and have the camera follow him/her, and literally have enemies and objects waiting at predefined positions. Basically I want to know, is this a reasonable way to build this type of game? I'm wondering how big can the world be (roughly) and how many objects can I pre-place off-screen before I start to run into performance trouble. If this is a concern, what strategies can I use to mitigate it? Off the top of my head I'm thinking I could pool objects or not render/run enemy routines until they are on-screen. Thanks for any thoughts you can provide. Nick
  12. Thanks for the thoughts, lewster - Do you know if it is possible to scale the world around the center point? I know cameras in Phaser don't support zooming yet, but as a workaround I was hoping to scale the entire game.world. I just can't figure out how to set its anchor, origin, pivot, or whichever is needed. Nick
  13. Hi there, I'm trying to zoom out the entire game world from the center.. unfortunately I see no method for the camera for zooming out so I'm scaling the game.world directly with this.game.world.scale.setTo(0.5, 0.5);Unfortunately, this scales around the top left of the screen. I've tried setting the anchor on the game.world as well as the pivot to the center of the world or the center of the stage to no avail. Is it possible to achieve what I'm trying to do? Thanks for any thoughts - Nick
  14. How does one change the world's origin to the center of the screen?
  15. Another dumb question: I can't seem to get loadUpdate() to fire in my single-state app. Am I missing something obvious? Thanks - Nick
  16. Hi there, Doesn't <div class = "game_div"></div> have to exist somewhere on your HTML page?
  17. Interesting update, I did get the crash to happen on the unminified version of Phaser and this is where the error occurs, on line 32210 of phaser.js Object.defineProperty(Phaser.BitmapText.prototype, 'text', { get: function() { return this._text; }, set: function(value) { if (value !== this._text) { this._text = value.toString() || ' '; this.dirty = true; } }});
  18. Eric, thanks for your help, unfortunately, I don't know much about the inner workings of Phaser, either. I've found some interesting things out though, it looks like the this._bindings error was unrelated to the original error. The original typeError only occurs with the MINIFIED version of Phaser, not the full version. Does anyone know why this could be?
  19. ChubbRck

    Performance

    I can confirm that your example plays very smoothly for me - I am on OSX Chrome i7 iMac
  20. ChubbRck

    Arcade Font Writer

    Whoops... been missing a lot lately.
  21. ChubbRck

    Arcade Font Writer

    Very cool! Reminds me of NFG's old Arcade Font Tool, which I used with great joy many times back in the day - http://nfggames.com/games/fontmaker/
  22. Thanks Eric. I did that and got this: TypeError: 'undefined' is not an object (evaluating 'this._bindings.length') It's on line 15335, which is this line (about 7 lines down) in the following chunk: var n = this._bindings.length; dispatch: function () { if (!this.active) { return; } var paramsArr = Array.prototype.slice.call(arguments); var n = this._bindings.length; var bindings; if (this.memorize) { this._prevParams = paramsArr; } if (!n) { // Should come after memorize return; } bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch this._shouldPropagate = true; //in case `halt` was called before dispatch or during the previous dispatch. //execute all callbacks until end of the list or until a callback returns `false` or stops propagation //reverse loop since listeners with higher priority will be added at the end of the list do { n--; } while (bindings[n] && this._shouldPropagate && bindings[n].execute(paramsArr) !== false); }
  23. Hi all, Another weirdo cross-browser problem I am desperate to fix. A tester running Safari 6.03 (not the most current, but not ancient either), keeps having the game freeze with a strange error: "TypeError: type error" -- it traces back to phaser.min.js line 11 but I'm unable to see what in my code is causing the issue. Is this a known thing? Any advice at all would be appreciated - You guys are the best! Nick
  24. Surely there must be a way to check if a sprite exists before destroying it?