rich

Administrators
  • Content Count

    6470
  • Joined

  • Last visited

  • Days Won

    301

Reputation Activity

  1. 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.
  2. 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.
  3. 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.
  4. 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!
  5. 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.
     

  6. 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.
     

  7. 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.
  8. 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
  9. 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!)
  10. 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
  11. 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
  12. 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!)
     
  13. 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'.
  14. 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.
  15. 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.
  16. 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);}
  17. 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));
  18. 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
  19. Like
    rich got a reaction from mattstyles in How do you time a pointerdown event?   
    In 3.15:
    this.input.on('pointerup', function (pointer) { var duration = pointer.upTime - pointer.downTime; }); In 3.16:
    this.input.on('pointerup', function (pointer) { var duration = pointer.getDuration(); });  
  20. Like
    rich got a reaction from Pavel Mishin in Get image from cache   
    As has been mentioned, all images are stored in the Texture Manager. You can get the raw image data like this:
    var tex = this.textures.get('key'); tex.getSourceImage(); You can pass getSourceImage a frame key, should the texture span multiple image files (like in a multi-texture set-up)
  21. Thanks
    rich got a reaction from jake.caron in Passing an image from one scene to the next.   
    A RenderTexture would work if you save it to the Texture Manager (via saveTexture), but a CanvasTexture might be a lot easier as they're automatically saved to the Texture Manager, so are globally accessible by default.
  22. Like
    rich got a reaction from Mattia 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
  23. Like
    rich got a reaction from willis in Wrong picked object by id (custom poperties). Phaser 3 bugs or my code mistake?   
    The two bits of code do completely different things. Hinted pieces array clearly doesn’t hold the array indexes, but rather the id values. Game Objects in Phaser don’t have an id property, so this is something you added.
  24. Like
    rich got a reaction from Wingnut in New forum   
    It's fine, I just need to check all tables for an IP address column and blank them if they have them, plus erase the users table (you still have the usernames of those who made the posts in the actual posts table). Then you can do whatever you want with the actual data.
    I can provide a dump of attachments too, but only once, as it's time-consuming. So let me know when you want me to do that. It will be up to you to consolidate these files with the attachment IDs in the database. I'm not sure how much space you get with Discourse, I think it's 1TB, before Deltakosh will have to start paying monthly to be hosted there.
    Just to clarify - forum updates are paid for until April 2019, after which it will still work, but Invision won't be updated any longer. Without BJS or Phaser here traffic will be really small, so I can move it to a cheap VPS and keep it online indefinitely (or until some massive Invision security flaw comes out!)
  25. Thanks
    rich got a reaction from NasimiAsl in New forum   
    I'll provide a zip of all attachments when you request it, you can decide if you want to do anything with them or not after that.