Jump to content

samifruit514

Members
  • Posts

    5
  • Joined

  • Last visited

samifruit514's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi! I've add a bitmapdata right at the start (with a simple context.lineTo) and my trail started to show! Its like if the last bitmap item was not shown (?) maybe it has something to do with the game.sprite.add(0,0,'') hack for cocoonjs.... update: This seem to make the trail works with the bitmapdata: function render() { bmd.ctx.strokeStyle = '#ffffff' bmd.ctx.lineWidth = 20 bmd.ctx.beginPath() bmd.ctx.stroke()} strange isnt it?
  2. Thanks for your quick answer, For the browser, yes its the desktop (Chrome Version 33.0.1750.152). Im not trying on the phone's browser because i need cocoonjs's performance. Im using Canvas+ (since the other modes are not performant as canvas). Note that Im having this problem with Phaser.CANVAS mode. When I try the WEBGL mode, I can see my trail (from ctx.drawImage) but the scaling is not working properly so we cannot use it.
  3. Im trying to add a "mouse trail" to the touch input with bitmapdata. On the browser it works great but with android (cocoonjs 2.0) the trail does not appear. The sprites are shown correctly. Is there something the in bitmapdata that is not properly supported by cocoonjs on android? thanks
  4. Im trying to figure out how I can add a click event on a sprite arcade body. On p2 physics, there is a hitTest but not on the arcade one. Also, I tried to use input.hitTest but the box is not detected (I think because there is no hitArea property defined). Anyone can help me? Thank you
  5. Hello, Im trying the Phaser framework and I found it very interesting. There are a LOT of features that are not present in the other frameworks I used. Altough, right at the start, I have an issue. my "game" seems to set a +x velocity to my sprite so right at the start (when I enable the body for P2), it goes to the right. Additionally, the sprite pos is affected by the enablebody and its moved few pixels left and few pixels up. Here's the complete code. <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> <title>Phaser - Making your first game, part 1</title> <script type="text/javascript" src="js/phaser.min.js"></script> <style type="text/css"> body { margin: 0; } </style></head><body><script type="text/javascript">var game = new Phaser.Game(768, 1024, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });game.objects = {}function preload() { game.load.image('d_left', 'assets/d_left.png');}function create() { game.physics.startSystem(Phaser.Physics.P2JS); game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; //resize your window to see the stage resize too game.scale.setExactFit(); game.scale.refresh(); game.objects.dummy = {} game.objects.dummy.left = game.add.sprite(100,330,'d_left'); game.physics.p2.enable(game.objects.dummy.left, false) game.input.addPointer();}function render() { game.debug.pointer(game.input.mousePointer);}function update() {}</script></body></html> Im using phaser 2.0.2 and I tried with 2.0.0 and 2.0.1 as well. Any clue why its doing this? Is it because I'm using chrome? Thank you
×
×
  • Create New...