Brad P. Taylor

  • Content Count

  • Joined

  • Last visited

About Brad P. Taylor

  • Rank

Contact Methods

  • Twitter
  1. I agree with @ZoomBox having the rocks collide with the platforms would be nice. But please keep some sort of unexpected death from above that is not affected by the platforms to keep players from just sitting and hiding under platforms
  2. Anyone got a bit of code for Phaser (or PIXI.Text) that does text wrapping to fit inside simple geometry or better yet arbitrary masks?
  3. Nice job, looking forward to your next update. I could have sworn I got hit when there was no asteroid near me however after another few plays it didn't happen again so I must have been distracted and just hit one
  4. Hello Everyone, I was in need of some temporary art for a project and it dawned on me hey Flickr's API has the ability to search on tags and licenses... lightbulb moment - hey wouldn't it be great if I could just ask Flickr for an image with a set of tags and get sprite back (or a list of related images you can find the gist here oh yeah you need to have a flickr api key and there are limits to the number of images you can pull down an hour, so it probably makes sense to implement some sort of local caching system. (or you could just copy them from your browser cache like I did after getting them...) Cheers, -bpt
  5. @PadreMontoya I have a partial solution, I'm still working out the kinks on transforms and clipping masks. Anyway what I did was create a invisible sprite which has a drag handler and a hitarea the size of the clipped scrolling area that forwards movement/timing info to the zinga scroller really any scroller would work but theirs was simple to integrate. The drag helper sprite and calls into the zynga scroller is in this gist, the full code relies on a couple other files so it isn't a finished solution for you but might help some. -bpt
  6. I wrote a Phaser.Group based Scale9 (written in TypeScript). It supports size snapping, simple texture stretching or tiling for the stretchy parts, Known issues, when rotating and using alpha to fade there are cases where the texture sampling leaves a very small gap, however if you don't need fading I think this might work for you. -bpt
  7. Hello Everyone, This is a question, possible answer and a feature request all rolled into one. First the question: For my UI I need a way to set a specific sprite (or set of sprites) to be the only ones with active inputHandlers, Basically setCapture/releaseCapture... I spent a fair amount of time looking over the input system and didn't see this feature? My 'answer' This code adds setCapture, releaseCapture and getCapture to the Phaser.Input class. setCapture takes a single inputHandler or an array of them and will push the currently active notion of interactiveItems making the arguments the current set of interactive elements. The releaseCapture method restores things to the state before the push and of course getCapture returns the inputHandlers that have captured input. The feature request My hack works enough for now, but it seems clunky and woe to me if I ever need enable/disable sprite inputs while inside a capture mode. A more robust event bubbling system for sprites (and groups), would be really handy. I know this isn't a trivial request but it would probably make things easier for making certain types of UI. Cheers, brad
  8. Hi All, While working on the ui for my project I needed to disable input for sprites that were clipped to a smaller scrolling view (think scrolling list), I peeked around the Input and InputHandler code and didn't see an way to restrict the input for the child from a parent (or grandparent)? Anyway I cobbled together a way to clip input for decedents. The code can be found in a small gist here It's pretty simple it modifies the prototype for InputHandler, by adding an ancestor search after any truthy result returned by the original checkPointerDown or CheckPointerOver. This allows any ancestor to define a property (defaults to 'input_clipping_rect') which will can be used to reject false positives (ie things outside the smaller view but inside the child). Here is the code too just in case the gist isn't available. (function(property) { var local = new Phaser.Point(); function askAncestors( child, pointer ) { for ( var parent = child.parent; parent; parent = parent.parent ) { var clip = parent[property]; if ( !clip ) continue; parent, pointer, local); var cx = local.x - clip.x, cy = local.y - clip.y; return (0 <= cx) && (cx < clip.width) && (0 <= cy) && (cy < clip.height); } return true; } var _checkPointerDown_ = Phaser.InputHandler.prototype.checkPointerDown; Phaser.InputHandler.prototype.checkPointerDown = function(pointer, fastTest) { if ( ! this, pointer, fastTest ) ) return false; return askAncestors( this.sprite, pointer ); } var _checkPointerOver_ = Phaser.InputHandler.prototype.checkPointerOver; Phaser.InputHandler.prototype.checkPointerOver = function(pointer, fastTest) { if ( ! this, pointer, fastTest ) ) return false; return askAncestors( this.sprite, pointer ); } })( 'input_clipping_rect' );
  9. Thank you for sharing this looks quite useful!
  10. Enigma Virtual Box, might be what you are looking for I haven't used this for a shipping product (yet) nor have I tried it with node-webkit.exe, however my experiments with it for bundling dll's and files into a single .exe works surprisingly well. Their $$$ products are also very interesting sounding as well however online publishers usually have their own wrappers but for selling something yourself it might be good? oops almost forgot the url ( )
  11. ivanix,maybe you can start with a github gist? I'm very new to the whole putting code online for anyone to see/use. Setting up a repository for a single file module also seemed like overkill to me so I put off posting any code until recently when I discovered gists. I had no idea they were so easy to setup and use. -bpt
  12. I don't know of a list but it sure would be nice to have a hybrid for Phaser/PIXI features.
  13. Hello Anybody, I just encountered a problem when preloading json, with IE9. I tracked the problem down the Phaser.Loader.jsonLoadComplete handler is using this._xhr.responseText instead of this._ajax.responseText when window.XDomainRequest is used. I checked the master/dev and parallel-loader branches there doesn't seem to be fix in place yet, is this a bug or am I missing something else here? Regards, Brad
  14. Hello everyone, I just recently started using Phaser and I am very impressed with it (and PIXI.js too) amazing work everyone! I started rolling my own Prefab style factory which naturally lead me to thinking about automatically nesting prefabs and in general creating layouts and scenes in json files etc. What started out as a couple dozen lines rapidly exploded into a few hundred... Then I saw that a new version of Phaser was released so naturally I upgraded to 2.0.6 and breezed over the what's new and bingo an asset pack loading system spontaneously appears and the mention of scene creation. Is there an open discussion of this topic already of what's planned or a general listing of existing scene/prefab systems for Phaser/PIXI? My code is early and very rough around the edges having been more or less a stream of hey I should add this, that and this lamp (joke), however it already has a few things that I have found useful and have relied on in the past with other engines and I thought I would share what I have so far and embarrass myself publicly So far my pile of code does the following things that I find useful. 1. Easy way to associate a class with a name and .json file. 2. Simple layouts, nested groups. 3. The ability to reference other .json files to pull common settings from. (sort of inheritance for but data, very rudimentary) 4. Reasonably simple randomness, logging and auditing of data. Anyway if you are interested in discussing or seeing some code have a peek at Regards,Brad