rich

Administrators
  • Content count

    6,270
  • Joined

  • Last visited

  • Days Won

    293

rich last won the day on July 11

rich had the most liked content!

About rich

  • Rank
    Administrator
  • Birthday 08/12/1975

Contact Methods

  • Website URL
    http://www.photonstorm.com
  • Twitter
    photonstorm
  • Skype
    richard.davey

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

11,848 profile views
  1. rich

    Custom Builds?

    You can do incredibly granular builds of Phaser 3! Literally chop out anything you don't use, right down to single Actions or File Type Loaders. I'll write a proper tutorial on it for a Dev Log soon, but for now the key to it is using webpack to make a custom build by changing the contents of the entry point. Webpack uses src/phaser.js as the entry point for the 'full' build, and src/phaser-core.js for the 'core' build. If you look at these files you'll see they are basically a list of all the things to be included in a build, that is exposed under the Phaser namespace. If you look at the core file you'll see the GameObjects object breaks down into sections and that TileSprite and the Bitmap Text objects aren't in there for example. You can also see it's got far less Loader File Types too. Basically, anything in this file is bundled in. If you just link to a folder it'll take the index.js file from that folder and include everything in it: Actions: require('./actions') Here, every single Action will be included. But you could change it to this: Actions: { GridAlign: require('./actions/GridAlign'), RandomLine: require('./actions/RandomLine'), Shuffle: require('./actions/Shuffle') } Now, only the 3 Actions listed will be included. You don't have to worry about dependencies. For example, the Shuffle action requires the ArrayShuffle function from the utils/array folder, but it will be pulled in automatically because of the way webpack works. So think about the phaser.js file as being what you want Phaser to expose in its namespace. You could literally have nothing other than the 'Game' entry and that in itself will pull in everything it needs for a core, base Phaser to work. There won't be any Game Objects of course and no File Types for the Loader but it would still work. Perhaps if you were rendering a whole game using just the Graphics object then you could skip adding the Loader entirely! That's the basic gist of it anyway. Clone the repo, create your own phaser.js entry point, put in it whatever you use and let webpack worry about the rest.
  2. Stick a catch on the end of the Promise and log the error, what does it output?
  3. rich

    Remove Texture from Sprite

    There's a built-in blank texture you can use, just use the key '__DEFAULT'.
  4. This has been fixed in the 3.12 Release. You can find Beta 1 of 3.12 out now on GitHub and in npm under the beta tag. Please use that to test resolution changes.
  5. Fair enough. If you're even fractionally serious about mobile this is a non-issue though.
  6. I liked it too, although the "plus paying the Apple Developer Fee" comment didn't make any sense to me. Was it just devs getting confused?
  7. rich

    No AudioContext in IE?

    It depends if you need to use any of the Web Audio features. If you do then you can't target IE really.
  8. rich

    No AudioContext in IE?

    IE doesn't support Web Audio. Microsoft didn't start supporting it until they released Edge.
  9. rich

    Game and Scenes Event

    One of these should help: http://labs.phaser.test/index.html?dir=loader/loader events/&q= Although another way to tell is when your create method is run. At that point everything in preload has finished.
  10. rich

    Not rotating from sprite origin

    Origin(0,0) is the top-left, so the rotation looks right to me. You surely want 0.5, 0.5 so it rotates from the center?
  11. Or, if you prefer less typing: this.keyBools = this.input.keyboard.addKeys('W,S,A,D'); There are lots of examples here too, for key events, key combos, etc: http://labs.phaser.io/index.html?dir=input/keyboard/&q=
  12. There isn't a single system in v3 that needs to be accessed via 'game'. Keyboard, especially, is one of them. Access it via `this.input.keyboard` from a Scene, although there's no such thing as an 'onPressCallback' either, so it still won't actually do anything even with the correct reference.
  13. rich

    Mobile Audio *Crash Bug*

    No, there are lots of browsers that can't play mp3s I'm afraid.
  14. rich

    Mobile Audio *Crash Bug*

    This is fixed in the master branch and will be part of the 3.12 release. However, it's only the error that is fixed - the cause of it is down to the device / browser / file format you're trying to load. When 3.12 is out the TypeError will be gone, but the files still won't load (as the source of the decodeAudioData error will still be there)
  15. rich

    GameCommerce - Incredibles 2 Cookie Catch

    Nice to see Phaser 3 being used for this