Jump to content

Colbydude

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    2

Colbydude last won the day on May 17 2020

Colbydude had the most liked content!

About Colbydude

  • Rank
    Newbie
  • Birthday 02/24/1993

Contact Methods

  • Website URL
    https://colbydude.com
  • Twitter
    Colbydude

Profile Information

  • Gender
    Male
  • Location
    Washington, USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. As far as I'm aware, Phaser 3 doesn't have a built-in button game object. Though you can achieve the functionality you want by doing something like this: create () { this.startBtn = this.add.sprite(100, 100, 'startBtn').setInteractive(); this.startBtn.on('pointerover', function (event) { /* Do something when the mouse enters */ }); this.startBtn.on('pointerout', function (event) { /* Do something when the mouse exits. */ }); this.startBtn.on('pointerdown', startGame); // Start game on click. }
  2. Hey all, So I'm wanting using a web font in my Phaser project, but I'm noticing that when using the font in-game, it's automatically applying some sort of smoothing? When rendering straight onto the page outside of the game, the font comes out perfectly crisp when using "-webkit-font-smoothing: none;" See the attachment. I took a look into the Text game object and I'm seeing a "resolution" member, though doing "textObject.resolution = <number>;" doesn't seem to have any effect. Not sure if I need to run an update once I do that though. Do have other options available? Seco
  3. I managed to figure it out and cleaned it up a bit! Full source is at https://github.com/Colbydude/phaser-3-palette-swapping-example and a demonstration is attached. Cheers for the point in the right direction, Rich.
  4. Yup, precisely. In the case of my WIP example, the goal is to start with a single sprite sheet, 'link', then color it with 4 different palettes as specified in 'link-palette'. This would give us 4 spritesheets/atlases 'link-green', 'link-red', 'link-blue', and 'link-purple.' Then from those new sheets also create newly colored animations named 'link-green-walk-up', 'link-green-walk-down', 'link-green-walk-left', 'link-red-walk-down', etc...
  5. So this is about as far as I got: https://github.com/Colbydude/phaser-3-palette-swapping-example/blob/master/public/js/palette-swap.js I was successfully able to generate the dynamic texture atlases and animations, but things started to get a little hairy when I actually tried to copy the image data over to the new canvas. The frame numbers and placement seemingly check out, but I get a bizarre result. This is the current result is attached. Suggestions on what I might be messing up, or the next steps from here? Improvements on the overall process are more than welcome as well.
  6. Ah, excellent. I figured it was just a matter of me not knowing what to look for. I'll see if I can get working implementation going later tonight and report back. The Create Canvas example should be enough to get me started.
  7. Hey all, I'm looking to implement palette swapping into my project as detailed in this article: http://laxvikinggames.blogspot.com/2015/01/build-dynamic-texture-atlas-in-phaser.html The article goes about doing it by referencing palettes from a texture and using BitmapData to swap the colors and build a dynamic texture atlas that's stored in cache for use later. From the looks of it BitmapData has either been removed or renamed to something that's seemingly less obvious to me. Has anyone tried implementing palette swapping in Phaser 3 yet? What tools do I have available in Phase
×
×
  • Create New...