emile

Members
  • Content Count

    4
  • Joined

  • Last visited

About emile

  • Rank
    Newbie

Contact Methods

  • Twitter
    @scknss
  1. emile

    Scaling Pandajs game to fit parent container

    Hey @Ninjadoodle Thanks for the help, it seems to be working now, its just a matter of understanding how it all works... to quote "Man, I have so much to learn " Thanks again.
  2. I'm trying to scale one of the pandajs demo games to fit a parent container on a webpage, I've been trying to use: game.scene.stage.scale.set(0.5,0.5), where my thinking was that I would have to calculate the scale factor using the difference between the parent's dimensions and the game's resolution. This doesn't feel like the right solution. I also have to scale the game for each scene, which also doesn't feel right. I'm not sure if I'm missing some kind of feature like phaser where you can state the game's parent then set the game to "SHOW_ALL" or something? I'm really trying to get the hang of Pandajs seems like a cool framework. Any help would be really appreciated.
  3. emile

    Bloks example touchmove

    I can post a live example of the github source that isnt working on mobile, it also doesnt work on chrome dev tools(using the mobile emulator).
  4. emile

    Bloks example touchmove

    I've been working on the old pandajs bloks example, someone spotted a potential bug on mobile a while back ( http://www.html5gamedevs.com/topic/3851-pandajs-bloks/ ) and I'm not sure if its been resolved. The live demo works fine on mobile, but when I downloaded the source from github and checked it on mobile it no longer worked, I cant seem to spot the difference between the live version ond the github code. I have managed to narrow the problem down somewhat. In the objects.js file on line 50: was: this.sprite.mouseover = this.touchmove.bind(this); which I changed to: this.sprite.mouseover = this.sprite.touchmove = this.touchmove.bind(this); (now the sprite.touchmove function receives an event on touchmove...) then on line 108: I added console.log(this.pos); this showed the problem to be that on desktop, the mouseover event is called for the sprite that is moused-over, but on mobile the touchmove event only references the first block, that is touched, so only the touchstart block. I cant find a way to get that touchmove event to be called for each sprite that is moved over... I am a serious beginner at pandajs and game dev in general but I would really appreciate it if anyone could help out... I'm sure its something simple. The only file I've modified from the github repo is the objects.js file and I've attached it to this post. Thanks in advance. objects.txt