• Content Count

  • Joined

  • Last visited

  • Days Won


ozdy last won the day on February 20 2015

ozdy had the most liked content!

About ozdy

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,779 profile views
  1. ozdy

    N Queens

    Nice, btw finding an iterative solution to a recursive problem is both harder and more efficient, so dunno why your professor frowns
  2. Sorted! While this.animations.currentFrame.name works on non-paused and fails on paused, this.animations.currentAnim.currentFrame.name works everytime
  3. Hello, I'm defining a looped animation of several frames. My game logic requires that I pause the animation and do some logic based on whatever frame I'm on. If not paused, this.animations.currentFrame.name gives me the right frame aka CustomAnimation000X, however, if the animation is paused, it always gives me CustomAnimation0000, even if the frame drawn is CustomAnimation0008 for example. Any one can help me be able to pause an animation and get the frame I'm on? I pause/resume with this.animations.currentAnim.paused = true/false
  4. ozdy

    [Phaser] FootChinko WC18

    I love the graphics style and the audio and the gameplay, makes me soo happy
  5. ozdy

    alphaMask from bitmapData

    Finally solved it, I don't know what alphaMask uses but I got my desired effects with // show when bottom and top overlap + transparency working (what i wanted alphaMask to do, scratchcard effect) this.mcBmd.draw(this.bottomBmd).blendDestinationIn(); this.mcBmd.draw(this.topBmd).blendReset(); // hide when bottom and top overlap + transparency working ( eraser effect) this.mcBmd.draw(this.bottomBmd).blendDestinationOut(); this.mcBmd.draw(this.topBmd).blendReset();
  6. ozdy

    alphaMask from bitmapData

    That's what I use, the problem is that my source bitmapdata has transparent pixels too, but they show as black In your example source has no transparent pixels, so no problem.
  7. ozdy

    alphaMask from bitmapData

    Hi guys, is this fixed? I'm having the same error where when "drawing" the destination transparent pixels are overriden
  8. ozdy

    Best Typescript/Phaser IDE?

    I'm a VIM fan too, but use the VSCode vim plugin.
  9. ozdy

    Best Typescript/Phaser IDE?

    I setup Visual Studio Code to have just 1 keypress from editing to testing game, so I do: F5 -> runs some of my batch files, runs typescript compiler, opens new chrome window with game. (You'd need some familiarity how Visual Studio code tasks work and have the chrome remote debugger plugin.) Ctrl+W (in Chrome) -> closes chrome and focus is back on visual studio code.
  10. $6/month total for all my games.
  11. ozdy

    Sound doesn't loop in Internet Explorer

    I spent a whole day wondering why my code doesn't work but this does. It turns out it wasn't my code, it was the mp3 - the 7 seconds mp3 in the sample works with my code too, but a 1 minute music mp3 doesn't I tried .ogg too without success. Anyone else experience this?
  12. ozdy

    Phaser Scaling Question

    EDIT: Solved it, thanks again! this.game.scale.scaleMode = Phaser.ScaleManager.USER_SCALE; this.game.scale.setResizeCallback(this.onSizeChange, this); onSizeChange():void { var ratio = Math.min(window.innerWidth/Game.WIDTH,window.innerHeight/Game.HEIGHT); this.game.scale.setGameSize(window.innerWidth/ratio,Game.HEIGHT); this.game.scale.setUserScale(ratio,ratio,0,0); this.camera.bounds.x = -Infinity; this.camera.bounds.width = Infinity; this.camera.x = -(window.innerWidth/ratio-Game.WIDTH)/2; } Original Post: Thank you @samme, this is almost what I'm looking for. How can I add stretching, like having the game scale so that ratio of game is math.min(screen_height/logical_game_height,screen_width/logical_game_width) ? I tried setting the code below, but the game flickers this.game.world.scale.x = this.game.world.scale.y = Math.min(this.game.width/Game.WIDTH,this.game.height/Game.HEIGHT);
  13. ozdy

    Phaser Scaling Question

    Hi, @samme, thank you for your answers, but it doesn't exactly do what I'd like. When I stretch the view, the left and right paddings are on top of the world sprite, but I'd like them not to be - I'd want the visible world to start at x=0 after the left padding sprite and end at x=1920 before the right padding sprite no matter how much I stretch it.
  14. ozdy

    Phaser Scaling Question

    I don't think I explained my question too well, I've updated the picture in my original post.
  15. ozdy

    Phaser Scaling Question

    Yes, the padded sprites still are part of game canvas.