Fairydhwen

Members
  • Content Count

    18
  • Joined

  • Last visited

Everything posted by Fairydhwen

  1. Fairydhwen

    Game and Scenes Event

    Hi, I'm just starting to look at this new version of Phaser which looks realy great (congratz!). I'was wondering if there were available events to know when all preloads on game or on a scene are loaded ? At the moment, i set a flag in the update method and then emit a signal with an event i created in my scene. But i'm pretty sure they is a more simple way ? 😛 regards, Fairy.
  2. Fairydhwen

    Game and Scenes Event

    Thank you Rich, indeed this.load.on('complete', () => { }); is probably what i was looking for Fairy.
  3. Fairydhwen

    Angular 6 and Phaser 3?

    You can chack my workaround here :
  4. Fairydhwen

    problems with phaser 3 polyfills and angular 6

    Phaser 3.11.0 with Angular 6 Workaround : 1. install angular project with cli 2. add Phaser to your project with npm 3. copy the phaser.d.ts from the official phaser 3 doc into your src folder 4. modify this files by adding at the begining : declare interface ActiveXObject {} declare interface GamepadHapticActuator {} 5. add phaser.js into the angular.json, in the scripts section : "node_modules/phaser/dist/phaser.js" This should now works. (but this will need more inspection with ActiveXObject and GamepadHapticActuator). Regards
  5. Fairydhwen

    problems with phaser 3 polyfills and angular 6

    Hey, I'm also looking to integrate Phaser 3 into Angular 6 and dont get a proper way... ATM there is a nice module you can use to do this : https://github.com/TristanBonsor/phaser-component-library This works great. Let me know if you find the solution. Regards.
  6. Fairydhwen

    Getting typescript setup

    Looks like your babylon.d.ts doesn't have any export.
  7. Fairydhwen

    Getting typescript setup

    Hey, can we have a link to your babylon.d.ts file pls? Fairy
  8. Hey, Does Phaser can import collection of images (not tileset) for a tilemap from Tiled? Only function i found is : game.load.image(tileName, tileSetFile); // here i need to load all my images (which are not in a tileset) then map.addTilesetImage(inTiledTileSetName, tileName); from my JSON tilemap : "tilesets":[ { "columns":0, "firstgid":1, "margin":0, "name":"Sol", "spacing":0, "tilecount":5, "tileheight":128, "tiles": { "0": { "image":"PNG\/Environment\/dirt.png" }, "1": { "image":"PNG\/Environment\/grass.png" }, "2": { "image":"PNG\/Environment\/sand.png" }, "3": { "image":"PNG\/Environment\/treeLarge.png" }, "4": { "image":"PNG\/Environment\/treeSmall.png" } }, "tilewidth":128 }, Regards
  9. Fairydhwen

    Import TileMap with collection of images

    No, Phaser 2 dont support collection of images. https://github.com/photonstorm/phaser/issues/1339 Only TileSet for V2. :'(
  10. Fairydhwen

    Import TileMap with collection of images

    but how do i load them ? my problem is i dont have one file (tileset.png) for all my images. (5 PNG like in my example for 1 tileset)
  11. Fairydhwen

    TypeScript Best practices

    Hey, you can now download a complete Visual Studio Template for Phaser with TypeScript : (it's up to date and easy to install (VS Extension)) https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2 Regards, Fairy
  12. Fairydhwen

    TypeScript Best practices

    Hi, i'm looking for best pratices to start a phaser project with TypeScript. Most of the tutorials are not up to date (2013 on the site). What about project's structure (i mean directories, naming convention etc.), which tools etc ? EDIT : you can now download a complete Visual Studio Template for Phaser with TypeScript : (it's up to date and easy to install (VS Extension)) https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2 https://github.com/fairydhwen/PhaserTypeScriptTemplate/blob/master/README.md Regards, Fairy Regards,
  13. Fairydhwen

    TypeScript Best practices

    Hey, I finaly made a full template for Phaser projects with TypeScript. You can get it at : https://github.com/fairydhwen/PhaserTypeScriptTemplate This is a complete structure for small to large projects with best practices i found. There is all you need to start, with sample inspired from Richard's tutorial. Please feel free to contact me if you have any questions or comments Regards, Fairydhwen
  14. Hi, I'm reading this tutorial (2nd part) : http://www.gamefromscratch.com/post/2014/06/24/Adventures-in-Phaser-with-TypeScript-Handling-Keyboard-Input.aspx in the second exemple, we got something like : class SimpleGame { constructor() { this.game = new Phaser.Game(640, 480, Phaser.AUTO, 'content', { create: this.create});} moveUp(e: KeyboardEvent) { this.jetSprite.position.add(0, -1); } create() { this.W.onDown.add(SimpleGame.prototype.moveUp, this); } } can someone tell me why we need to use SimpleGame.prototype.moveUp to call this method? (and not just this.moveUP ?) is this because we are using this context ? regards,
  15. Fairydhwen

    TypeScript Best practices

    Hey, this is my setup, what do you think about my template ? i used the combine javascript output into file u told me. (nice tip!) Any other tools or configuration i could use ? (web config etc.?) Regards,
  16. Fairydhwen

    TypeScript Best practices

    ty, i will follow your advice. PS: your tutorial looks really cool
  17. Hey, Just a video [in French] for new users of Phaser : How to install Visual Studio Code (Free) and configures it to start your project with Phaser and TypeScript: https://www.youtube.com/watch?v=E_XOp9xH4XI Regards, Fairy.
  18. Its more simple to use Visual Studio Code (Preview and Free). You can check my video on how to set up it with Phaser and TypeScript (but its in french) :