Mathieu Anthoine

Members
  • Content Count

    68
  • Joined

  • Last visited

Everything posted by Mathieu Anthoine

  1. Adding files during the loading (with middleware) has the same effect. It seems that the _progressChunk returns a wrong result after adding new files to load.
  2. I have started to work with the new pixi 3 Loader. It is really great and with the "before" and "after" methods, you can easily do what you want without creating a custom Loader Manager, thank you I have a question about the progress value. In the list of files I download, there's a json file that describes a Texture and that is linked to a png file. The Loader detects it, download the png and at the end triggers the complete event but the progress value doesn't end with a value of 100. Did I missed something ? Thank for your help.
  3. What about the EventEmitter 3 plugin ? It has disappeared after the 3.0.0 haxe externs ? Is it usable instead of EventEmiiter before we can inherite from EventEmitter ?
  4. Hi, Is it normal than it's not possible to inherite from EventEmitter in Haxe-Pixi (maybe also in Pixi) ? I found a haxe-pixi plugin named EventEmitter3 that contains the same code as EventEmitter, is someone can explain its usage ? Thank you for your help
  5. Thank you for the information, it's good toto know getGlobalPosition() Even if I often calculate other coordinates than x and y.
  6. Sorry for the misunderstanding, I realize that there was a wrong mix up between worldTransform and toGlobal in my example. == WRONG ORDER == 1) I add a DisplayObjectContainer A to the stage and apply some transformations ( scale, positions...) 2) I create a DisplayObjectContainer B but don't added it to the stage 3) I add a Sprite C in B 4) render 5) I add B in A 6) I log worldTransform of C => wrong worldTransform == RIGHT ORDER == 1) I add a DisplayObjectContainer A to the stage and apply some transformations ( (scale, positions...) 2) I create a DisplayObjectContainer B but don't added it to the stage 3) I add B in A 4) render 5) I add a Sprite C in B 6) I log worldTransform of C => right worldTransform Now to be more precise on what do I do and why I need the exact worldTransform in these cases: In PixiJs v2, I created a hitTest method inspired by the private hitTest method of InteractionData and this method uses worldTransform. In this case, if the worldTransform doesn't return the good result at the right moment the collision result fails. Your precisions are totally right and clear, toGlobal updates the wordTransform when it's called, my problem is the worldTransform not updated when it's directly used. And you're right, I'm using a behavior that is not exposed to users in first place. So the solution is clearly what you explained, use updateTransform manually when I need it. Fortunately in Pixiv3 there's the onadded event that helps PS: I see that InteractionData has changed a lot between v2 and v3 and that there's no longer the hitTest method. Maybe there's a new manner of doing hitTest in v3 that avoid me to manually call updateTransform In anyway, thanks for your help
  7. Ok so if I don't add childs in one particular order (http://www.html5gamedevs.com/topic/15067-question-about-worldtransform-in-v2-and-v3/) I have to wait one render (one frame) after a addChild if I want to have correct worldTransform ? It seems really weird to me to get two behaviors. Maybe an "onUpdate" event could be more interesting than "onAdded" because it will be at this moment that you can really use the DisplayObject, not before.
  8. Why it could be interesting to know if a DisplayObject is added to the displayList ? Prevent for example a collision test between a DisplayObject that is added to the displayList and an other that is not (because worldTransform of DisplayObject not on the displayList are wrong or not updated). It's not critical, it's possible to do another way but it was easier in Pixi v2. Now, why I was interested to have an addedToStage event ? Prevent the bug of worldTransform described here : http://www.html5gamedevs.com/topic/15067-question-about-worldtransform-in-v2-and-v3/ but you're right, added event is enough, I can call an updateTransform of a DisplayObject when it is added. But at the end, I was wondering if it could be fixed directly in Pixi, you just need to add an updateTransform of childs when they are added in a Container. Do I need to post a bug ? Container.prototype.addChildAt = function (child, index){ // prevent adding self as child if (child === this) { return child; } if (index >= 0 && index <= this.children.length) { if (child.parent) { child.parent.removeChild(child); } child.parent = this; // FIX child.updateTransform();
  9. About hidden DisplayObjects I'm aware of the performances and use it a lot, it's a great implementation thank you DisplayObject.parent is not enough to know if a DisplayObject is on the DisplayList (added to the stage) it only allows to know if it's added to a parent. You'll find the exact issue I have without ADDED_TO_STAGE event or if there's no way to know if a DisplayObject is on the displayList (thing that was possible in Pixi v2). It's a case that arrives very often: http://www.html5gamedevs.com/topic/15067-question-about-worldtransform-in-v2-and-v3/
  10. So tell me if I'm wrong: there's no way to know if a DisplayObject is in the displayList or not ?
  11. Hi, As the stage is no longer a Stage Object and stage property has been removed from the DisplayObjects, how can we know when a DisplayObject is on the stage or not ? I asked few days ago about dispatching an event when objects are added to the stage or remove (like in AS3), but I don't find the events dispatched by DisplayObject in the documentation, is there a place to find them ? Last question: As stage is only a classic Container now, it seems possible to change the stage on the fly changing only the Container to render (renderer.render(myContainer)). In this case, are the whole DisplayObjects will dispatched a removed or added "to stage" event ? Thank for your help.
  12. Hi, After looking at PixiJs code, I guess that The worlTransform informations of DisplayObjects are updated only in the render, by calling the private method updateTransform(). In some cases, it's a bit boring. Here's a tricky situation I have in PixiJs v2: 1) I add a DisplayObjectContainer A to the stage and apply some transformations ( (scale, positions...) 2) I create a DisplayObjectContainer B but don't added it to the stage 3) I add a Sprite C in B 4) I add B in A 5) I call toGlobal on C --> wrong results on toGlobal (because the worlTransform of C has not been updated when B has been added in A (that means C is now added to the displayList, its stage is no longer null)) If I execute 4 before 3, it works fine, toGlobal returns right values. Sometimes I can't change my code (for example if I use pooling on DisplayObjects), is there a way to know when a DisplayObject is added to the displayList (when its stage property changes from null to the stage reference) ? Something similar to AS3 Event ADDED_TO_STAGE ? Is the behavior similar in Pixi v3 ? Thanks
  13. Hi, I'm working on a CollisionManager objet. I would like to split my graphic objets between graphic assets and collision boxes. The collision boxes need to be visible for debug and invisible for release version. That works perfectly with "contains" methods of Rectangle, Circle, etc. when the collision boxes are visible but when I set visible to false, as the worldTransform datas aren't updated, the result of the collision doesn't work. Instead of visible, if I set alpha to 0, it works perfectly, but in terms of performance is it a bad idea or there's no difference in term of display between alpha=0 and visible=false ? Or maybe there's another way to manage that Thanks in advance.
  14. Just one thing missing in Pixi, flump support.
  15. +1 for Adi solution The combination of Haxe and Pixi is just perfect. A powerful language with a simple an efficient graphic engine (pixi) close to Flash display list and API ! Keep Your Flash workflow for graphics and animations, think about a way to export your assets to a format supported by pixi and voila My 2 cents, OpenFl: poor performances in html 5, hard to configure, unstable even if it's certainly THE framework to follow. Flambe: export in flash and html5 but totally different Way of thinking o_O. Phaser: you have to think like phaser, too specific for me...
  16. Just for information, You can find Haxe externs for this great plugin here: https://github.com/mathieuanthoine/haxe-phaser-plugin-isometric or directly with haxelib: http://lib.haxe.org/p/phaser-plugin-isometric
  17. Hi, @plicatibu and @Blank101, I'm really interested to develop games with Phaser using Haxe and would like to know if you still maintain your haxe-phaser externs and your haxe-phaser examples ? I haven't seen any updates since 2 months on the master branch ? I was wondering what do you use to code Phaser with Haxe ? I'm using FlashDevelop and the organisation of the files, of the projects are differents from yours, it seems to me that you don't use FlashDevelop. Do you think it could be interesting to give users examples organized to be easily compiled with FlashDevelop ? Thanks for your advices.
  18. @wyattbiker Maybe you can also try Haxe : There's some externs avalaible for Phaser, for example: https://github.com/Blank101/haxe-phaser I have worked on differents HTML5 projects with Typescript and Haxe and I have to say that Haxe is more robust and easy to use than Typescript. My 2 cents
  19. The mobile version uses touch controls, the game chose automatically keyboard or touch controls depending on the device you play with.
  20. Hi Venam, The full version is in flash, there's a button "full version" on the main page. The HTML5 version is at this stage only a technical demo.
  21. Yes I added the support of ogg vorbis files, maybe the game stopped on sound initialization. Great to know that it works fine now
  22. The full version is available in Flash version click the "full version" button if you want to play now