rich

Administrators
  • Content Count

    6478
  • Joined

  • Last visited

  • Days Won

    304

Reputation Activity

  1. Thanks
    rich got a reaction from spinnerbox in Phaser docs on Github   
    Phaser 3 repo is at https://github.com/photonstorm/phaser
    Phaser 3 Docs are at https://github.com/photonstorm/phaser3-docs
    If you clone the repo, the docs are in the 'docs' folder.
    eslintignore is nothing to do with docs. It's to do with what gets lint checked. However, there is no eslint file in the docs repo. There's also no 'npm build' command either,  so you were looking in a different repo.
    Phaser 2 repo is at https://github.com/photonstorm/phaser-ce
    Phaser 2 docs are in the docs folder of that repo.
  2. Like
    rich got a reaction from MirroW in Why GameObjects dont have add child functionality?   
    There's nothing wrong with using Containers in Phaser 3. The example given by mazoku (a UI Button) is a perfect use-case for them. As are multi-part sprites, i.e. complex Game Objects. But if a Container has just a single child, that's when it doesn't usually make sense any more.
  3. Like
    rich got a reaction from FKL34TI5T5 in How does the .on('pointerdown') listener work? [Possible Bug]   
    Are the buttons positioned over the top of each other? Because a button with alpha zero is still a button that will receive pointer events.
    A `pointerup` event is not the same thing as a `pointerout` event and will not trigger an out state.
    `pointerupoutside` is for detecting pointer up events outside of the game canvas, not a button.
  4. Like
    rich got a reaction from plicatibu in Alexa and HTML 5 Games   
    Hi @Chelsea - I've also signed-up as it sounds very interesting! We are the developers of Phaser and I'd love to take a look at what would be involved to enable our game engine to work with the Alex platform directly.
  5. Haha
    rich got a reaction from plicatibu in In-Game Advertising for HTML5 games   
    Mochi for Flash? Which decade are you living in?
  6. Thanks
    rich got a reaction from gzai in Loading bar with scene files payload   
    Yes, sure. Usually, you'd use the payload for things like json files that the game needs, or plugins, or maybe some assets the preloader can use like a preload background and loading bar graphic. That kind of stuff.
    And then you use the proper Preloader to load the actual game assets.
  7. Thanks
    rich got a reaction from plicatibu in Welcome to the Facebook Instant Games forum   
    Hi all,
    I've created this sub-forum specifically for discussion about Facebook Instant Games. Use it to chat about the API, ask questions and post links to tutorials or code you've found useful.
    It doesn't matter what HTML5 game framework you're using (if any), but if you are using one, please say so in your post, so others can better help you. The FB API is the same regardless, but how you implement it is likely framework specific.
    This forum will be moderated by Facebook Instant Games staff where possible.
    Cheers,
    Rich
  8. Like
    rich got a reaction from quiphop in Sprite with .inputEnabled=true blocking other input   
    If doing an art package style thing then I would suggest using Input.addMoveCallback to get a smoother result than polling pointer coordinates in an update.
     
    Also the Input manager has a coordinate history feature built in btw (Input.recordPointerHistory) but I wouldn't use this for a drawing app personally.
  9. Like
    rich got a reaction from quiphop in Simple game - horrible performance on Android/CooconJS   
    Ok so when you use forceSingleUpdate you basically eliminate the delta timer inside Phaser. This means all physics will be using an 'assumed' dt value of 60fps. If you know your game can reach 60fps under Cocoon without any troubles, then it will be fine. Also if your game doesn't really use much or any Arcade Physics, you will be fine doing this too. P2 has its own physics timer, so it won't touch that.
     
    All that is likely to happen is that on really crappy devices that can't manage 60fps then the Arcade Physics calculations will likely be wrong. But like I said above, this might not matter. Depends on the game.
  10. Like
    rich got a reaction from jdnichollsc in Alexa and HTML 5 Games   
    Hi @Chelsea - I've also signed-up as it sounds very interesting! We are the developers of Phaser and I'd love to take a look at what would be involved to enable our game engine to work with the Alex platform directly.
  11. Confused
    rich got a reaction from jdnichollsc26 in forum problem - no emails for subscribed threads   
    Ahh. I have gone into the Admin area and re-enabled email notifications for you!
  12. Like
    rich got a reaction from Horizonicblue in Uploading screen shots should work again now   
    Hmm, moving server broke this feature, but I've enabled it again (along with SSL, which also broke for some reason).
    So now, you can upload things again.
     

  13. Thanks
    rich got a reaction from b10b in Uploading screen shots should work again now   
    Hmm, moving server broke this feature, but I've enabled it again (along with SSL, which also broke for some reason).
    So now, you can upload things again.
     

  14. Like
    rich got a reaction from LFO in Great free and low-cost game graphics   
    Today the now-closed browser based MMO Glitch released all of their art assets as public domain. There are hundreds of megs worth of stuff. From lovely looking snowy landscapes to bottles of Goat Whiskey (yes, really). You'll have to dig deep and dig hard to extract what you need, but some amazing stuff in here:
     
    http://www.glitchthegame.com/public-domain-game-art/
     

     
    Also found this pretty sweet castle art set today on Graphic River too. Not bad for $5
     
    http://graphicriver.net/item/castle-platform-game-tiles-sprites/5633823
     

     
    Feel free to post more links here if you've got them.
  15. Like
    rich got a reaction from LFO in Welcome!   
    Welcome to the new HTML5 Game Developers Forum!

    I had been meaning to set-up a forum specifically for discussion about HTML5 game development for a while. And today I finally got around to doing so
     
    It's such a new area, one full of challenges and one constantly changing that I felt it was about time we had a unified place to talk about all of those things. Share code, thoughts, ideas and frustrations.
     
    So please register and take part - and if you've a suggestion for new boards that should be added here, just let me know.
     
    Cheers,
     
    Rich
  16. Thanks
    rich got a reaction from shortland in Help debugging through Physics with Phaser 3   
    The debug.cameraInfo line of code is from Phaser 2. It doesn’t do anything in v3 (I’m surprised it didn’t throw an error to be honest!)
  17. Thanks
    rich got a reaction from microspace in inheritance in phaser 3   
    Here is how to do it using ES5: http://labs.phaser.io/view.html?src=src\game objects\images\custom image class.js
    and here is how to do it using ES6: http://labs.phaser.io/view.html?src=src\game objects\images\custom image class ES6.js
  18. Thanks
    rich got a reaction from Lypzis in Check animation frames / when finished   
    Use the above suggestion to get the current frame, but you can also use these sprite events too:
    sprite.events.onAnimationStartsprite.events.onAnimationCompletesprite.events.onAnimationLoop
  19. Thanks
    rich got a reaction from zelcard in [Phaser] Underworld Chaos   
    It's an old thread, but just wanted to say this game is lovely
    URL appears to have changed, now playable here: http://zelcard.000webhostapp.com/games/games/Underworld Chaos/index.html (really should upload to Itch.io or somewhere more reliable!)
     
  20. Thanks
    rich got a reaction from HarryAndTheKanes in Phaser 2 and Phaser 3 physics difference? [HELP]   
    Matter is like P2.
    Impact is like Ninja.
    There is no 'multi'.
  21. Like
    rich got a reaction from rodrigezer in Unit testing a Phaser application?   
    We definitely need to add a way to add tests to phaser, it's really just a matter of time at the moment. There's also only so far you can take unit tests on something so tightly bound to audio and visuals, but it would definitely help to cement the core libs like Point, Group, etc.
  22. Thanks
    rich got a reaction from yassinius in this.add.line is not a function   
    You need to use a version of Phaser that actually has this command in it. 3.11 is too old.
  23. Like
    rich got a reaction from Tilde in Add bitmapdata to cache as image   
    Because makeParticles only accepts a string key (or array of keys). Here is how to use a bmd with an emitter:
    // Here is our custom ParticleMonsterParticle = function (game, x, y) { Phaser.Particle.call(this, game, x, y, game.cache.getBitmapData('particleShade'));};MonsterParticle.prototype = Object.create(Phaser.Particle.prototype);MonsterParticle.prototype.constructor = MonsterParticle;var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create, render: render });function create() { game.stage.backgroundColor = '#003663'; // Create our bitmapData which we'll use as our particle texture var bmd = game.add.bitmapData(64, 64); var radgrad = bmd.ctx.createRadialGradient(32, 32, 4, 32, 32, 32); radgrad.addColorStop(0, 'rgba(1, 159, 98, 1)'); radgrad.addColorStop(1, 'rgba(1, 159, 98, 0)'); bmd.context.fillStyle = radgrad; bmd.context.fillRect(0, 0, 64, 64); // Put the bitmapData into the cache game.cache.addBitmapData('particleShade', bmd); // Create our emitter emitter = game.add.emitter(game.world.centerX, 200, 200); emitter.width = 800; // Here is the important line. This will tell the Emitter to emit our custom MonsterParticle class instead of a normal Particle object. emitter.particleClass = MonsterParticle; emitter.makeParticles(); emitter.minParticleSpeed.set(0, 300); emitter.maxParticleSpeed.set(0, 400); emitter.setRotation(0, 0); emitter.setScale(0.1, 1, 0.1, 1, 12000, Phaser.Easing.Quintic.Out); emitter.gravity = -200; emitter.start(false, 5000, 100); game.input.onDown.add(updateBitmapDataTexture, this);}function updateBitmapDataTexture() { // Get the bitmapData from the cache. This returns a reference to the original object var bmd = game.cache.getBitmapData('particleShade'); bmd.context.clearRect(0, 0, 64, 64); // createRadialGradient parameters: x, y, innerRadius, x, y, outerRadius var radgrad = bmd.ctx.createRadialGradient(32, 32, 4, 32, 32, 32); var c1 = Phaser.Color.getWebRGB(Phaser.Color.getRandomColor(0, 255, 255)); var c2 = Phaser.Color.getWebRGB(Phaser.Color.getRandomColor(0, 255, 0)); radgrad.addColorStop(0, c1); radgrad.addColorStop(1, c2); bmd.context.fillStyle = radgrad; bmd.context.fillRect(0, 0, 64, 64); // All particles using this texture will update at the next render bmd.dirty = true;}function render() { game.debug.text('Click to regenerate the texture', 16, 28);}
  24. Like
    rich got a reaction from Tilde in Add bitmapdata to cache as image   
    game.cache.addBitmapData(key, bmd); But you don't use the key when adding a Sprite, otherwise it will think you've given it an Image key. Instead do this:
    game.add.sprite(x, y, game.cache.getBitmapData(key));
  25. Like
    rich got a reaction from Tilde in Create/cache spritesheet from generated texture   
    Here you go - this is how to do it from a Texture:
    http://phaser.io/examples/v2/display/spritesheet-from-graphics